Loading packages/SettingsLib/src/com/android/settingslib/Utils.java +1 −1 Original line number Diff line number Diff line Loading @@ -421,7 +421,7 @@ public class Utils { // is not available. Note that we ignore the IWLAN service state // because that state indicates the use of VoWIFI and not cell service final int state = serviceState.getState(); final int dataState = serviceState.getDataRegState(); final int dataState = serviceState.getDataRegistrationState(); if (state == ServiceState.STATE_OUT_OF_SERVICE || state == ServiceState.STATE_EMERGENCY_ONLY) { Loading packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java +8 −6 Original line number Diff line number Diff line Loading @@ -227,7 +227,7 @@ public class UtilsTest { @Test public void isInService_voiceOutOfServiceDataInService_returnTrue() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo); when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn( Loading @@ -243,7 +243,7 @@ public class UtilsTest { AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo); when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn( NetworkRegistrationInfo.REGISTRATION_STATE_HOME); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE); assertThat(Utils.isInService(mServiceState)).isFalse(); } Loading @@ -251,7 +251,8 @@ public class UtilsTest { @Test public void isInService_voiceOutOfServiceDataOutOfService_returnFalse() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn( ServiceState.STATE_OUT_OF_SERVICE); assertThat(Utils.isInService(mServiceState)).isFalse(); } Loading Loading @@ -288,7 +289,7 @@ public class UtilsTest { @Test public void getCombinedServiceState_voiceOutOfServiceDataInService_returnInService() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo); when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn( Loading @@ -301,7 +302,7 @@ public class UtilsTest { @Test public void getCombinedServiceState_voiceOutOfServiceDataInServiceOnIwLan_returnOutOfService() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo); when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn( Loading @@ -314,7 +315,8 @@ public class UtilsTest { @Test public void getCombinedServiceState_voiceOutOfServiceDataOutOfService_returnOutOfService() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn( ServiceState.STATE_OUT_OF_SERVICE); assertThat(Utils.getCombinedServiceState(mServiceState)).isEqualTo( ServiceState.STATE_OUT_OF_SERVICE); Loading packages/SystemUI/src/com/android/keyguard/CarrierTextController.java +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ public class CarrierTextController { } if (simState == IccCardConstants.State.READY) { ServiceState ss = mKeyguardUpdateMonitor.mServiceStates.get(subId); if (ss != null && ss.getDataRegState() == ServiceState.STATE_IN_SERVICE) { if (ss != null && ss.getDataRegistrationState() == ServiceState.STATE_IN_SERVICE) { // hack for WFC (IWLAN) not turning off immediately once // Wi-Fi is disassociated or disabled if (ss.getRilDataRadioTechnology() != ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +2 −2 Original line number Diff line number Diff line Loading @@ -703,8 +703,8 @@ public class MobileSignalController extends SignalController< @Override public void onServiceStateChanged(ServiceState state) { if (DEBUG) { Log.d(mTag, "onServiceStateChanged voiceState=" + state.getVoiceRegState() + " dataState=" + state.getDataRegState()); Log.d(mTag, "onServiceStateChanged voiceState=" + state.getState() + " dataState=" + state.getDataRegistrationState()); } mServiceState = state; if (mServiceState != null) { Loading packages/SystemUI/tests/src/com/android/keyguard/CarrierTextControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -339,7 +339,7 @@ public class CarrierTextControllerTest extends SysuiTestCase { mKeyguardUpdateMonitor.mServiceStates = new HashMap<>(); ServiceState ss = mock(ServiceState.class); when(ss.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(ss.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE); mKeyguardUpdateMonitor.mServiceStates.put(TEST_SUBSCRIPTION_NULL.getSubscriptionId(), ss); ArgumentCaptor<CarrierTextController.CarrierTextCallbackInfo> captor = Loading Loading
packages/SettingsLib/src/com/android/settingslib/Utils.java +1 −1 Original line number Diff line number Diff line Loading @@ -421,7 +421,7 @@ public class Utils { // is not available. Note that we ignore the IWLAN service state // because that state indicates the use of VoWIFI and not cell service final int state = serviceState.getState(); final int dataState = serviceState.getDataRegState(); final int dataState = serviceState.getDataRegistrationState(); if (state == ServiceState.STATE_OUT_OF_SERVICE || state == ServiceState.STATE_EMERGENCY_ONLY) { Loading
packages/SettingsLib/tests/robotests/src/com/android/settingslib/UtilsTest.java +8 −6 Original line number Diff line number Diff line Loading @@ -227,7 +227,7 @@ public class UtilsTest { @Test public void isInService_voiceOutOfServiceDataInService_returnTrue() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo); when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn( Loading @@ -243,7 +243,7 @@ public class UtilsTest { AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo); when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn( NetworkRegistrationInfo.REGISTRATION_STATE_HOME); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE); assertThat(Utils.isInService(mServiceState)).isFalse(); } Loading @@ -251,7 +251,8 @@ public class UtilsTest { @Test public void isInService_voiceOutOfServiceDataOutOfService_returnFalse() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn( ServiceState.STATE_OUT_OF_SERVICE); assertThat(Utils.isInService(mServiceState)).isFalse(); } Loading Loading @@ -288,7 +289,7 @@ public class UtilsTest { @Test public void getCombinedServiceState_voiceOutOfServiceDataInService_returnInService() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo); when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn( Loading @@ -301,7 +302,7 @@ public class UtilsTest { @Test public void getCombinedServiceState_voiceOutOfServiceDataInServiceOnIwLan_returnOutOfService() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(mServiceState.getNetworkRegistrationInfo(NetworkRegistrationInfo.DOMAIN_PS, AccessNetworkConstants.TRANSPORT_TYPE_WLAN)).thenReturn(mNetworkRegistrationInfo); when(mNetworkRegistrationInfo.getRegistrationState()).thenReturn( Loading @@ -314,7 +315,8 @@ public class UtilsTest { @Test public void getCombinedServiceState_voiceOutOfServiceDataOutOfService_returnOutOfService() { when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE); when(mServiceState.getDataRegistrationState()).thenReturn( ServiceState.STATE_OUT_OF_SERVICE); assertThat(Utils.getCombinedServiceState(mServiceState)).isEqualTo( ServiceState.STATE_OUT_OF_SERVICE); Loading
packages/SystemUI/src/com/android/keyguard/CarrierTextController.java +1 −1 Original line number Diff line number Diff line Loading @@ -348,7 +348,7 @@ public class CarrierTextController { } if (simState == IccCardConstants.State.READY) { ServiceState ss = mKeyguardUpdateMonitor.mServiceStates.get(subId); if (ss != null && ss.getDataRegState() == ServiceState.STATE_IN_SERVICE) { if (ss != null && ss.getDataRegistrationState() == ServiceState.STATE_IN_SERVICE) { // hack for WFC (IWLAN) not turning off immediately once // Wi-Fi is disassociated or disabled if (ss.getRilDataRadioTechnology() != ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/MobileSignalController.java +2 −2 Original line number Diff line number Diff line Loading @@ -703,8 +703,8 @@ public class MobileSignalController extends SignalController< @Override public void onServiceStateChanged(ServiceState state) { if (DEBUG) { Log.d(mTag, "onServiceStateChanged voiceState=" + state.getVoiceRegState() + " dataState=" + state.getDataRegState()); Log.d(mTag, "onServiceStateChanged voiceState=" + state.getState() + " dataState=" + state.getDataRegistrationState()); } mServiceState = state; if (mServiceState != null) { Loading
packages/SystemUI/tests/src/com/android/keyguard/CarrierTextControllerTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -339,7 +339,7 @@ public class CarrierTextControllerTest extends SysuiTestCase { mKeyguardUpdateMonitor.mServiceStates = new HashMap<>(); ServiceState ss = mock(ServiceState.class); when(ss.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE); when(ss.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE); mKeyguardUpdateMonitor.mServiceStates.put(TEST_SUBSCRIPTION_NULL.getSubscriptionId(), ss); ArgumentCaptor<CarrierTextController.CarrierTextCallbackInfo> captor = Loading