Loading src/com/android/settings/security/SimLockPreferenceController.java +3 −2 Original line number Diff line number Diff line Loading @@ -44,8 +44,9 @@ public class SimLockPreferenceController extends BasePreferenceController { mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); mCarrierConfigManager = (CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE); mSubscriptionManager = (SubscriptionManager) context .getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE); mSubscriptionManager = ((SubscriptionManager) context .getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE)) .createForAllUserProfiles(); mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); } Loading tests/robotests/src/com/android/settings/security/SimLockPreferenceControllerTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public class SimLockPreferenceControllerTest { ShadowApplication shadowApplication = ShadowApplication.getInstance(); shadowApplication.setSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE, mSubscriptionManager); when(mSubscriptionManager.createForAllUserProfiles()).thenReturn(mSubscriptionManager); shadowApplication.setSystemService(Context.CARRIER_CONFIG_SERVICE, mCarrierManager); shadowApplication.setSystemService(Context.USER_SERVICE, mUserManager); shadowApplication.setSystemService(Context.TELEPHONY_SERVICE, mTelephonyManager); Loading Loading
src/com/android/settings/security/SimLockPreferenceController.java +3 −2 Original line number Diff line number Diff line Loading @@ -44,8 +44,9 @@ public class SimLockPreferenceController extends BasePreferenceController { mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE); mCarrierConfigManager = (CarrierConfigManager) mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE); mSubscriptionManager = (SubscriptionManager) context .getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE); mSubscriptionManager = ((SubscriptionManager) context .getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE)) .createForAllUserProfiles(); mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); } Loading
tests/robotests/src/com/android/settings/security/SimLockPreferenceControllerTest.java +1 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,7 @@ public class SimLockPreferenceControllerTest { ShadowApplication shadowApplication = ShadowApplication.getInstance(); shadowApplication.setSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE, mSubscriptionManager); when(mSubscriptionManager.createForAllUserProfiles()).thenReturn(mSubscriptionManager); shadowApplication.setSystemService(Context.CARRIER_CONFIG_SERVICE, mCarrierManager); shadowApplication.setSystemService(Context.USER_SERVICE, mUserManager); shadowApplication.setSystemService(Context.TELEPHONY_SERVICE, mTelephonyManager); Loading