Merge "mainline:Replace serviceState.getDataRegState with getDataRegistrationState"
am: c5e7864948
Change-Id: Ic443ccf38cf3630c6991118ff2cd3f02f6e18864
This commit is contained in:
@@ -246,7 +246,8 @@ public class SimStatusDialogControllerTest {
|
||||
@Ignore
|
||||
public void initialize_updateVoiceDataOutOfService_shouldUpdateSettingAndResetSignalStrength() {
|
||||
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);
|
||||
when(mPersistableBundle.getBoolean(
|
||||
CarrierConfigManager.KEY_SHOW_SIGNAL_STRENGTH_IN_SIM_STATUS_BOOL)).thenReturn(true);
|
||||
|
||||
@@ -261,7 +262,7 @@ public class SimStatusDialogControllerTest {
|
||||
@Ignore
|
||||
public void initialize_updateVoiceOutOfServiceDataInService_shouldUpdateTextToBeInService() {
|
||||
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(mPersistableBundle.getBoolean(
|
||||
CarrierConfigManager.KEY_SHOW_SIGNAL_STRENGTH_IN_SIM_STATUS_BOOL)).thenReturn(true);
|
||||
|
||||
@@ -311,7 +312,7 @@ public class SimStatusDialogControllerTest {
|
||||
@Ignore
|
||||
public void initialize_updateVoiceOutOfServiceDataInService_shouldUpdateSignalStrengthTo50() {
|
||||
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(mPersistableBundle.getBoolean(
|
||||
CarrierConfigManager.KEY_SHOW_SIGNAL_STRENGTH_IN_SIM_STATUS_BOOL)).thenReturn(true);
|
||||
|
||||
|
@@ -115,11 +115,12 @@ public class EnabledNetworkModePreferenceControllerTest {
|
||||
true);
|
||||
|
||||
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(mController.getAvailabilityStatus()).isEqualTo(CONDITIONALLY_UNAVAILABLE);
|
||||
|
||||
when(mServiceState.getState()).thenReturn(ServiceState.STATE_IN_SERVICE);
|
||||
when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE);
|
||||
when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE);
|
||||
|
||||
when(mServiceState.getRoaming()).thenReturn(false);
|
||||
assertThat(mController.getAvailabilityStatus()).isEqualTo(CONDITIONALLY_UNAVAILABLE);
|
||||
|
@@ -33,7 +33,6 @@ import android.telephony.ServiceState;
|
||||
import android.telephony.SubscriptionManager;
|
||||
import android.telephony.TelephonyManager;
|
||||
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.preference.ListPreference;
|
||||
|
||||
import com.android.settings.R;
|
||||
@@ -111,11 +110,12 @@ public class PreferredNetworkModePreferenceControllerTest {
|
||||
true);
|
||||
|
||||
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(mController.getAvailabilityStatus()).isEqualTo(CONDITIONALLY_UNAVAILABLE);
|
||||
|
||||
when(mServiceState.getState()).thenReturn(ServiceState.STATE_IN_SERVICE);
|
||||
when(mServiceState.getDataRegState()).thenReturn(ServiceState.STATE_IN_SERVICE);
|
||||
when(mServiceState.getDataRegistrationState()).thenReturn(ServiceState.STATE_IN_SERVICE);
|
||||
|
||||
when(mServiceState.getRoaming()).thenReturn(false);
|
||||
assertThat(mController.getAvailabilityStatus()).isEqualTo(CONDITIONALLY_UNAVAILABLE);
|
||||
|
Reference in New Issue
Block a user