Loading packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java +7 −3 Original line number Diff line number Diff line Loading @@ -224,7 +224,10 @@ public class SignalClusterView public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType, int qsType, boolean activityIn, boolean activityOut, String typeContentDescription, String description, boolean isWide, int subId) { PhoneState state = getOrInflateState(subId); PhoneState state = getState(subId); if (state == null) { return; } state.mMobileVisible = statusIcon.visible && !mBlockMobile; state.mMobileStrengthId = statusIcon.icon; state.mMobileTypeId = statusType; Loading Loading @@ -281,13 +284,14 @@ public class SignalClusterView return true; } private PhoneState getOrInflateState(int subId) { private PhoneState getState(int subId) { for (PhoneState state : mPhoneStates) { if (state.mSubId == subId) { return state; } } return inflatePhoneState(subId); Log.e(TAG, "Unexpected subscription " + subId); return null; } private PhoneState inflatePhoneState(int subId) { Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +1 −1 Original line number Diff line number Diff line Loading @@ -291,6 +291,7 @@ public class MobileSignalController extends SignalController< notifyListenersIfNecessary(); } else if (action.equals(TelephonyIntents.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)) { updateDataSim(); notifyListenersIfNecessary(); } } Loading @@ -308,7 +309,6 @@ public class MobileSignalController extends SignalController< // for long. mCurrentState.dataSim = true; } notifyListenersIfNecessary(); } /** Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +11 −5 Original line number Diff line number Diff line Loading @@ -110,6 +110,8 @@ public class NetworkControllerImpl extends BroadcastReceiver // The current user ID. private int mCurrentUserId; private OnSubscriptionsChangedListener mSubscriptionListener; // Handler that all broadcasts are received on. private final Handler mReceiverHandler; // Handler that all callbacks are made on. Loading Loading @@ -179,6 +181,9 @@ public class NetworkControllerImpl extends BroadcastReceiver for (MobileSignalController mobileSignalController : mMobileSignalControllers.values()) { mobileSignalController.registerListener(); } if (mSubscriptionListener == null) { mSubscriptionListener = new SubListener(); } mSubscriptionManager.addOnSubscriptionsChangedListener(mSubscriptionListener); // broadcasts Loading Loading @@ -422,7 +427,6 @@ public class NetworkControllerImpl extends BroadcastReceiver : lhs.getSimSlotIndex() - rhs.getSimSlotIndex(); } }); mCallbackHandler.setSubs(subscriptions); mCurrentSubscriptions = subscriptions; HashMap<Integer, MobileSignalController> cachedControllers = Loading Loading @@ -455,6 +459,9 @@ public class NetworkControllerImpl extends BroadcastReceiver cachedControllers.get(key).unregisterListener(); } } mCallbackHandler.setSubs(subscriptions); notifyAllListeners(); // There may be new MobileSignalControllers around, make sure they get the current // inet condition and airplane mode. pushConnectivityToSignals(); Loading Loading @@ -724,13 +731,12 @@ public class NetworkControllerImpl extends BroadcastReceiver return info; } private final OnSubscriptionsChangedListener mSubscriptionListener = new OnSubscriptionsChangedListener() { private class SubListener extends OnSubscriptionsChangedListener { @Override public void onSubscriptionsChanged() { updateMobileControllers(); }; }; } } /** * Used to register listeners from the BG Looper, this way the PhoneStateListeners that Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java +7 −3 Original line number Diff line number Diff line Loading @@ -224,7 +224,10 @@ public class SignalClusterView public void setMobileDataIndicators(IconState statusIcon, IconState qsIcon, int statusType, int qsType, boolean activityIn, boolean activityOut, String typeContentDescription, String description, boolean isWide, int subId) { PhoneState state = getOrInflateState(subId); PhoneState state = getState(subId); if (state == null) { return; } state.mMobileVisible = statusIcon.visible && !mBlockMobile; state.mMobileStrengthId = statusIcon.icon; state.mMobileTypeId = statusType; Loading Loading @@ -281,13 +284,14 @@ public class SignalClusterView return true; } private PhoneState getOrInflateState(int subId) { private PhoneState getState(int subId) { for (PhoneState state : mPhoneStates) { if (state.mSubId == subId) { return state; } } return inflatePhoneState(subId); Log.e(TAG, "Unexpected subscription " + subId); return null; } private PhoneState inflatePhoneState(int subId) { Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +1 −1 Original line number Diff line number Diff line Loading @@ -291,6 +291,7 @@ public class MobileSignalController extends SignalController< notifyListenersIfNecessary(); } else if (action.equals(TelephonyIntents.ACTION_DEFAULT_DATA_SUBSCRIPTION_CHANGED)) { updateDataSim(); notifyListenersIfNecessary(); } } Loading @@ -308,7 +309,6 @@ public class MobileSignalController extends SignalController< // for long. mCurrentState.dataSim = true; } notifyListenersIfNecessary(); } /** Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java +11 −5 Original line number Diff line number Diff line Loading @@ -110,6 +110,8 @@ public class NetworkControllerImpl extends BroadcastReceiver // The current user ID. private int mCurrentUserId; private OnSubscriptionsChangedListener mSubscriptionListener; // Handler that all broadcasts are received on. private final Handler mReceiverHandler; // Handler that all callbacks are made on. Loading Loading @@ -179,6 +181,9 @@ public class NetworkControllerImpl extends BroadcastReceiver for (MobileSignalController mobileSignalController : mMobileSignalControllers.values()) { mobileSignalController.registerListener(); } if (mSubscriptionListener == null) { mSubscriptionListener = new SubListener(); } mSubscriptionManager.addOnSubscriptionsChangedListener(mSubscriptionListener); // broadcasts Loading Loading @@ -422,7 +427,6 @@ public class NetworkControllerImpl extends BroadcastReceiver : lhs.getSimSlotIndex() - rhs.getSimSlotIndex(); } }); mCallbackHandler.setSubs(subscriptions); mCurrentSubscriptions = subscriptions; HashMap<Integer, MobileSignalController> cachedControllers = Loading Loading @@ -455,6 +459,9 @@ public class NetworkControllerImpl extends BroadcastReceiver cachedControllers.get(key).unregisterListener(); } } mCallbackHandler.setSubs(subscriptions); notifyAllListeners(); // There may be new MobileSignalControllers around, make sure they get the current // inet condition and airplane mode. pushConnectivityToSignals(); Loading Loading @@ -724,13 +731,12 @@ public class NetworkControllerImpl extends BroadcastReceiver return info; } private final OnSubscriptionsChangedListener mSubscriptionListener = new OnSubscriptionsChangedListener() { private class SubListener extends OnSubscriptionsChangedListener { @Override public void onSubscriptionsChanged() { updateMobileControllers(); }; }; } } /** * Used to register listeners from the BG Looper, this way the PhoneStateListeners that Loading