Loading src/java/com/android/internal/telephony/CarrierServiceBindHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ public class CarrierServiceBindHelper { public CarrierServiceBindHelper(Context context) { mContext = context; int numPhones = TelephonyManager.from(context).getPhoneCount(); int numPhones = TelephonyManager.from(context).getMaxPhoneCount(); 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)).getPhoneCount(); Context.TELEPHONY_SERVICE)).getMaxPhoneCount(); mCarrierConfigLoadedSubIds = new int[phoneCount]; Arrays.fill(mCarrierConfigLoadedSubIds, SubscriptionManager.INVALID_SUBSCRIPTION_ID); Loading src/java/com/android/internal/telephony/PhoneFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,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().getPhoneCount(); int numPhones = TelephonyManager.getDefault().getMaxPhoneCount(); 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 @@ -160,7 +160,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().getPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { mPhones[phoneId].registerForAllDataDisconnected(h, what); } } Loading @@ -168,7 +168,7 @@ public class ProxyController { public void unregisterForAllDataDisconnected(int subId, Handler h) { int phoneId = SubscriptionController.getInstance().getPhoneId(subId); if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { mPhones[phoneId].unregisterForAllDataDisconnected(h); } } Loading @@ -177,7 +177,7 @@ public class ProxyController { public boolean areAllDataDisconnected(int subId) { int phoneId = SubscriptionController.getInstance().getPhoneId(subId); if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { return mPhones[phoneId].areAllDataDisconnected(); } else { // if we can't find a phone for the given subId, it is disconnected. Loading src/java/com/android/internal/telephony/RIL.java +3 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ import android.telephony.Rlog; import android.telephony.ServiceState; import android.telephony.SignalStrength; import android.telephony.SmsManager; import android.telephony.SubscriptionManager; import android.telephony.TelephonyHistogram; import android.telephony.TelephonyManager; import android.telephony.TelephonyManager.PrefNetworkMode; Loading Loading @@ -413,6 +414,7 @@ public class RIL extends BaseCommands implements CommandsInterface { /** Returns a {@link IRadio} instance or null if the service is not available. */ @VisibleForTesting public synchronized IRadio getRadioProxy(Message result) { if (!SubscriptionManager.isActivePhoneId(mPhoneId)) return null; if (!mIsMobileNetworkSupported) { if (RILJ_LOGV) riljLog("getRadioProxy: Not calling getService(): wifi-only"); if (result != null) { Loading Loading @@ -506,6 +508,7 @@ public class RIL extends BaseCommands implements CommandsInterface { /** Returns an {@link IOemHook} instance or null if the service is not available. */ @VisibleForTesting public synchronized IOemHook getOemHookProxy(Message result) { if (!SubscriptionManager.isActivePhoneId(mPhoneId)) return null; if (!mIsMobileNetworkSupported) { if (RILJ_LOGV) riljLog("getOemHookProxy: Not calling getService(): wifi-only"); if (result != null) { Loading Loading
src/java/com/android/internal/telephony/CarrierServiceBindHelper.java +1 −1 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ public class CarrierServiceBindHelper { public CarrierServiceBindHelper(Context context) { mContext = context; int numPhones = TelephonyManager.from(context).getPhoneCount(); int numPhones = TelephonyManager.from(context).getMaxPhoneCount(); 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)).getPhoneCount(); Context.TELEPHONY_SERVICE)).getMaxPhoneCount(); mCarrierConfigLoadedSubIds = new int[phoneCount]; Arrays.fill(mCarrierConfigLoadedSubIds, SubscriptionManager.INVALID_SUBSCRIPTION_ID); Loading
src/java/com/android/internal/telephony/PhoneFactory.java +1 −1 Original line number Diff line number Diff line Loading @@ -148,7 +148,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().getPhoneCount(); int numPhones = TelephonyManager.getDefault().getMaxPhoneCount(); 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 @@ -160,7 +160,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().getPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { mPhones[phoneId].registerForAllDataDisconnected(h, what); } } Loading @@ -168,7 +168,7 @@ public class ProxyController { public void unregisterForAllDataDisconnected(int subId, Handler h) { int phoneId = SubscriptionController.getInstance().getPhoneId(subId); if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { mPhones[phoneId].unregisterForAllDataDisconnected(h); } } Loading @@ -177,7 +177,7 @@ public class ProxyController { public boolean areAllDataDisconnected(int subId) { int phoneId = SubscriptionController.getInstance().getPhoneId(subId); if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getPhoneCount()) { if (phoneId >= 0 && phoneId < TelephonyManager.getDefault().getMaxPhoneCount()) { return mPhones[phoneId].areAllDataDisconnected(); } else { // if we can't find a phone for the given subId, it is disconnected. Loading
src/java/com/android/internal/telephony/RIL.java +3 −0 Original line number Diff line number Diff line Loading @@ -91,6 +91,7 @@ import android.telephony.Rlog; import android.telephony.ServiceState; import android.telephony.SignalStrength; import android.telephony.SmsManager; import android.telephony.SubscriptionManager; import android.telephony.TelephonyHistogram; import android.telephony.TelephonyManager; import android.telephony.TelephonyManager.PrefNetworkMode; Loading Loading @@ -413,6 +414,7 @@ public class RIL extends BaseCommands implements CommandsInterface { /** Returns a {@link IRadio} instance or null if the service is not available. */ @VisibleForTesting public synchronized IRadio getRadioProxy(Message result) { if (!SubscriptionManager.isActivePhoneId(mPhoneId)) return null; if (!mIsMobileNetworkSupported) { if (RILJ_LOGV) riljLog("getRadioProxy: Not calling getService(): wifi-only"); if (result != null) { Loading Loading @@ -506,6 +508,7 @@ public class RIL extends BaseCommands implements CommandsInterface { /** Returns an {@link IOemHook} instance or null if the service is not available. */ @VisibleForTesting public synchronized IOemHook getOemHookProxy(Message result) { if (!SubscriptionManager.isActivePhoneId(mPhoneId)) return null; if (!mIsMobileNetworkSupported) { if (RILJ_LOGV) riljLog("getOemHookProxy: Not calling getService(): wifi-only"); if (result != null) { Loading