diff options
author | Divya Sharma <divyash@codeaurora.org> | 2018-02-27 08:32:05 -0800 |
---|---|---|
committer | Divya Sharma <divyash@codeaurora.org> | 2018-02-27 08:32:05 -0800 |
commit | 4e4914b22b779e6376bb00ae20636175b2a70d8c (patch) | |
tree | f4ebc5eae2c99e20aceefcc9ffc3de19782f0fbe /telephony/java/android/provider/Telephony.java | |
parent | dbed40a3cd31af821ea99c605664908d67df2747 (diff) | |
parent | ed5d4d06907844e1c87a6ee17c4f2868a8cc6d56 (diff) |
PPR1.180219.001_AOSP_Merge
Conflicts:
core/res/res/values/config.xml
core/res/res/values/symbols.xml
packages/SystemUI/res/values/config.xml
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
telecomm/java/android/telecom/Call.java
telecomm/java/android/telecom/Connection.java
telecomm/java/android/telecom/ConnectionService.java
Change-Id: I524d38a61608069028b3496a189118d8eff75f4b
Diffstat (limited to 'telephony/java/android/provider/Telephony.java')
-rw-r--r-- | telephony/java/android/provider/Telephony.java | 126 |
1 files changed, 86 insertions, 40 deletions
diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java index 8f41c4eb8d09..41ce93c345d6 100644 --- a/telephony/java/android/provider/Telephony.java +++ b/telephony/java/android/provider/Telephony.java @@ -33,6 +33,7 @@ import android.telephony.Rlog; import android.telephony.ServiceState; import android.telephony.SmsMessage; import android.telephony.SubscriptionManager; +import android.telephony.TelephonyManager; import android.text.TextUtils; import android.util.Patterns; @@ -3392,73 +3393,118 @@ public final class Telephony { } /** - * Contains carrier identification information. - * @hide + * Contains carrier identification information for the current subscriptions. + * @see SubscriptionManager#getActiveSubscriptionIdList() */ public static final class CarrierIdentification implements BaseColumns { /** - * Numeric operator ID (as String). {@code MCC + MNC} - * <P>Type: TEXT </P> - */ - public static final String MCCMNC = "mccmnc"; - - /** - * Group id level 1 (as String). - * <P>Type: TEXT </P> - */ - public static final String GID1 = "gid1"; - - /** - * Group id level 2 (as String). - * <P>Type: TEXT </P> - */ - public static final String GID2 = "gid2"; - - /** - * Public Land Mobile Network name. - * <P>Type: TEXT </P> + * Not instantiable. + * @hide */ - public static final String PLMN = "plmn"; + private CarrierIdentification() {} /** - * Prefix xpattern of IMSI (International Mobile Subscriber Identity). - * <P>Type: TEXT </P> + * The {@code content://} style URI for this provider. */ - public static final String IMSI_PREFIX_XPATTERN = "imsi_prefix_xpattern"; + public static final Uri CONTENT_URI = Uri.parse("content://carrier_identification"); /** - * Service Provider Name. - * <P>Type: TEXT </P> + * The authority string for the CarrierIdentification Provider + * @hide */ - public static final String SPN = "spn"; + public static final String AUTHORITY = "carrier_identification"; - /** - * Prefer APN name. - * <P>Type: TEXT </P> - */ - public static final String APN = "apn"; /** - * Prefix of Integrated Circuit Card Identifier. - * <P>Type: TEXT </P> + * Generates a content {@link Uri} used to receive updates on carrier identity change + * on the given subscriptionId + * <p> + * Use this {@link Uri} with a {@link ContentObserver} to be notified of changes to the + * carrier identity {@link TelephonyManager#getAndroidCarrierIdForSubscription()} + * while your app is running. You can also use a {@link JobService} to ensure your app + * is notified of changes to the {@link Uri} even when it is not running. + * Note, however, that using a {@link JobService} does not guarantee timely delivery of + * updates to the {@link Uri}. + * + * @param subscriptionId the subscriptionId to receive updates on + * @return the Uri used to observe carrier identity changes */ - public static final String ICCID_PREFIX = "iccid_prefix"; + public static Uri getUriForSubscriptionId(int subscriptionId) { + return CONTENT_URI.buildUpon().appendEncodedPath( + String.valueOf(subscriptionId)).build(); + } /** - * User facing carrier name. + * A user facing carrier name. + * @see TelephonyManager#getAndroidCarrierNameForSubscription() * <P>Type: TEXT </P> */ public static final String NAME = "carrier_name"; /** * A unique carrier id + * @see TelephonyManager#getAndroidCarrierIdForSubscription() * <P>Type: INTEGER </P> */ public static final String CID = "carrier_id"; /** - * The {@code content://} URI for this table. + * Contains mappings between matching rules with carrier id for all carriers. + * @hide */ - public static final Uri CONTENT_URI = Uri.parse("content://carrier_identification"); + public static final class All implements BaseColumns { + /** + * Numeric operator ID (as String). {@code MCC + MNC} + * <P>Type: TEXT </P> + */ + public static final String MCCMNC = "mccmnc"; + + /** + * Group id level 1 (as String). + * <P>Type: TEXT </P> + */ + public static final String GID1 = "gid1"; + + /** + * Group id level 2 (as String). + * <P>Type: TEXT </P> + */ + public static final String GID2 = "gid2"; + + /** + * Public Land Mobile Network name. + * <P>Type: TEXT </P> + */ + public static final String PLMN = "plmn"; + + /** + * Prefix xpattern of IMSI (International Mobile Subscriber Identity). + * <P>Type: TEXT </P> + */ + public static final String IMSI_PREFIX_XPATTERN = "imsi_prefix_xpattern"; + + /** + * Service Provider Name. + * <P>Type: TEXT </P> + */ + public static final String SPN = "spn"; + + /** + * Prefer APN name. + * <P>Type: TEXT </P> + */ + public static final String APN = "apn"; + + /** + * Prefix of Integrated Circuit Card Identifier. + * <P>Type: TEXT </P> + */ + public static final String ICCID_PREFIX = "iccid_prefix"; + + /** + * The {@code content://} URI for this table. + */ + public static final Uri CONTENT_URI = Uri.parse("content://carrier_identification/all"); + } } } |