Loading src/java/com/android/internal/telephony/PhoneFactory.java +3 −2 Original line number Diff line number Diff line Loading @@ -166,13 +166,14 @@ public class PhoneFactory { sCommandsInterfaces[i] = new RIL(context, networkModes[i], cdmaSubscription, i); } Rlog.i(LOG_TAG, "Creating SubscriptionController"); SubscriptionController.init(context, sCommandsInterfaces); // Instantiate UiccController so that all other classes can just // call getInstance() sUiccController = UiccController.make(context, sCommandsInterfaces); Rlog.i(LOG_TAG, "Creating SubscriptionController"); SubscriptionController.init(context, sCommandsInterfaces); if (context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_TELEPHONY_EUICC)) { sEuiccController = EuiccController.init(context); Loading src/java/com/android/internal/telephony/SubscriptionController.java +11 −3 Original line number Diff line number Diff line Loading @@ -167,6 +167,7 @@ public class SubscriptionController extends ISub.Stub { @UnsupportedAppUsage protected Context mContext; protected TelephonyManager mTelephonyManager; protected UiccController mUiccController; private AppOpsManager mAppOps; Loading Loading @@ -222,6 +223,13 @@ public class SubscriptionController extends ISub.Stub { mContext = c; mTelephonyManager = TelephonyManager.from(mContext); try { mUiccController = UiccController.getInstance(); } catch(RuntimeException ex) { throw new RuntimeException( "UiccController has to be initialised before SubscriptionController init"); } mAppOps = (AppOpsManager)mContext.getSystemService(Context.APP_OPS_SERVICE); if(ServiceManager.getService("isub") == null) { Loading Loading @@ -351,7 +359,7 @@ public class SubscriptionController extends ISub.Stub { String countryIso = cursor.getString(cursor.getColumnIndexOrThrow( SubscriptionManager.ISO_COUNTRY_CODE)); // publicCardId is the publicly exposed int card ID int publicCardId = UiccController.getInstance().convertToPublicCardId(cardId); int publicCardId = mUiccController.convertToPublicCardId(cardId); boolean isEmbedded = cursor.getInt(cursor.getColumnIndexOrThrow( SubscriptionManager.IS_EMBEDDED)) == 1; int carrierId = cursor.getInt(cursor.getColumnIndexOrThrow( Loading Loading @@ -1041,7 +1049,7 @@ public class SubscriptionController extends ISub.Stub { value.put(SubscriptionManager.ICC_ID, uniqueId); } UiccCard card = UiccController.getInstance().getUiccCardForPhone(slotIndex); UiccCard card = mUiccController.getUiccCardForPhone(slotIndex); if (card != null) { String cardId = card.getCardId(); if (cardId != null && cardId != oldCardId) { Loading Loading @@ -1366,7 +1374,7 @@ public class SubscriptionController extends ISub.Stub { if (isSubscriptionForRemoteSim(subscriptionType)) { value.put(SubscriptionManager.DISPLAY_NAME, displayName); } else { UiccCard card = UiccController.getInstance().getUiccCardForPhone(slotIndex); UiccCard card = mUiccController.getUiccCardForPhone(slotIndex); if (card != null) { String cardId = card.getCardId(); if (cardId != null) { Loading Loading
src/java/com/android/internal/telephony/PhoneFactory.java +3 −2 Original line number Diff line number Diff line Loading @@ -166,13 +166,14 @@ public class PhoneFactory { sCommandsInterfaces[i] = new RIL(context, networkModes[i], cdmaSubscription, i); } Rlog.i(LOG_TAG, "Creating SubscriptionController"); SubscriptionController.init(context, sCommandsInterfaces); // Instantiate UiccController so that all other classes can just // call getInstance() sUiccController = UiccController.make(context, sCommandsInterfaces); Rlog.i(LOG_TAG, "Creating SubscriptionController"); SubscriptionController.init(context, sCommandsInterfaces); if (context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_TELEPHONY_EUICC)) { sEuiccController = EuiccController.init(context); Loading
src/java/com/android/internal/telephony/SubscriptionController.java +11 −3 Original line number Diff line number Diff line Loading @@ -167,6 +167,7 @@ public class SubscriptionController extends ISub.Stub { @UnsupportedAppUsage protected Context mContext; protected TelephonyManager mTelephonyManager; protected UiccController mUiccController; private AppOpsManager mAppOps; Loading Loading @@ -222,6 +223,13 @@ public class SubscriptionController extends ISub.Stub { mContext = c; mTelephonyManager = TelephonyManager.from(mContext); try { mUiccController = UiccController.getInstance(); } catch(RuntimeException ex) { throw new RuntimeException( "UiccController has to be initialised before SubscriptionController init"); } mAppOps = (AppOpsManager)mContext.getSystemService(Context.APP_OPS_SERVICE); if(ServiceManager.getService("isub") == null) { Loading Loading @@ -351,7 +359,7 @@ public class SubscriptionController extends ISub.Stub { String countryIso = cursor.getString(cursor.getColumnIndexOrThrow( SubscriptionManager.ISO_COUNTRY_CODE)); // publicCardId is the publicly exposed int card ID int publicCardId = UiccController.getInstance().convertToPublicCardId(cardId); int publicCardId = mUiccController.convertToPublicCardId(cardId); boolean isEmbedded = cursor.getInt(cursor.getColumnIndexOrThrow( SubscriptionManager.IS_EMBEDDED)) == 1; int carrierId = cursor.getInt(cursor.getColumnIndexOrThrow( Loading Loading @@ -1041,7 +1049,7 @@ public class SubscriptionController extends ISub.Stub { value.put(SubscriptionManager.ICC_ID, uniqueId); } UiccCard card = UiccController.getInstance().getUiccCardForPhone(slotIndex); UiccCard card = mUiccController.getUiccCardForPhone(slotIndex); if (card != null) { String cardId = card.getCardId(); if (cardId != null && cardId != oldCardId) { Loading Loading @@ -1366,7 +1374,7 @@ public class SubscriptionController extends ISub.Stub { if (isSubscriptionForRemoteSim(subscriptionType)) { value.put(SubscriptionManager.DISPLAY_NAME, displayName); } else { UiccCard card = UiccController.getInstance().getUiccCardForPhone(slotIndex); UiccCard card = mUiccController.getUiccCardForPhone(slotIndex); if (card != null) { String cardId = card.getCardId(); if (cardId != null) { Loading