Loading src/java/com/android/internal/telephony/SubscriptionController.java +46 −6 Original line number Original line Diff line number Diff line Loading @@ -161,7 +161,8 @@ public class SubscriptionController extends ISub.Stub { SubscriptionManager.WFC_IMS_ROAMING_ENABLED, SubscriptionManager.WFC_IMS_ROAMING_ENABLED, SubscriptionManager.DATA_ROAMING, SubscriptionManager.DATA_ROAMING, SubscriptionManager.DISPLAY_NAME, SubscriptionManager.DISPLAY_NAME, SubscriptionManager.DATA_ENABLED_OVERRIDE_RULES)); SubscriptionManager.DATA_ENABLED_OVERRIDE_RULES, SubscriptionManager.UICC_APPLICATIONS_ENABLED)); public static SubscriptionController init(Context c) { public static SubscriptionController init(Context c) { synchronized (SubscriptionController.class) { synchronized (SubscriptionController.class) { Loading Loading @@ -365,6 +366,8 @@ public class SubscriptionController extends ISub.Stub { SubscriptionManager.SUBSCRIPTION_TYPE)); SubscriptionManager.SUBSCRIPTION_TYPE)); String groupOwner = getOptionalStringFromCursor(cursor, SubscriptionManager.GROUP_OWNER, String groupOwner = getOptionalStringFromCursor(cursor, SubscriptionManager.GROUP_OWNER, /*defaultVal*/ null); /*defaultVal*/ null); boolean areUiccApplicationsEnabled = cursor.getInt(cursor.getColumnIndexOrThrow( SubscriptionManager.UICC_APPLICATIONS_ENABLED)) == 1; if (VDBG) { if (VDBG) { String iccIdToPrint = SubscriptionInfo.givePrintableIccid(iccId); String iccIdToPrint = SubscriptionInfo.givePrintableIccid(iccId); Loading @@ -379,7 +382,8 @@ public class SubscriptionController extends ISub.Stub { + " cardId:" + cardIdToPrint + " publicCardId:" + publicCardId + " cardId:" + cardIdToPrint + " publicCardId:" + publicCardId + " isOpportunistic:" + isOpportunistic + " groupUUID:" + groupUUID + " isOpportunistic:" + isOpportunistic + " groupUUID:" + groupUUID + " profileClass:" + profileClass + " subscriptionType: " + subType + " profileClass:" + profileClass + " subscriptionType: " + subType + " carrierConfigAccessRules:" + carrierConfigAccessRules); + " carrierConfigAccessRules:" + carrierConfigAccessRules + " areUiccApplicationsEnabled: " + areUiccApplicationsEnabled); } } // If line1number has been set to a different number, use it instead. // If line1number has been set to a different number, use it instead. Loading @@ -391,7 +395,7 @@ public class SubscriptionController extends ISub.Stub { carrierName, nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, carrierName, nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso, isEmbedded, accessRules, cardId, publicCardId, isOpportunistic, countryIso, isEmbedded, accessRules, cardId, publicCardId, isOpportunistic, groupUUID, false /* isGroupDisabled */, carrierId, profileClass, subType, groupUUID, false /* isGroupDisabled */, carrierId, profileClass, subType, groupOwner, carrierConfigAccessRules); groupOwner, carrierConfigAccessRules, areUiccApplicationsEnabled); info.setAssociatedPlmns(ehplmns, hplmns); info.setAssociatedPlmns(ehplmns, hplmns); return info; return info; } } Loading @@ -402,6 +406,17 @@ public class SubscriptionController extends ISub.Stub { return (columnIndex == -1) ? defaultVal : cursor.getString(columnIndex); return (columnIndex == -1) ? defaultVal : cursor.getString(columnIndex); } } /** * Get a subscription that matches IccId. * @return null if there isn't a match, or subscription info if there is one. */ public SubscriptionInfo getSubInfoForIccId(String iccId) { List<SubscriptionInfo> info = getSubInfo(SubscriptionManager.ICC_ID + "=" + iccId, null); if (info == null || info.size() == 0) return null; // Should be at most one subscription with the iccid. return info.get(0); } /** /** * Query SubInfoRecord(s) from subinfo database * Query SubInfoRecord(s) from subinfo database * @param selection A filter declaring which rows to return * @param selection A filter declaring which rows to return Loading Loading @@ -1869,6 +1884,33 @@ public class SubscriptionController extends ISub.Stub { return result; return result; } } /** * Set uicc applications being enabled or disabled. * @param enabled whether uicc applications are enabled or disabled. * @return the number of records updated */ public int setUiccApplicationsEnabled(boolean enabled, int subId) { if (DBG) logd("[setUiccApplicationsEnabled]+ enabled:" + enabled + " subId:" + subId); ContentValues value = new ContentValues(1); value.put(SubscriptionManager.UICC_APPLICATIONS_ENABLED, enabled); int result = mContext.getContentResolver().update( SubscriptionManager.getUriForSubscriptionId(subId), value, null, null); // Refresh the Cache of Active Subscription Info List refreshCachedActiveSubscriptionInfoList(); notifySubscriptionInfoChanged(); if (isActiveSubId(subId)) { Phone phone = PhoneFactory.getPhone(getPhoneId(subId)); phone.enableUiccApplications(enabled, null); } return result; } /** /** * Get IMSI by subscription ID * Get IMSI by subscription ID * For active subIds, this will always return the corresponding imsi * For active subIds, this will always return the corresponding imsi Loading Loading @@ -3389,9 +3431,7 @@ public class SubscriptionController extends ISub.Stub { return true; return true; } else { } else { // Enable / disable uicc applications. // Enable / disable uicc applications. Phone phone = PhoneFactory.getPhone(slotInfo.getLogicalSlotIdx()); setUiccApplicationsEnabled(enable, subId); if (phone == null) return false; phone.enableUiccApplications(enable, null); return true; return true; } } } } Loading src/java/com/android/internal/telephony/uicc/UiccController.java +4 −5 Original line number Original line Diff line number Diff line Loading @@ -450,12 +450,11 @@ public class UiccController extends Handler { @UnsupportedAppUsage @UnsupportedAppUsage public void registerForIccChanged(Handler h, int what, Object obj) { public void registerForIccChanged(Handler h, int what, Object obj) { synchronized (mLock) { synchronized (mLock) { Registrant r = new Registrant (h, what, obj); mIccChangedRegistrants.addUnique(h, what, obj); mIccChangedRegistrants.add(r); } //Notify registrant right after registering, so that it will get the latest ICC status, //Notify registrant right after registering, so that it will get the latest ICC status, //otherwise which may not happen until there is an actual change in ICC status. //otherwise which may not happen until there is an actual change in ICC status. r.notifyRegistrant(); Message.obtain(h, what, new AsyncResult(obj, null, null)).sendToTarget(); } } } public void unregisterForIccChanged(Handler h) { public void unregisterForIccChanged(Handler h) { Loading tests/telephonytests/src/com/android/internal/telephony/FakeTelephonyProvider.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -111,7 +111,8 @@ public class FakeTelephonyProvider extends MockContentProvider { + SubscriptionManager.GROUP_OWNER + " TEXT," + SubscriptionManager.GROUP_OWNER + " TEXT," + SubscriptionManager.DATA_ENABLED_OVERRIDE_RULES + " TEXT," + SubscriptionManager.DATA_ENABLED_OVERRIDE_RULES + " TEXT," + SubscriptionManager.IMSI + " TEXT," + SubscriptionManager.IMSI + " TEXT," + SubscriptionManager.ACCESS_RULES_FROM_CARRIER_CONFIGS + " BLOB" + SubscriptionManager.ACCESS_RULES_FROM_CARRIER_CONFIGS + " BLOB," + SubscriptionManager.UICC_APPLICATIONS_ENABLED + " INTEGER DEFAULT 1" + ");"; + ");"; } } Loading tests/telephonytests/src/com/android/internal/telephony/MultiSimSettingControllerTest.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -86,19 +86,19 @@ public class MultiSimSettingControllerTest extends TelephonyTest { "T-mobile", 0, 255, "12345", 0, null, "310", "260", "T-mobile", 0, 255, "12345", 0, null, "310", "260", "156", false, null, null, -1, false, mGroupUuid1.toString(), false, "156", false, null, null, -1, false, mGroupUuid1.toString(), false, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null); SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null, true); private SubscriptionInfo mSubInfo3 = new SubscriptionInfo(3, "subInfo3 IccId", -1, "T-mobile", private SubscriptionInfo mSubInfo3 = new SubscriptionInfo(3, "subInfo3 IccId", -1, "T-mobile", "T-mobile", 0, 255, "12345", 0, null, "310", "260", "T-mobile", 0, 255, "12345", 0, null, "310", "260", "156", false, null, null, -1, false, mGroupUuid1.toString(), false, "156", false, null, null, -1, false, mGroupUuid1.toString(), false, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null); SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null, true); private SubscriptionInfo mSubInfo4 = new SubscriptionInfo(4, "subInfo4 IccId", -1, "T-mobile", private SubscriptionInfo mSubInfo4 = new SubscriptionInfo(4, "subInfo4 IccId", -1, "T-mobile", "T-mobile", 0, 255, "12345", 0, null, "310", "260", "T-mobile", 0, 255, "12345", 0, null, "310", "260", "156", false, null, null, -1, false, mGroupUuid1.toString(), false, "156", false, null, null, -1, false, mGroupUuid1.toString(), false, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null); SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null, true); @Before @Before public void setUp() throws Exception { public void setUp() throws Exception { Loading tests/telephonytests/src/com/android/internal/telephony/euicc/EuiccControllerTest.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -1082,7 +1082,7 @@ public class EuiccControllerTest extends TelephonyTest { SubscriptionInfo subInfo = new SubscriptionInfo( SubscriptionInfo subInfo = new SubscriptionInfo( 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", CARD_ID, hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", CARD_ID, false, null, false, 0, 0, 0, null, null); false, null, false, 0, 0, 0, null, null, true); when(mSubscriptionManager.canManageSubscription(subInfo, PACKAGE_NAME)).thenReturn( when(mSubscriptionManager.canManageSubscription(subInfo, PACKAGE_NAME)).thenReturn( hasPrivileges); hasPrivileges); when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn( when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn( Loading @@ -1103,11 +1103,11 @@ public class EuiccControllerTest extends TelephonyTest { SubscriptionInfo subInfo1 = new SubscriptionInfo( SubscriptionInfo subInfo1 = new SubscriptionInfo( 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", CARD_ID, hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", CARD_ID, false, null, false, 0, 0, 0, null, null); false, null, false, 0, 0, 0, null, null, true); SubscriptionInfo subInfo2 = new SubscriptionInfo( SubscriptionInfo subInfo2 = new SubscriptionInfo( 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", 1 /* cardId */, false, null, false, 0, 0, 0, null, null); 1 /* cardId */, false, null, false, 0, 0, 0, null, null, true); when(mSubscriptionManager.canManageSubscription(subInfo1, PACKAGE_NAME)).thenReturn( when(mSubscriptionManager.canManageSubscription(subInfo1, PACKAGE_NAME)).thenReturn( hasPrivileges); hasPrivileges); when(mSubscriptionManager.canManageSubscription(subInfo2, PACKAGE_NAME)).thenReturn( when(mSubscriptionManager.canManageSubscription(subInfo2, PACKAGE_NAME)).thenReturn( Loading Loading
src/java/com/android/internal/telephony/SubscriptionController.java +46 −6 Original line number Original line Diff line number Diff line Loading @@ -161,7 +161,8 @@ public class SubscriptionController extends ISub.Stub { SubscriptionManager.WFC_IMS_ROAMING_ENABLED, SubscriptionManager.WFC_IMS_ROAMING_ENABLED, SubscriptionManager.DATA_ROAMING, SubscriptionManager.DATA_ROAMING, SubscriptionManager.DISPLAY_NAME, SubscriptionManager.DISPLAY_NAME, SubscriptionManager.DATA_ENABLED_OVERRIDE_RULES)); SubscriptionManager.DATA_ENABLED_OVERRIDE_RULES, SubscriptionManager.UICC_APPLICATIONS_ENABLED)); public static SubscriptionController init(Context c) { public static SubscriptionController init(Context c) { synchronized (SubscriptionController.class) { synchronized (SubscriptionController.class) { Loading Loading @@ -365,6 +366,8 @@ public class SubscriptionController extends ISub.Stub { SubscriptionManager.SUBSCRIPTION_TYPE)); SubscriptionManager.SUBSCRIPTION_TYPE)); String groupOwner = getOptionalStringFromCursor(cursor, SubscriptionManager.GROUP_OWNER, String groupOwner = getOptionalStringFromCursor(cursor, SubscriptionManager.GROUP_OWNER, /*defaultVal*/ null); /*defaultVal*/ null); boolean areUiccApplicationsEnabled = cursor.getInt(cursor.getColumnIndexOrThrow( SubscriptionManager.UICC_APPLICATIONS_ENABLED)) == 1; if (VDBG) { if (VDBG) { String iccIdToPrint = SubscriptionInfo.givePrintableIccid(iccId); String iccIdToPrint = SubscriptionInfo.givePrintableIccid(iccId); Loading @@ -379,7 +382,8 @@ public class SubscriptionController extends ISub.Stub { + " cardId:" + cardIdToPrint + " publicCardId:" + publicCardId + " cardId:" + cardIdToPrint + " publicCardId:" + publicCardId + " isOpportunistic:" + isOpportunistic + " groupUUID:" + groupUUID + " isOpportunistic:" + isOpportunistic + " groupUUID:" + groupUUID + " profileClass:" + profileClass + " subscriptionType: " + subType + " profileClass:" + profileClass + " subscriptionType: " + subType + " carrierConfigAccessRules:" + carrierConfigAccessRules); + " carrierConfigAccessRules:" + carrierConfigAccessRules + " areUiccApplicationsEnabled: " + areUiccApplicationsEnabled); } } // If line1number has been set to a different number, use it instead. // If line1number has been set to a different number, use it instead. Loading @@ -391,7 +395,7 @@ public class SubscriptionController extends ISub.Stub { carrierName, nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, carrierName, nameSource, iconTint, number, dataRoaming, iconBitmap, mcc, mnc, countryIso, isEmbedded, accessRules, cardId, publicCardId, isOpportunistic, countryIso, isEmbedded, accessRules, cardId, publicCardId, isOpportunistic, groupUUID, false /* isGroupDisabled */, carrierId, profileClass, subType, groupUUID, false /* isGroupDisabled */, carrierId, profileClass, subType, groupOwner, carrierConfigAccessRules); groupOwner, carrierConfigAccessRules, areUiccApplicationsEnabled); info.setAssociatedPlmns(ehplmns, hplmns); info.setAssociatedPlmns(ehplmns, hplmns); return info; return info; } } Loading @@ -402,6 +406,17 @@ public class SubscriptionController extends ISub.Stub { return (columnIndex == -1) ? defaultVal : cursor.getString(columnIndex); return (columnIndex == -1) ? defaultVal : cursor.getString(columnIndex); } } /** * Get a subscription that matches IccId. * @return null if there isn't a match, or subscription info if there is one. */ public SubscriptionInfo getSubInfoForIccId(String iccId) { List<SubscriptionInfo> info = getSubInfo(SubscriptionManager.ICC_ID + "=" + iccId, null); if (info == null || info.size() == 0) return null; // Should be at most one subscription with the iccid. return info.get(0); } /** /** * Query SubInfoRecord(s) from subinfo database * Query SubInfoRecord(s) from subinfo database * @param selection A filter declaring which rows to return * @param selection A filter declaring which rows to return Loading Loading @@ -1869,6 +1884,33 @@ public class SubscriptionController extends ISub.Stub { return result; return result; } } /** * Set uicc applications being enabled or disabled. * @param enabled whether uicc applications are enabled or disabled. * @return the number of records updated */ public int setUiccApplicationsEnabled(boolean enabled, int subId) { if (DBG) logd("[setUiccApplicationsEnabled]+ enabled:" + enabled + " subId:" + subId); ContentValues value = new ContentValues(1); value.put(SubscriptionManager.UICC_APPLICATIONS_ENABLED, enabled); int result = mContext.getContentResolver().update( SubscriptionManager.getUriForSubscriptionId(subId), value, null, null); // Refresh the Cache of Active Subscription Info List refreshCachedActiveSubscriptionInfoList(); notifySubscriptionInfoChanged(); if (isActiveSubId(subId)) { Phone phone = PhoneFactory.getPhone(getPhoneId(subId)); phone.enableUiccApplications(enabled, null); } return result; } /** /** * Get IMSI by subscription ID * Get IMSI by subscription ID * For active subIds, this will always return the corresponding imsi * For active subIds, this will always return the corresponding imsi Loading Loading @@ -3389,9 +3431,7 @@ public class SubscriptionController extends ISub.Stub { return true; return true; } else { } else { // Enable / disable uicc applications. // Enable / disable uicc applications. Phone phone = PhoneFactory.getPhone(slotInfo.getLogicalSlotIdx()); setUiccApplicationsEnabled(enable, subId); if (phone == null) return false; phone.enableUiccApplications(enable, null); return true; return true; } } } } Loading
src/java/com/android/internal/telephony/uicc/UiccController.java +4 −5 Original line number Original line Diff line number Diff line Loading @@ -450,12 +450,11 @@ public class UiccController extends Handler { @UnsupportedAppUsage @UnsupportedAppUsage public void registerForIccChanged(Handler h, int what, Object obj) { public void registerForIccChanged(Handler h, int what, Object obj) { synchronized (mLock) { synchronized (mLock) { Registrant r = new Registrant (h, what, obj); mIccChangedRegistrants.addUnique(h, what, obj); mIccChangedRegistrants.add(r); } //Notify registrant right after registering, so that it will get the latest ICC status, //Notify registrant right after registering, so that it will get the latest ICC status, //otherwise which may not happen until there is an actual change in ICC status. //otherwise which may not happen until there is an actual change in ICC status. r.notifyRegistrant(); Message.obtain(h, what, new AsyncResult(obj, null, null)).sendToTarget(); } } } public void unregisterForIccChanged(Handler h) { public void unregisterForIccChanged(Handler h) { Loading
tests/telephonytests/src/com/android/internal/telephony/FakeTelephonyProvider.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -111,7 +111,8 @@ public class FakeTelephonyProvider extends MockContentProvider { + SubscriptionManager.GROUP_OWNER + " TEXT," + SubscriptionManager.GROUP_OWNER + " TEXT," + SubscriptionManager.DATA_ENABLED_OVERRIDE_RULES + " TEXT," + SubscriptionManager.DATA_ENABLED_OVERRIDE_RULES + " TEXT," + SubscriptionManager.IMSI + " TEXT," + SubscriptionManager.IMSI + " TEXT," + SubscriptionManager.ACCESS_RULES_FROM_CARRIER_CONFIGS + " BLOB" + SubscriptionManager.ACCESS_RULES_FROM_CARRIER_CONFIGS + " BLOB," + SubscriptionManager.UICC_APPLICATIONS_ENABLED + " INTEGER DEFAULT 1" + ");"; + ");"; } } Loading
tests/telephonytests/src/com/android/internal/telephony/MultiSimSettingControllerTest.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -86,19 +86,19 @@ public class MultiSimSettingControllerTest extends TelephonyTest { "T-mobile", 0, 255, "12345", 0, null, "310", "260", "T-mobile", 0, 255, "12345", 0, null, "310", "260", "156", false, null, null, -1, false, mGroupUuid1.toString(), false, "156", false, null, null, -1, false, mGroupUuid1.toString(), false, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null); SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null, true); private SubscriptionInfo mSubInfo3 = new SubscriptionInfo(3, "subInfo3 IccId", -1, "T-mobile", private SubscriptionInfo mSubInfo3 = new SubscriptionInfo(3, "subInfo3 IccId", -1, "T-mobile", "T-mobile", 0, 255, "12345", 0, null, "310", "260", "T-mobile", 0, 255, "12345", 0, null, "310", "260", "156", false, null, null, -1, false, mGroupUuid1.toString(), false, "156", false, null, null, -1, false, mGroupUuid1.toString(), false, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null); SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null, true); private SubscriptionInfo mSubInfo4 = new SubscriptionInfo(4, "subInfo4 IccId", -1, "T-mobile", private SubscriptionInfo mSubInfo4 = new SubscriptionInfo(4, "subInfo4 IccId", -1, "T-mobile", "T-mobile", 0, 255, "12345", 0, null, "310", "260", "T-mobile", 0, 255, "12345", 0, null, "310", "260", "156", false, null, null, -1, false, mGroupUuid1.toString(), false, "156", false, null, null, -1, false, mGroupUuid1.toString(), false, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, TelephonyManager.UNKNOWN_CARRIER_ID, SubscriptionManager.PROFILE_CLASS_DEFAULT, SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null); SubscriptionManager.SUBSCRIPTION_TYPE_LOCAL_SIM, null, null, true); @Before @Before public void setUp() throws Exception { public void setUp() throws Exception { Loading
tests/telephonytests/src/com/android/internal/telephony/euicc/EuiccControllerTest.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -1082,7 +1082,7 @@ public class EuiccControllerTest extends TelephonyTest { SubscriptionInfo subInfo = new SubscriptionInfo( SubscriptionInfo subInfo = new SubscriptionInfo( 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", CARD_ID, hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", CARD_ID, false, null, false, 0, 0, 0, null, null); false, null, false, 0, 0, 0, null, null, true); when(mSubscriptionManager.canManageSubscription(subInfo, PACKAGE_NAME)).thenReturn( when(mSubscriptionManager.canManageSubscription(subInfo, PACKAGE_NAME)).thenReturn( hasPrivileges); hasPrivileges); when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn( when(mSubscriptionManager.getActiveSubscriptionInfoList(anyBoolean())).thenReturn( Loading @@ -1103,11 +1103,11 @@ public class EuiccControllerTest extends TelephonyTest { SubscriptionInfo subInfo1 = new SubscriptionInfo( SubscriptionInfo subInfo1 = new SubscriptionInfo( 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", CARD_ID, hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", CARD_ID, false, null, false, 0, 0, 0, null, null); false, null, false, 0, 0, 0, null, null, true); SubscriptionInfo subInfo2 = new SubscriptionInfo( SubscriptionInfo subInfo2 = new SubscriptionInfo( 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, 0, "", 0, "", "", 0, 0, "", 0, null, "", "", "", true /* isEmbedded */, hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", hasPrivileges ? new UiccAccessRule[] { ACCESS_RULE } : null, "", 1 /* cardId */, false, null, false, 0, 0, 0, null, null); 1 /* cardId */, false, null, false, 0, 0, 0, null, null, true); when(mSubscriptionManager.canManageSubscription(subInfo1, PACKAGE_NAME)).thenReturn( when(mSubscriptionManager.canManageSubscription(subInfo1, PACKAGE_NAME)).thenReturn( hasPrivileges); hasPrivileges); when(mSubscriptionManager.canManageSubscription(subInfo2, PACKAGE_NAME)).thenReturn( when(mSubscriptionManager.canManageSubscription(subInfo2, PACKAGE_NAME)).thenReturn( Loading