Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -440,6 +440,7 @@ public class MobileSignalController extends SignalController< + " dataState=" + state.getDataRegState()); + " dataState=" + state.getDataRegState()); } } mServiceState = state; mServiceState = state; mDataNetType = state.getDataNetworkType(); updateTelephony(); updateTelephony(); } } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -59,8 +59,8 @@ public class NetworkControllerBaseTest extends SysuiTestCase { protected NetworkControllerImpl mNetworkController; protected NetworkControllerImpl mNetworkController; protected MobileSignalController mMobileSignalController; protected MobileSignalController mMobileSignalController; protected PhoneStateListener mPhoneStateListener; protected PhoneStateListener mPhoneStateListener; private SignalStrength mSignalStrength; protected SignalStrength mSignalStrength; private ServiceState mServiceState; protected ServiceState mServiceState; protected ConnectivityManager mMockCm; protected ConnectivityManager mMockCm; protected WifiManager mMockWm; protected WifiManager mMockWm; protected SubscriptionManager mMockSm; protected SubscriptionManager mMockSm; Loading Loading @@ -234,7 +234,7 @@ public class NetworkControllerBaseTest extends SysuiTestCase { mPhoneStateListener.onSignalStrengthsChanged(mSignalStrength); mPhoneStateListener.onSignalStrengthsChanged(mSignalStrength); } } private void updateServiceState() { protected void updateServiceState() { Log.d(TAG, "Sending Service State: " + mServiceState); Log.d(TAG, "Sending Service State: " + mServiceState); mPhoneStateListener.onServiceStateChanged(mServiceState); mPhoneStateListener.onServiceStateChanged(mServiceState); } } Loading @@ -245,6 +245,7 @@ public class NetworkControllerBaseTest extends SysuiTestCase { } } public void updateDataConnectionState(int dataState, int dataNetType) { public void updateDataConnectionState(int dataState, int dataNetType) { when(mServiceState.getDataNetworkType()).thenReturn(dataNetType); mPhoneStateListener.onDataConnectionStateChanged(dataState, dataNetType); mPhoneStateListener.onDataConnectionStateChanged(dataState, dataNetType); } } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java +15 −0 Original line number Original line Diff line number Diff line Loading @@ -114,6 +114,21 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest { TelephonyIcons.QS_DATA_4G); TelephonyIcons.QS_DATA_4G); } } public void testDataChangeWithoutConnectionState() { setupDefaultSignal(); updateDataConnectionState(TelephonyManager.DATA_CONNECTED, TelephonyManager.NETWORK_TYPE_LTE); verifyDataIndicators(TelephonyIcons.DATA_LTE[1][0 /* No direction */], TelephonyIcons.QS_DATA_LTE); Mockito.when(mServiceState.getDataNetworkType()) .thenReturn(TelephonyManager.NETWORK_TYPE_HSPA); updateServiceState(); verifyDataIndicators(TelephonyIcons.DATA_H[1][0 /* No direction */], TelephonyIcons.QS_DATA_H); } public void testDataActivity() { public void testDataActivity() { setupDefaultSignal(); setupDefaultSignal(); Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +1 −0 Original line number Original line Diff line number Diff line Loading @@ -440,6 +440,7 @@ public class MobileSignalController extends SignalController< + " dataState=" + state.getDataRegState()); + " dataState=" + state.getDataRegState()); } } mServiceState = state; mServiceState = state; mDataNetType = state.getDataNetworkType(); updateTelephony(); updateTelephony(); } } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java +4 −3 Original line number Original line Diff line number Diff line Loading @@ -59,8 +59,8 @@ public class NetworkControllerBaseTest extends SysuiTestCase { protected NetworkControllerImpl mNetworkController; protected NetworkControllerImpl mNetworkController; protected MobileSignalController mMobileSignalController; protected MobileSignalController mMobileSignalController; protected PhoneStateListener mPhoneStateListener; protected PhoneStateListener mPhoneStateListener; private SignalStrength mSignalStrength; protected SignalStrength mSignalStrength; private ServiceState mServiceState; protected ServiceState mServiceState; protected ConnectivityManager mMockCm; protected ConnectivityManager mMockCm; protected WifiManager mMockWm; protected WifiManager mMockWm; protected SubscriptionManager mMockSm; protected SubscriptionManager mMockSm; Loading Loading @@ -234,7 +234,7 @@ public class NetworkControllerBaseTest extends SysuiTestCase { mPhoneStateListener.onSignalStrengthsChanged(mSignalStrength); mPhoneStateListener.onSignalStrengthsChanged(mSignalStrength); } } private void updateServiceState() { protected void updateServiceState() { Log.d(TAG, "Sending Service State: " + mServiceState); Log.d(TAG, "Sending Service State: " + mServiceState); mPhoneStateListener.onServiceStateChanged(mServiceState); mPhoneStateListener.onServiceStateChanged(mServiceState); } } Loading @@ -245,6 +245,7 @@ public class NetworkControllerBaseTest extends SysuiTestCase { } } public void updateDataConnectionState(int dataState, int dataNetType) { public void updateDataConnectionState(int dataState, int dataNetType) { when(mServiceState.getDataNetworkType()).thenReturn(dataNetType); mPhoneStateListener.onDataConnectionStateChanged(dataState, dataNetType); mPhoneStateListener.onDataConnectionStateChanged(dataState, dataNetType); } } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java +15 −0 Original line number Original line Diff line number Diff line Loading @@ -114,6 +114,21 @@ public class NetworkControllerDataTest extends NetworkControllerBaseTest { TelephonyIcons.QS_DATA_4G); TelephonyIcons.QS_DATA_4G); } } public void testDataChangeWithoutConnectionState() { setupDefaultSignal(); updateDataConnectionState(TelephonyManager.DATA_CONNECTED, TelephonyManager.NETWORK_TYPE_LTE); verifyDataIndicators(TelephonyIcons.DATA_LTE[1][0 /* No direction */], TelephonyIcons.QS_DATA_LTE); Mockito.when(mServiceState.getDataNetworkType()) .thenReturn(TelephonyManager.NETWORK_TYPE_HSPA); updateServiceState(); verifyDataIndicators(TelephonyIcons.DATA_H[1][0 /* No direction */], TelephonyIcons.QS_DATA_H); } public void testDataActivity() { public void testDataActivity() { setupDefaultSignal(); setupDefaultSignal(); Loading