use of android.telephony.UiccAccessRule in project android_frameworks_opt_telephony by LineageOS.
the class EuiccControllerTest method prepareOperationSubscription.
private void prepareOperationSubscription(boolean hasPrivileges) throws Exception {
SubscriptionInfo subInfo = new SubscriptionInfo(SUBSCRIPTION_ID, ICC_ID, 0, "", "", 0, 0, "", 0, null, "0", "0", "", true, /* isEmbedded */
hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, null);
when(mSubscriptionManager.canManageSubscription(subInfo, PACKAGE_NAME)).thenReturn(hasPrivileges);
when(mSubscriptionManager.getAvailableSubscriptionInfoList()).thenReturn(Collections.singletonList(subInfo));
}
Aggregations