Home | History | Annotate | Download | only in mms

Lines Matching refs:apn

39  * Default implementation of APN settings loader
43 * The base implementation of an APN
45 private static class BaseApn implements Apn {
47 * Create a base APN from parameters
49 * @param typesIn the APN type field
50 * @param mmscIn the APN mmsc field
51 * @param proxyIn the APN mmsproxy field
52 * @param portIn the APN mmsport field
53 * @return an instance of base APN, or null if any of the parameter is invalid
124 * An in-memory implementation of an APN. These APNs are organized into an in-memory list.
127 private static class MemoryApn implements Apn {
129 * Create an in-memory APN loaded from resources
131 * @param apns the in-memory APN list
132 * @param typesIn the APN type field
133 * @param mmscIn the APN mmsc field
134 * @param proxyIn the APN mmsproxy field
135 * @param portIn the APN mmsport field
136 * @return an in-memory APN instance, null if there is invalid parameter
138 public static MemoryApn from(final List<Apn> apns, final String typesIn,
147 for (final Apn apn : apns) {
148 if (apn instanceof MemoryApn && ((MemoryApn) apn).equals(base)) {
155 private final List<Apn> mApns;
158 public MemoryApn(final List<Apn> apns, final BaseApn base) {
180 // If this is being marked as a successful APN, move it to the top of the list so
191 Log.d(MmsService.TAG, "Set APN ["
207 * APN_TYPE_ALL is a special type to indicate that this APN entry can
211 /** APN type for MMS traffic */
227 private static final String APN_APN = "apn";
236 private final SparseArray<List<Apn>> mApnsCache;
244 public List<Apn> get(final String apnName) {
246 List<Apn> apns;
263 private void loadLocked(final int subId, final String apnName, final List<Apn> apns) {
264 // Try system APN table first
274 // Try resources but without APN name
283 * @param apnName the APN name to match
286 private void loadFromSystem(final int subId, final String apnName, final List<Apn> apns) {
314 // Can't access platform APN table, return directly
322 final Apn apn = BaseApn.from(
327 if (apn != null) {
328 apns.add(apn);
337 * Query system APN table
339 * @param uri The APN query URL to use
341 * @param apnName The optional APN name for query condition
358 selectionBuilder.append(Telephony.Carriers.APN).append("=?");
372 Log.w(MmsService.TAG, "Query " + uri + " with apn " + apnName + " and "
379 Log.w(MmsService.TAG, "APN table query exception: " + e);
381 Log.w(MmsService.TAG, "Platform restricts APN table access: " + e);
388 * Find matching APNs using builtin APN list resource
391 * @param apnName the APN name to match
394 private void loadFromResources(final int subId, final String apnName, final List<Apn> apns) {
410 final String apn = trimWithNullCheck(apnValues.getAsString(APN_APN));
414 (TextUtils.isEmpty(apnName) || apnName.equalsIgnoreCase(apn))) {
419 final Apn newApn = MemoryApn.from(apns, type, mmsc, mmsproxy, mmsport);
479 * Check if the APN contains the APN type we want
486 // If APN type is unspecified, assume APN_TYPE_ALL.