Merge "Carrier id api rename" into pi-dev

am: f78767d2f9

Change-Id: If619579e7c3bba865754b07909bc8864efd6c78b
This commit is contained in:
Chen Xu
2018-03-13 00:20:17 +00:00
committed by android-build-merger
4 changed files with 17 additions and 18 deletions

View File

@@ -43073,8 +43073,6 @@ package android.telephony {
method public android.telephony.TelephonyManager createForPhoneAccountHandle(android.telecom.PhoneAccountHandle); method public android.telephony.TelephonyManager createForPhoneAccountHandle(android.telecom.PhoneAccountHandle);
method public android.telephony.TelephonyManager createForSubscriptionId(int); method public android.telephony.TelephonyManager createForSubscriptionId(int);
method public java.util.List<android.telephony.CellInfo> getAllCellInfo(); method public java.util.List<android.telephony.CellInfo> getAllCellInfo();
method public int getAndroidCarrierIdForSubscription();
method public java.lang.CharSequence getAndroidCarrierNameForSubscription();
method public int getCallState(); method public int getCallState();
method public android.os.PersistableBundle getCarrierConfig(); method public android.os.PersistableBundle getCarrierConfig();
method public deprecated android.telephony.CellLocation getCellLocation(); method public deprecated android.telephony.CellLocation getCellLocation();
@@ -43105,6 +43103,8 @@ package android.telephony {
method public int getPhoneType(); method public int getPhoneType();
method public android.telephony.ServiceState getServiceState(); method public android.telephony.ServiceState getServiceState();
method public android.telephony.SignalStrength getSignalStrength(); method public android.telephony.SignalStrength getSignalStrength();
method public int getSimCarrierId();
method public java.lang.CharSequence getSimCarrierIdName();
method public java.lang.String getSimCountryIso(); method public java.lang.String getSimCountryIso();
method public java.lang.String getSimOperator(); method public java.lang.String getSimOperator();
method public java.lang.String getSimOperatorName(); method public java.lang.String getSimOperatorName();

View File

@@ -3380,7 +3380,7 @@ public final class Telephony {
* on the given subscriptionId * on the given subscriptionId
* <p> * <p>
* Use this {@link Uri} with a {@link ContentObserver} to be notified of changes to the * Use this {@link Uri} with a {@link ContentObserver} to be notified of changes to the
* carrier identity {@link TelephonyManager#getAndroidCarrierIdForSubscription()} * carrier identity {@link TelephonyManager#getSimCarrierId()}
* while your app is running. You can also use a {@link JobService} to ensure your app * 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. * 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 * Note, however, that using a {@link JobService} does not guarantee timely delivery of
@@ -3396,14 +3396,14 @@ public final class Telephony {
/** /**
* A user facing carrier name. * A user facing carrier name.
* @see TelephonyManager#getAndroidCarrierNameForSubscription() * @see TelephonyManager#getSimCarrierIdName()
* <P>Type: TEXT </P> * <P>Type: TEXT </P>
*/ */
public static final String CARRIER_NAME = "carrier_name"; public static final String CARRIER_NAME = "carrier_name";
/** /**
* A unique carrier id * A unique carrier id
* @see TelephonyManager#getAndroidCarrierIdForSubscription() * @see TelephonyManager#getSimCarrierId()
* <P>Type: INTEGER </P> * <P>Type: INTEGER </P>
*/ */
public static final String CARRIER_ID = "carrier_id"; public static final String CARRIER_ID = "carrier_id";

View File

@@ -53,7 +53,6 @@ import android.telephony.ims.aidl.IImsConfig;
import android.telephony.ims.aidl.IImsMmTelFeature; import android.telephony.ims.aidl.IImsMmTelFeature;
import android.telephony.ims.aidl.IImsRcsFeature; import android.telephony.ims.aidl.IImsRcsFeature;
import android.telephony.ims.aidl.IImsRegistration; import android.telephony.ims.aidl.IImsRegistration;
import android.telephony.ims.feature.ImsFeature;
import android.telephony.ims.stub.ImsRegistrationImplBase; import android.telephony.ims.stub.ImsRegistrationImplBase;
import android.util.Log; import android.util.Log;
@@ -1082,7 +1081,7 @@ public class TelephonyManager {
/** /**
* An int extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} which indicates * An int extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} which indicates
* the updated carrier id {@link TelephonyManager#getAndroidCarrierIdForSubscription()} of * the updated carrier id {@link TelephonyManager#getSimCarrierId()} of
* the current subscription. * the current subscription.
* <p>Will be {@link TelephonyManager#UNKNOWN_CARRIER_ID} if the subscription is unavailable or * <p>Will be {@link TelephonyManager#UNKNOWN_CARRIER_ID} if the subscription is unavailable or
* the carrier cannot be identified. * the carrier cannot be identified.
@@ -1092,7 +1091,7 @@ public class TelephonyManager {
/** /**
* An string extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} which * An string extra used with {@link #ACTION_SUBSCRIPTION_CARRIER_IDENTITY_CHANGED} which
* indicates the updated carrier name of the current subscription. * indicates the updated carrier name of the current subscription.
* {@see TelephonyManager#getSubscriptionCarrierName()} * {@see TelephonyManager#getSimCarrierIdName()}
* <p>Carrier name is a user-facing name of the carrier id {@link #EXTRA_CARRIER_ID}, * <p>Carrier name is a user-facing name of the carrier id {@link #EXTRA_CARRIER_ID},
* usually the brand name of the subsidiary (e.g. T-Mobile). * usually the brand name of the subsidiary (e.g. T-Mobile).
*/ */
@@ -7201,8 +7200,8 @@ public class TelephonyManager {
/** /**
* Returns carrier id of the current subscription. * Returns carrier id of the current subscription.
* <p>To recognize a carrier (including MVNO) as a first-class identity, Android assigns each * <p>To recognize a carrier (including MVNO) as a first-class identity, Android assigns each
* carrier with a canonical integer a.k.a. android carrier id. The Android carrier ID is an * carrier with a canonical integer a.k.a. carrier id. The carrier ID is an Android
* Android platform-wide identifier for a carrier. AOSP maintains carrier ID assignments in * platform-wide identifier for a carrier. AOSP maintains carrier ID assignments in
* <a href="https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/master/assets/carrier_list.textpb">here</a> * <a href="https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/master/assets/carrier_list.textpb">here</a>
* *
* <p>Apps which have carrier-specific configurations or business logic can use the carrier id * <p>Apps which have carrier-specific configurations or business logic can use the carrier id
@@ -7211,7 +7210,7 @@ public class TelephonyManager {
* @return Carrier id of the current subscription. Return {@link #UNKNOWN_CARRIER_ID} if the * @return Carrier id of the current subscription. Return {@link #UNKNOWN_CARRIER_ID} if the
* subscription is unavailable or the carrier cannot be identified. * subscription is unavailable or the carrier cannot be identified.
*/ */
public int getAndroidCarrierIdForSubscription() { public int getSimCarrierId() {
try { try {
ITelephony service = getITelephony(); ITelephony service = getITelephony();
if (service != null) { if (service != null) {
@@ -7224,18 +7223,18 @@ public class TelephonyManager {
} }
/** /**
* Returns carrier name of the current subscription. * Returns carrier id name of the current subscription.
* <p>Carrier name is a user-facing name of carrier id * <p>Carrier id name is a user-facing name of carrier id
* {@link #getAndroidCarrierIdForSubscription()}, usually the brand name of the subsidiary * {@link #getSimCarrierId()}, usually the brand name of the subsidiary
* (e.g. T-Mobile). Each carrier could configure multiple {@link #getSimOperatorName() SPN} but * (e.g. T-Mobile). Each carrier could configure multiple {@link #getSimOperatorName() SPN} but
* should have a single carrier name. Carrier name is not a canonical identity, * should have a single carrier name. Carrier name is not a canonical identity,
* use {@link #getAndroidCarrierIdForSubscription()} instead. * use {@link #getSimCarrierId()} instead.
* <p>The returned carrier name is unlocalized. * <p>The returned carrier name is unlocalized.
* *
* @return Carrier name of the current subscription. Return {@code null} if the subscription is * @return Carrier name of the current subscription. Return {@code null} if the subscription is
* unavailable or the carrier cannot be identified. * unavailable or the carrier cannot be identified.
*/ */
public CharSequence getAndroidCarrierNameForSubscription() { public CharSequence getSimCarrierIdName() {
try { try {
ITelephony service = getITelephony(); ITelephony service = getITelephony();
if (service != null) { if (service != null) {

View File

@@ -1352,10 +1352,10 @@ interface ITelephony {
/** /**
* Returns carrier name of the given subscription. * Returns carrier name of the given subscription.
* <p>Carrier name is a user-facing name of carrier id {@link #getSubscriptionCarrierId(int)}, * <p>Carrier name is a user-facing name of carrier id {@link #getSimCarrierId(int)},
* usually the brand name of the subsidiary (e.g. T-Mobile). Each carrier could configure * usually the brand name of the subsidiary (e.g. T-Mobile). Each carrier could configure
* multiple {@link #getSimOperatorName() SPN} but should have a single carrier name. * multiple {@link #getSimOperatorName() SPN} but should have a single carrier name.
* Carrier name is not canonical identity, use {@link #getSubscriptionCarrierId(int)} instead. * Carrier name is not canonical identity, use {@link #getSimCarrierId(int)} instead.
* <p>Returned carrier name is unlocalized. * <p>Returned carrier name is unlocalized.
* *
* @return Carrier name of given subscription id. return {@code null} if subscription is * @return Carrier name of given subscription id. return {@code null} if subscription is