use of com.android.internal.telephony.uicc.euicc.EuiccCard in project android_frameworks_opt_telephony by LineageOS.
the class EuiccCardController method loadBoundProfilePackage.
@Override
public void loadBoundProfilePackage(String callingPackage, String cardId, byte[] boundProfilePackage, ILoadBoundProfilePackageCallback callback) {
try {
checkCallingPackage(callingPackage);
} catch (SecurityException se) {
try {
callback.onComplete(EuiccCardManager.RESULT_CALLER_NOT_ALLOWED, null);
} catch (RemoteException re) {
loge("callback onComplete failure after checkCallingPackage.", re);
}
return;
}
EuiccCard card = getEuiccCard(cardId);
if (card == null) {
try {
callback.onComplete(EuiccCardManager.RESULT_EUICC_NOT_FOUND, null);
} catch (RemoteException exception) {
loge("loadBoundProfilePackage callback failure.", exception);
}
return;
}
AsyncResultCallback<byte[]> cardCb = new AsyncResultCallback<byte[]>() {
@Override
public void onResult(byte[] result) {
Log.i(TAG, "Request subscription info list refresh after install.");
SubscriptionController.getInstance().requestEmbeddedSubscriptionInfoListRefresh(mUiccController.convertToPublicCardId(cardId));
try {
callback.onComplete(EuiccCardManager.RESULT_OK, result);
} catch (RemoteException exception) {
loge("loadBoundProfilePackage callback failure.", exception);
}
}
@Override
public void onException(Throwable e) {
try {
loge("loadBoundProfilePackage callback onException: ", e);
callback.onComplete(getResultCode(e), null);
} catch (RemoteException exception) {
loge("loadBoundProfilePackage callback failure.", exception);
}
}
};
card.loadBoundProfilePackage(boundProfilePackage, cardCb, mEuiccMainThreadHandler);
}
use of com.android.internal.telephony.uicc.euicc.EuiccCard in project android_frameworks_opt_telephony by LineageOS.
the class EuiccCardController method deleteProfile.
@Override
public void deleteProfile(String callingPackage, String cardId, String iccid, IDeleteProfileCallback callback) {
try {
checkCallingPackage(callingPackage);
} catch (SecurityException se) {
try {
callback.onComplete(EuiccCardManager.RESULT_CALLER_NOT_ALLOWED);
} catch (RemoteException re) {
loge("callback onComplete failure after checkCallingPackage.", re);
}
return;
}
EuiccCard card = getEuiccCard(cardId);
if (card == null) {
try {
callback.onComplete(EuiccCardManager.RESULT_EUICC_NOT_FOUND);
} catch (RemoteException exception) {
loge("deleteProfile callback failure.", exception);
}
return;
}
AsyncResultCallback<Void> cardCb = new AsyncResultCallback<Void>() {
@Override
public void onResult(Void result) {
Log.i(TAG, "Request subscription info list refresh after delete.");
SubscriptionController.getInstance().requestEmbeddedSubscriptionInfoListRefresh(mUiccController.convertToPublicCardId(cardId));
try {
callback.onComplete(EuiccCardManager.RESULT_OK);
} catch (RemoteException exception) {
loge("deleteProfile callback failure.", exception);
}
}
@Override
public void onException(Throwable e) {
try {
loge("deleteProfile callback onException: ", e);
callback.onComplete(getResultCode(e));
} catch (RemoteException exception) {
loge("deleteProfile callback failure.", exception);
}
}
};
card.deleteProfile(iccid, cardCb, mEuiccMainThreadHandler);
}
use of com.android.internal.telephony.uicc.euicc.EuiccCard in project android_frameworks_opt_telephony by LineageOS.
the class EuiccCardController method getRulesAuthTable.
@Override
public void getRulesAuthTable(String callingPackage, String cardId, IGetRulesAuthTableCallback callback) {
try {
checkCallingPackage(callingPackage);
} catch (SecurityException se) {
try {
callback.onComplete(EuiccCardManager.RESULT_CALLER_NOT_ALLOWED, null);
} catch (RemoteException re) {
loge("callback onComplete failure after checkCallingPackage.", re);
}
return;
}
EuiccCard card = getEuiccCard(cardId);
if (card == null) {
try {
callback.onComplete(EuiccCardManager.RESULT_EUICC_NOT_FOUND, null);
} catch (RemoteException exception) {
loge("getRulesAuthTable callback failure.", exception);
}
return;
}
AsyncResultCallback<EuiccRulesAuthTable> cardCb = new AsyncResultCallback<EuiccRulesAuthTable>() {
@Override
public void onResult(EuiccRulesAuthTable result) {
try {
callback.onComplete(EuiccCardManager.RESULT_OK, result);
} catch (RemoteException exception) {
loge("getRulesAuthTable callback failure.", exception);
}
}
@Override
public void onException(Throwable e) {
try {
loge("getRulesAuthTable callback onException: ", e);
callback.onComplete(getResultCode(e), null);
} catch (RemoteException exception) {
loge("getRulesAuthTable callback failure.", exception);
}
}
};
card.getRulesAuthTable(cardCb, mEuiccMainThreadHandler);
}
use of com.android.internal.telephony.uicc.euicc.EuiccCard in project android_frameworks_opt_telephony by LineageOS.
the class EuiccCardController method listNotifications.
@Override
public void listNotifications(String callingPackage, String cardId, @EuiccNotification.Event int events, IListNotificationsCallback callback) {
try {
checkCallingPackage(callingPackage);
} catch (SecurityException se) {
try {
callback.onComplete(EuiccCardManager.RESULT_CALLER_NOT_ALLOWED, null);
} catch (RemoteException re) {
loge("callback onComplete failure after checkCallingPackage.", re);
}
return;
}
EuiccCard card = getEuiccCard(cardId);
if (card == null) {
try {
callback.onComplete(EuiccCardManager.RESULT_EUICC_NOT_FOUND, null);
} catch (RemoteException exception) {
loge("listNotifications callback failure.", exception);
}
return;
}
AsyncResultCallback<EuiccNotification[]> cardCb = new AsyncResultCallback<EuiccNotification[]>() {
@Override
public void onResult(EuiccNotification[] result) {
try {
callback.onComplete(EuiccCardManager.RESULT_OK, result);
} catch (RemoteException exception) {
loge("listNotifications callback failure.", exception);
}
}
@Override
public void onException(Throwable e) {
try {
loge("listNotifications callback onException: ", e);
callback.onComplete(getResultCode(e), null);
} catch (RemoteException exception) {
loge("listNotifications callback failure.", exception);
}
}
};
card.listNotifications(events, cardCb, mEuiccMainThreadHandler);
}
use of com.android.internal.telephony.uicc.euicc.EuiccCard in project android_frameworks_opt_telephony by LineageOS.
the class EuiccCardController method getEuiccInfo2.
@Override
public void getEuiccInfo2(String callingPackage, String cardId, IGetEuiccInfo2Callback callback) {
try {
checkCallingPackage(callingPackage);
} catch (SecurityException se) {
try {
callback.onComplete(EuiccCardManager.RESULT_CALLER_NOT_ALLOWED, null);
} catch (RemoteException re) {
loge("callback onComplete failure after checkCallingPackage.", re);
}
return;
}
EuiccCard card = getEuiccCard(cardId);
if (card == null) {
try {
callback.onComplete(EuiccCardManager.RESULT_EUICC_NOT_FOUND, null);
} catch (RemoteException exception) {
loge("getEuiccInfo2 callback failure.", exception);
}
return;
}
AsyncResultCallback<byte[]> cardCb = new AsyncResultCallback<byte[]>() {
@Override
public void onResult(byte[] result) {
try {
callback.onComplete(EuiccCardManager.RESULT_OK, result);
} catch (RemoteException exception) {
loge("getEuiccInfo2 callback failure.", exception);
}
}
@Override
public void onException(Throwable e) {
try {
loge("getEuiccInfo2 callback onException: ", e);
callback.onComplete(getResultCode(e), null);
} catch (RemoteException exception) {
loge("getEuiccInfo2 callback failure.", exception);
}
}
};
card.getEuiccInfo2(cardCb, mEuiccMainThreadHandler);
}
Aggregations