Merge "Add API to get card ID for default eUICC"
am: 97c68169b8
Change-Id: I639a406ef60fe7aa3b95a3d2df8dc729048047f0
This commit is contained in:
@@ -5218,6 +5218,7 @@ package android.telephony {
|
|||||||
method public void enableVideoCalling(boolean);
|
method public void enableVideoCalling(boolean);
|
||||||
method public java.lang.String getAidForAppType(int);
|
method public java.lang.String getAidForAppType(int);
|
||||||
method public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers(int);
|
method public java.util.List<android.service.carrier.CarrierIdentifier> getAllowedCarriers(int);
|
||||||
|
method public int getCardIdForDefaultEuicc();
|
||||||
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntent(android.content.Intent);
|
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntent(android.content.Intent);
|
||||||
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntentAndPhone(android.content.Intent, int);
|
method public java.util.List<java.lang.String> getCarrierPackageNamesForIntentAndPhone(android.content.Intent, int);
|
||||||
method public java.lang.String getCdmaMdn();
|
method public java.lang.String getCdmaMdn();
|
||||||
@@ -5283,6 +5284,7 @@ package android.telephony {
|
|||||||
field public static final java.lang.String EXTRA_SIM_STATE = "android.telephony.extra.SIM_STATE";
|
field public static final java.lang.String EXTRA_SIM_STATE = "android.telephony.extra.SIM_STATE";
|
||||||
field public static final java.lang.String EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL = "android.telephony.extra.VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL";
|
field public static final java.lang.String EXTRA_VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL = "android.telephony.extra.VISUAL_VOICEMAIL_ENABLED_BY_USER_BOOL";
|
||||||
field public static final java.lang.String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING = "android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING";
|
field public static final java.lang.String EXTRA_VOICEMAIL_SCRAMBLED_PIN_STRING = "android.telephony.extra.VOICEMAIL_SCRAMBLED_PIN_STRING";
|
||||||
|
field public static final int INVALID_CARD_ID = -1; // 0xffffffff
|
||||||
field public static final long MAX_NUMBER_VERIFICATION_TIMEOUT_MILLIS = 60000L; // 0xea60L
|
field public static final long MAX_NUMBER_VERIFICATION_TIMEOUT_MILLIS = 60000L; // 0xea60L
|
||||||
field public static final int NETWORK_MODE_CDMA_EVDO = 4; // 0x4
|
field public static final int NETWORK_MODE_CDMA_EVDO = 4; // 0x4
|
||||||
field public static final int NETWORK_MODE_CDMA_NO_EVDO = 5; // 0x5
|
field public static final int NETWORK_MODE_CDMA_NO_EVDO = 5; // 0x5
|
||||||
|
|||||||
@@ -225,6 +225,13 @@ public class TelephonyManager {
|
|||||||
@SystemApi
|
@SystemApi
|
||||||
public static final int SRVCC_STATE_HANDOVER_CANCELED = 3;
|
public static final int SRVCC_STATE_HANDOVER_CANCELED = 3;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An invalid card identifier.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
public static final int INVALID_CARD_ID = -1;
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@IntDef(prefix = {"SRVCC_STATE_"},
|
@IntDef(prefix = {"SRVCC_STATE_"},
|
||||||
@@ -3093,6 +3100,34 @@ public class TelephonyManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the card ID of the default eUICC card. If there is no eUICC, returns
|
||||||
|
* {@link #INVALID_CARD_ID}.
|
||||||
|
*
|
||||||
|
* <p>The card ID is a unique identifier associated with a UICC or eUICC card. Card IDs are
|
||||||
|
* unique to a device, and always refer to the same UICC or eUICC card unless the device goes
|
||||||
|
* through a factory reset.
|
||||||
|
*
|
||||||
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
||||||
|
*
|
||||||
|
* @return card ID of the default eUICC card.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
||||||
|
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||||
|
public int getCardIdForDefaultEuicc() {
|
||||||
|
try {
|
||||||
|
ITelephony telephony = getITelephony();
|
||||||
|
if (telephony == null) {
|
||||||
|
return INVALID_CARD_ID;
|
||||||
|
}
|
||||||
|
return telephony.getCardIdForDefaultEuicc(mSubId, mContext.getOpPackageName());
|
||||||
|
} catch (RemoteException e) {
|
||||||
|
return INVALID_CARD_ID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets all the UICC slots. The objects in the array can be null if the slot info is not
|
* Gets all the UICC slots. The objects in the array can be null if the slot info is not
|
||||||
* available, which is possible between phone process starting and getting slot info from modem.
|
* available, which is possible between phone process starting and getting slot info from modem.
|
||||||
|
|||||||
@@ -1481,6 +1481,19 @@ interface ITelephony {
|
|||||||
*/
|
*/
|
||||||
SignalStrength getSignalStrength(int subId);
|
SignalStrength getSignalStrength(int subId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the card ID of the default eUICC card. If there is no eUICC, returns
|
||||||
|
* {@link #INVALID_CARD_ID}.
|
||||||
|
*
|
||||||
|
* <p>Requires Permission: {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
||||||
|
*
|
||||||
|
* @param subId subscription ID used for authentication
|
||||||
|
* @param callingPackage package making the call
|
||||||
|
* @return card ID of the default eUICC card.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
int getCardIdForDefaultEuicc(int subId, String callingPackage);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get slot info for all the UICC slots.
|
* Get slot info for all the UICC slots.
|
||||||
* @return UiccSlotInfo array.
|
* @return UiccSlotInfo array.
|
||||||
|
|||||||
Reference in New Issue
Block a user