Merge "[MEP] Do not pass portIndex to disableProfile, derive portIndex from the passing iccid. Partially revert T API change ag/15808958, disableProfile remains unchanged for Android T"
This commit is contained in:
committed by
Android (Google) Code Review
commit
cbd1703d70
@@ -13307,8 +13307,7 @@ package android.telephony.euicc {
|
||||
method public void authenticateServer(String, String, byte[], byte[], byte[], byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>);
|
||||
method public void cancelSession(String, byte[], @android.telephony.euicc.EuiccCardManager.CancelReason int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>);
|
||||
method public void deleteProfile(String, String, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>);
|
||||
method @Deprecated public void disableProfile(String, String, boolean, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>);
|
||||
method public void disableProfile(@Nullable String, @Nullable String, int, boolean, @NonNull java.util.concurrent.Executor, @NonNull android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>);
|
||||
method public void disableProfile(String, String, boolean, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<java.lang.Void>);
|
||||
method public void listNotifications(String, @android.telephony.euicc.EuiccNotification.Event int, java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<android.telephony.euicc.EuiccNotification[]>);
|
||||
method public void loadBoundProfilePackage(String, byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>);
|
||||
method public void prepareDownload(String, @Nullable byte[], byte[], byte[], byte[], java.util.concurrent.Executor, android.telephony.euicc.EuiccCardManager.ResultCallback<byte[]>);
|
||||
|
||||
@@ -262,48 +262,12 @@ public class EuiccCardManager {
|
||||
* @param refresh Whether sending the REFRESH command to modem.
|
||||
* @param executor The executor through which the callback should be invoked.
|
||||
* @param callback The callback to get the result code.
|
||||
* @deprecated instead use {@link #disableProfile(String, String, int, boolean, Executor,
|
||||
* ResultCallback)}
|
||||
*/
|
||||
@Deprecated
|
||||
public void disableProfile(String cardId, String iccid, boolean refresh,
|
||||
@CallbackExecutor Executor executor, ResultCallback<Void> callback) {
|
||||
try {
|
||||
getIEuiccCardController().disableProfile(mContext.getOpPackageName(), cardId, iccid,
|
||||
TelephonyManager.DEFAULT_PORT_INDEX, refresh,
|
||||
new IDisableProfileCallback.Stub() {
|
||||
@Override
|
||||
public void onComplete(int resultCode) {
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
executor.execute(() -> callback.onComplete(resultCode, null));
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
});
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Error calling disableProfile", e);
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables the profile of the given ICCID.
|
||||
*
|
||||
* @param cardId The Id of the eUICC.
|
||||
* @param iccid The iccid of the profile.
|
||||
* @param portIndex the Port index is the unique index referring to a port.
|
||||
* @param refresh Whether sending the REFRESH command to modem.
|
||||
* @param executor The executor through which the callback should be invoked.
|
||||
* @param callback The callback to get the result code.
|
||||
*/
|
||||
public void disableProfile(@Nullable String cardId, @Nullable String iccid, int portIndex,
|
||||
boolean refresh, @NonNull @CallbackExecutor Executor executor,
|
||||
@NonNull ResultCallback<Void> callback) {
|
||||
try {
|
||||
getIEuiccCardController().disableProfile(mContext.getOpPackageName(), cardId, iccid,
|
||||
portIndex, refresh, new IDisableProfileCallback.Stub() {
|
||||
refresh, new IDisableProfileCallback.Stub() {
|
||||
@Override
|
||||
public void onComplete(int resultCode) {
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
|
||||
@@ -47,8 +47,8 @@ interface IEuiccCardController {
|
||||
in IGetProfileCallback callback);
|
||||
oneway void getEnabledProfile(String callingPackage, String cardId, int portIndex,
|
||||
in IGetProfileCallback callback);
|
||||
oneway void disableProfile(String callingPackage, String cardId, String iccid, int portIndex,
|
||||
boolean refresh, in IDisableProfileCallback callback);
|
||||
oneway void disableProfile(String callingPackage, String cardId, String iccid, boolean refresh,
|
||||
in IDisableProfileCallback callback);
|
||||
oneway void switchToProfile(String callingPackage, String cardId, String iccid, int portIndex,
|
||||
boolean refresh, in ISwitchToProfileCallback callback);
|
||||
oneway void setNickname(String callingPackage, String cardId, String iccid, String nickname,
|
||||
|
||||
Reference in New Issue
Block a user