Merge "Deprecate some UICC related APIs in TelephonyManager"

This commit is contained in:
Rambo Wang
2020-01-09 22:59:44 +00:00
committed by Gerrit Code Review
3 changed files with 54 additions and 9 deletions

View File

@@ -45505,12 +45505,12 @@ package android.telephony {
method public android.net.Uri getVoicemailRingtoneUri(android.telecom.PhoneAccountHandle); method public android.net.Uri getVoicemailRingtoneUri(android.telecom.PhoneAccountHandle);
method public boolean hasCarrierPrivileges(); method public boolean hasCarrierPrivileges();
method public boolean hasIccCard(); method public boolean hasIccCard();
method public boolean iccCloseLogicalChannel(int); method @Deprecated public boolean iccCloseLogicalChannel(int);
method public byte[] iccExchangeSimIO(int, int, int, int, int, String); method @Deprecated public byte[] iccExchangeSimIO(int, int, int, int, int, String);
method @Deprecated public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(String); method @Deprecated public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(String);
method public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(String, int); method @Deprecated public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannel(String, int);
method public String iccTransmitApduBasicChannel(int, int, int, int, int, String); method @Deprecated public String iccTransmitApduBasicChannel(int, int, int, int, int, String);
method public String iccTransmitApduLogicalChannel(int, int, int, int, int, int, String); method @Deprecated public String iccTransmitApduLogicalChannel(int, int, int, int, int, int, String);
method public boolean isConcurrentVoiceAndDataSupported(); method public boolean isConcurrentVoiceAndDataSupported();
method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean isDataEnabled(); method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.MODIFY_PHONE_STATE}) public boolean isDataEnabled();
method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isDataRoamingEnabled(); method @RequiresPermission(anyOf={android.Manifest.permission.ACCESS_NETWORK_STATE, android.Manifest.permission.READ_PHONE_STATE}) public boolean isDataRoamingEnabled();
@@ -45528,7 +45528,7 @@ package android.telephony {
method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void requestCellInfoUpdate(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.TelephonyManager.CellInfoCallback); method @RequiresPermission(android.Manifest.permission.ACCESS_FINE_LOCATION) public void requestCellInfoUpdate(@NonNull java.util.concurrent.Executor, @NonNull android.telephony.TelephonyManager.CellInfoCallback);
method @RequiresPermission(allOf={android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public android.telephony.NetworkScan requestNetworkScan(android.telephony.NetworkScanRequest, java.util.concurrent.Executor, android.telephony.TelephonyScanManager.NetworkScanCallback); method @RequiresPermission(allOf={android.Manifest.permission.MODIFY_PHONE_STATE, android.Manifest.permission.ACCESS_FINE_LOCATION}) public android.telephony.NetworkScan requestNetworkScan(android.telephony.NetworkScanRequest, java.util.concurrent.Executor, android.telephony.TelephonyScanManager.NetworkScanCallback);
method public void sendDialerSpecialCode(String); method public void sendDialerSpecialCode(String);
method public String sendEnvelopeWithStatus(String); method @Deprecated public String sendEnvelopeWithStatus(String);
method @RequiresPermission(android.Manifest.permission.CALL_PHONE) public void sendUssdRequest(String, android.telephony.TelephonyManager.UssdResponseCallback, android.os.Handler); method @RequiresPermission(android.Manifest.permission.CALL_PHONE) public void sendUssdRequest(String, android.telephony.TelephonyManager.UssdResponseCallback, android.os.Handler);
method public void sendVisualVoicemailSms(String, int, String, android.app.PendingIntent); method public void sendVisualVoicemailSms(String, int, String, android.app.PendingIntent);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataEnabled(boolean); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataEnabled(boolean);

View File

@@ -9108,10 +9108,10 @@ package android.telephony {
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getVoiceActivationState(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public int getVoiceActivationState();
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handlePinMmi(String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handlePinMmi(String);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handlePinMmiForSubscriber(int, String); method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean handlePinMmiForSubscriber(int, String);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean iccCloseLogicalChannelBySlot(int, int); method @Deprecated @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean iccCloseLogicalChannelBySlot(int, int);
method @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannelBySlot(int, @Nullable String, int); method @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.telephony.IccOpenLogicalChannelResponse iccOpenLogicalChannelBySlot(int, @Nullable String, int);
method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduBasicChannelBySlot(int, int, int, int, int, int, @Nullable String); method @Deprecated @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduBasicChannelBySlot(int, int, int, int, int, int, @Nullable String);
method @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduLogicalChannelBySlot(int, int, int, int, int, int, int, @Nullable String); method @Deprecated @Nullable @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public String iccTransmitApduLogicalChannelBySlot(int, int, int, int, int, int, int, @Nullable String);
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isAnyRadioPoweredOn(); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isAnyRadioPoweredOn();
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApplicationOnUicc(int); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public boolean isApplicationOnUicc(int);
method public boolean isDataConnectivityPossible(); method public boolean isDataConnectivityPossible();

View File

@@ -5737,7 +5737,10 @@ public class TelephonyManager {
* @param AID Application id. See ETSI 102.221 and 101.220. * @param AID Application id. See ETSI 102.221 and 101.220.
* @param p2 P2 parameter (described in ISO 7816-4). * @param p2 P2 parameter (described in ISO 7816-4).
* @return an IccOpenLogicalChannelResponse object. * @return an IccOpenLogicalChannelResponse object.
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public IccOpenLogicalChannelResponse iccOpenLogicalChannel(String AID, int p2) { public IccOpenLogicalChannelResponse iccOpenLogicalChannel(String AID, int p2) {
return iccOpenLogicalChannel(getSubId(), AID, p2); return iccOpenLogicalChannel(getSubId(), AID, p2);
} }
@@ -5768,7 +5771,10 @@ public class TelephonyManager {
* @param p2 P2 parameter (described in ISO 7816-4). * @param p2 P2 parameter (described in ISO 7816-4).
* @return an IccOpenLogicalChannelResponse object. * @return an IccOpenLogicalChannelResponse object.
* @hide * @hide
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID, int p2) { public IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID, int p2) {
try { try {
ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony();
@@ -5796,7 +5802,10 @@ public class TelephonyManager {
* iccOpenLogicalChannel. * iccOpenLogicalChannel.
* @return true if the channel was closed successfully. * @return true if the channel was closed successfully.
* @hide * @hide
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
@RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE) @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
@SystemApi @SystemApi
public boolean iccCloseLogicalChannelBySlot(int slotIndex, int channel) { public boolean iccCloseLogicalChannelBySlot(int slotIndex, int channel) {
@@ -5823,7 +5832,10 @@ public class TelephonyManager {
* @param channel is the channel id to be closed as returned by a successful * @param channel is the channel id to be closed as returned by a successful
* iccOpenLogicalChannel. * iccOpenLogicalChannel.
* @return true if the channel was closed successfully. * @return true if the channel was closed successfully.
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public boolean iccCloseLogicalChannel(int channel) { public boolean iccCloseLogicalChannel(int channel) {
return iccCloseLogicalChannel(getSubId(), channel); return iccCloseLogicalChannel(getSubId(), channel);
} }
@@ -5842,7 +5854,10 @@ public class TelephonyManager {
* iccOpenLogicalChannel. * iccOpenLogicalChannel.
* @return true if the channel was closed successfully. * @return true if the channel was closed successfully.
* @hide * @hide
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public boolean iccCloseLogicalChannel(int subId, int channel) { public boolean iccCloseLogicalChannel(int subId, int channel) {
try { try {
ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony();
@@ -5878,7 +5893,10 @@ public class TelephonyManager {
* @return The APDU response from the ICC card with the status appended at the end, or null if * @return The APDU response from the ICC card with the status appended at the end, or null if
* there is an issue connecting to the Telephony service. * there is an issue connecting to the Telephony service.
* @hide * @hide
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
@RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE) @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
@SystemApi @SystemApi
@Nullable @Nullable
@@ -5916,7 +5934,10 @@ public class TelephonyManager {
* @param data Data to be sent with the APDU. * @param data Data to be sent with the APDU.
* @return The APDU response from the ICC card with the status appended at * @return The APDU response from the ICC card with the status appended at
* the end. * the end.
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public String iccTransmitApduLogicalChannel(int channel, int cla, public String iccTransmitApduLogicalChannel(int channel, int cla,
int instruction, int p1, int p2, int p3, String data) { int instruction, int p1, int p2, int p3, String data) {
return iccTransmitApduLogicalChannel(getSubId(), channel, cla, return iccTransmitApduLogicalChannel(getSubId(), channel, cla,
@@ -5945,7 +5966,10 @@ public class TelephonyManager {
* @return The APDU response from the ICC card with the status appended at * @return The APDU response from the ICC card with the status appended at
* the end. * the end.
* @hide * @hide
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public String iccTransmitApduLogicalChannel(int subId, int channel, int cla, public String iccTransmitApduLogicalChannel(int subId, int channel, int cla,
int instruction, int p1, int p2, int p3, String data) { int instruction, int p1, int p2, int p3, String data) {
try { try {
@@ -5981,7 +6005,10 @@ public class TelephonyManager {
* @return The APDU response from the ICC card with the status appended at * @return The APDU response from the ICC card with the status appended at
* the end. * the end.
* @hide * @hide
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
@RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE) @RequiresPermission(Manifest.permission.MODIFY_PHONE_STATE)
@SystemApi @SystemApi
@NonNull @NonNull
@@ -6017,7 +6044,10 @@ public class TelephonyManager {
* @param data Data to be sent with the APDU. * @param data Data to be sent with the APDU.
* @return The APDU response from the ICC card with the status appended at * @return The APDU response from the ICC card with the status appended at
* the end. * the end.
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public String iccTransmitApduBasicChannel(int cla, public String iccTransmitApduBasicChannel(int cla,
int instruction, int p1, int p2, int p3, String data) { int instruction, int p1, int p2, int p3, String data) {
return iccTransmitApduBasicChannel(getSubId(), cla, return iccTransmitApduBasicChannel(getSubId(), cla,
@@ -6044,7 +6074,10 @@ public class TelephonyManager {
* @return The APDU response from the ICC card with the status appended at * @return The APDU response from the ICC card with the status appended at
* the end. * the end.
* @hide * @hide
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public String iccTransmitApduBasicChannel(int subId, int cla, public String iccTransmitApduBasicChannel(int subId, int cla,
int instruction, int p1, int p2, int p3, String data) { int instruction, int p1, int p2, int p3, String data) {
try { try {
@@ -6072,7 +6105,10 @@ public class TelephonyManager {
* @param p3 P3 value of the APDU command. * @param p3 P3 value of the APDU command.
* @param filePath * @param filePath
* @return The APDU response. * @return The APDU response.
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public byte[] iccExchangeSimIO(int fileID, int command, int p1, int p2, int p3, public byte[] iccExchangeSimIO(int fileID, int command, int p1, int p2, int p3,
String filePath) { String filePath) {
return iccExchangeSimIO(getSubId(), fileID, command, p1, p2, p3, filePath); return iccExchangeSimIO(getSubId(), fileID, command, p1, p2, p3, filePath);
@@ -6094,7 +6130,10 @@ public class TelephonyManager {
* @param filePath * @param filePath
* @return The APDU response. * @return The APDU response.
* @hide * @hide
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public byte[] iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2, public byte[] iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2,
int p3, String filePath) { int p3, String filePath) {
try { try {
@@ -6120,7 +6159,10 @@ public class TelephonyManager {
* @return The APDU response from the ICC card in hexadecimal format * @return The APDU response from the ICC card in hexadecimal format
* with the last 4 bytes being the status word. If the command fails, * with the last 4 bytes being the status word. If the command fails,
* returns an empty string. * returns an empty string.
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public String sendEnvelopeWithStatus(String content) { public String sendEnvelopeWithStatus(String content) {
return sendEnvelopeWithStatus(getSubId(), content); return sendEnvelopeWithStatus(getSubId(), content);
} }
@@ -6140,7 +6182,10 @@ public class TelephonyManager {
* with the last 4 bytes being the status word. If the command fails, * with the last 4 bytes being the status word. If the command fails,
* returns an empty string. * returns an empty string.
* @hide * @hide
* @deprecated Use {@link android.se.omapi.SEService} APIs instead.
*/ */
// TODO(b/147153909): Update Javadoc to link to specific SEService API once integrated.
@Deprecated
public String sendEnvelopeWithStatus(int subId, String content) { public String sendEnvelopeWithStatus(int subId, String content) {
try { try {
ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony();