Search in sources :

Example 16 with UiccAccessRule

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));
}
Also used : UiccAccessRule(android.telephony.UiccAccessRule) SubscriptionInfo(android.telephony.SubscriptionInfo)

Aggregations

UiccAccessRule (android.telephony.UiccAccessRule)16 SubscriptionInfo (android.telephony.SubscriptionInfo)6 ArrayList (java.util.ArrayList)4 ContentValues (android.content.ContentValues)3 EuiccProfileInfo (android.service.euicc.EuiccProfileInfo)2 Test (org.junit.Test)2 Nullable (android.annotation.Nullable)1 UnsupportedAppUsage (android.compat.annotation.UnsupportedAppUsage)1 ContentResolver (android.content.ContentResolver)1 PackageInfo (android.content.pm.PackageInfo)1 PackageManager (android.content.pm.PackageManager)1 Bitmap (android.graphics.Bitmap)1 AsyncResult (android.os.AsyncResult)1 ParcelUuid (android.os.ParcelUuid)1 PersistableBundle (android.os.PersistableBundle)1 CarrierIdentifier (android.service.carrier.CarrierIdentifier)1 UiccCardInfo (android.telephony.UiccCardInfo)1 MockContentResolver (android.test.mock.MockContentResolver)1 SmallTest (android.test.suitebuilder.annotation.SmallTest)1 ArraySet (android.util.ArraySet)1