Loading src/java/com/android/internal/telephony/CarrierServiceBindHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ public class CarrierServiceBindHelper { public CarrierServiceBindHelper(Context context) { mContext = context; int numPhones = TelephonyManager.from(context).getMaxPhoneCount(); int numPhones = TelephonyManager.from(context).getSupportedModemCount(); mBindings = new AppBinding[numPhones]; mLastSimState = new String[numPhones]; Loading src/java/com/android/internal/telephony/MultiSimSettingController.java +1 −1 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ public class MultiSimSettingController extends Handler { // Initialize mCarrierConfigLoadedSubIds and register to listen to carrier config change. final int phoneCount = ((TelephonyManager) mContext.getSystemService( Context.TELEPHONY_SERVICE)).getMaxPhoneCount(); Context.TELEPHONY_SERVICE)).getSupportedModemCount(); mCarrierConfigLoadedSubIds = new int[phoneCount]; Arrays.fill(mCarrierConfigLoadedSubIds, SubscriptionManager.INVALID_SUBSCRIPTION_ID); Loading src/java/com/android/internal/telephony/PhoneConfigurationManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -16,7 +16,11 @@ package com.android.internal.telephony; import static android.telephony.TelephonyManager.ACTION_MULTI_SIM_CONFIG_CHANGED; import static android.telephony.TelephonyManager.EXTRA_NUM_OF_ACTIVE_SIM_SUPPORTED; import android.content.Context; import android.content.Intent; import android.os.AsyncResult; import android.os.Handler; import android.os.Message; Loading Loading @@ -378,6 +382,7 @@ public class PhoneConfigurationManager { } else { log("setMultiSimProperties: Rebooting is not required to switch multi-sim config to " + finalMultiSimConfig); broadcastSimSlotNumChange(numOfSims); // Register to RIL service if needed. for (int i = 0; i < mPhones.length; i++) { Phone phone = mPhones[i]; Loading @@ -386,6 +391,13 @@ public class PhoneConfigurationManager { } } private void broadcastSimSlotNumChange(int numOfSims) { log("broadcastSimSlotNumChange numOfSims" + numOfSims); Intent intent = new Intent(ACTION_MULTI_SIM_CONFIG_CHANGED); intent.putExtra(EXTRA_NUM_OF_ACTIVE_SIM_SUPPORTED, numOfSims); mContext.sendBroadcast(intent); } private static void log(String s) { Rlog.d(LOG_TAG, s); } Loading src/java/com/android/internal/telephony/PhoneFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ public class PhoneFactory { /* In case of multi SIM mode two instances of Phone, RIL are created, where as in single SIM mode only instance. isMultiSimEnabled() function checks whether it is single SIM or multi SIM mode */ int numPhones = TelephonyManager.getDefault().getMaxPhoneCount(); int numPhones = TelephonyManager.getDefault().getSupportedModemCount(); int[] networkModes = new int[numPhones]; sPhones = new Phone[numPhones]; Loading src/java/com/android/internal/telephony/ProxyController.java +3 −3 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ public class ProxyController { public void registerForAllDataDisconnected(int subId, Handler h, int what) { int phoneId = SubscriptionController.getInstance().getPhoneId(subId); if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getSupportedModemCount()) { mPhones[phoneId].registerForAllDataDisconnected(h, what); } } Loading @@ -159,7 +159,7 @@ public class ProxyController { public void unregisterForAllDataDisconnected(int subId, Handler h) { int phoneId = SubscriptionController.getInstance().getPhoneId(subId); if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getSupportedModemCount()) { mPhones[phoneId].unregisterForAllDataDisconnected(h); } } Loading @@ -168,7 +168,7 @@ public class ProxyController { public boolean areAllDataDisconnected(int subId) { int phoneId = SubscriptionController.getInstance().getPhoneId(subId); if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getSupportedModemCount()) { return mPhones[phoneId].areAllDataDisconnected(); } else { // if we can't find a phone for the given subId, it is disconnected. Loading Loading
src/java/com/android/internal/telephony/CarrierServiceBindHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -106,7 +106,7 @@ public class CarrierServiceBindHelper { public CarrierServiceBindHelper(Context context) { mContext = context; int numPhones = TelephonyManager.from(context).getMaxPhoneCount(); int numPhones = TelephonyManager.from(context).getSupportedModemCount(); mBindings = new AppBinding[numPhones]; mLastSimState = new String[numPhones]; Loading
src/java/com/android/internal/telephony/MultiSimSettingController.java +1 −1 Original line number Diff line number Diff line Loading @@ -183,7 +183,7 @@ public class MultiSimSettingController extends Handler { // Initialize mCarrierConfigLoadedSubIds and register to listen to carrier config change. final int phoneCount = ((TelephonyManager) mContext.getSystemService( Context.TELEPHONY_SERVICE)).getMaxPhoneCount(); Context.TELEPHONY_SERVICE)).getSupportedModemCount(); mCarrierConfigLoadedSubIds = new int[phoneCount]; Arrays.fill(mCarrierConfigLoadedSubIds, SubscriptionManager.INVALID_SUBSCRIPTION_ID); Loading
src/java/com/android/internal/telephony/PhoneConfigurationManager.java +12 −0 Original line number Diff line number Diff line Loading @@ -16,7 +16,11 @@ package com.android.internal.telephony; import static android.telephony.TelephonyManager.ACTION_MULTI_SIM_CONFIG_CHANGED; import static android.telephony.TelephonyManager.EXTRA_NUM_OF_ACTIVE_SIM_SUPPORTED; import android.content.Context; import android.content.Intent; import android.os.AsyncResult; import android.os.Handler; import android.os.Message; Loading Loading @@ -378,6 +382,7 @@ public class PhoneConfigurationManager { } else { log("setMultiSimProperties: Rebooting is not required to switch multi-sim config to " + finalMultiSimConfig); broadcastSimSlotNumChange(numOfSims); // Register to RIL service if needed. for (int i = 0; i < mPhones.length; i++) { Phone phone = mPhones[i]; Loading @@ -386,6 +391,13 @@ public class PhoneConfigurationManager { } } private void broadcastSimSlotNumChange(int numOfSims) { log("broadcastSimSlotNumChange numOfSims" + numOfSims); Intent intent = new Intent(ACTION_MULTI_SIM_CONFIG_CHANGED); intent.putExtra(EXTRA_NUM_OF_ACTIVE_SIM_SUPPORTED, numOfSims); mContext.sendBroadcast(intent); } private static void log(String s) { Rlog.d(LOG_TAG, s); } Loading
src/java/com/android/internal/telephony/PhoneFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -146,7 +146,7 @@ public class PhoneFactory { /* In case of multi SIM mode two instances of Phone, RIL are created, where as in single SIM mode only instance. isMultiSimEnabled() function checks whether it is single SIM or multi SIM mode */ int numPhones = TelephonyManager.getDefault().getMaxPhoneCount(); int numPhones = TelephonyManager.getDefault().getSupportedModemCount(); int[] networkModes = new int[numPhones]; sPhones = new Phone[numPhones]; Loading
src/java/com/android/internal/telephony/ProxyController.java +3 −3 Original line number Diff line number Diff line Loading @@ -151,7 +151,7 @@ public class ProxyController { public void registerForAllDataDisconnected(int subId, Handler h, int what) { int phoneId = SubscriptionController.getInstance().getPhoneId(subId); if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getSupportedModemCount()) { mPhones[phoneId].registerForAllDataDisconnected(h, what); } } Loading @@ -159,7 +159,7 @@ public class ProxyController { public void unregisterForAllDataDisconnected(int subId, Handler h) { int phoneId = SubscriptionController.getInstance().getPhoneId(subId); if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getSupportedModemCount()) { mPhones[phoneId].unregisterForAllDataDisconnected(h); } } Loading @@ -168,7 +168,7 @@ public class ProxyController { public boolean areAllDataDisconnected(int subId) { int phoneId = SubscriptionController.getInstance().getPhoneId(subId); if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getSupportedModemCount()) { return mPhones[phoneId].areAllDataDisconnected(); } else { // if we can't find a phone for the given subId, it is disconnected. Loading