/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/network/ |
D | MobileNetworkUpdateManagerTest.java | 49 private static final int SUB_ID = 1; field in MobileNetworkUpdateManagerTest 69 setupMobileNetworkUpdateManager(SUB_ID); in onStart_receiverRegistered() 88 setupMobileNetworkUpdateManager(SUB_ID); in onStop_receiverUnregistered() 109 setupMobileNetworkUpdateManager(SUB_ID); in onStart_subscriptionListenerRegistered() 118 setupMobileNetworkUpdateManager(SUB_ID); in onStop_subscriptionListenerUnregistered() 129 setupMobileNetworkUpdateManager(SUB_ID); in onMobileNetworkUpdated_withInitialSubId_pickSubId() 131 createSubscriptionInfo(SUB_ID + 1), createSubscriptionInfo(SUB_ID + 2)); in onMobileNetworkUpdated_withInitialSubId_pickSubId() 134 verify(mMobileNetworkUpdateListener).onMobileNetworkUpdated(SUB_ID); in onMobileNetworkUpdated_withInitialSubId_pickSubId() 141 createSubscriptionInfo(SUB_ID + 1), createSubscriptionInfo(SUB_ID + 2)); in onMobileNetworkUpdated_withoutInitialSubId_pickDefaultSubId() 144 verify(mMobileNetworkUpdateListener).onMobileNetworkUpdated(SUB_ID + 1); in onMobileNetworkUpdated_withoutInitialSubId_pickDefaultSubId()
|
D | MobileDataTogglePreferenceControllerTest.java | 61 private static final int SUB_ID = 1; field in MobileDataTogglePreferenceControllerTest 79 getShadowTelephonyManager().setTelephonyManagerForSubscriptionId(SUB_ID, mTelephonyManager); in setUp() 80 mController.setSubId(SUB_ID); in setUp() 109 Settings.Global.getUriFor(Settings.Global.MOBILE_DATA + SUB_ID))).isNotEmpty(); in onStart_multiSim_registersObserver() 125 createSubscriptionInfo(SUB_ID, /* isOpportunistic= */ true)); in refreshUi_isOpportunistic_isDisabled() 134 createSubscriptionInfo(SUB_ID, /* isOpportunistic= */ false)); in refreshUi_isNotOpportunistic_isEnabled() 211 ShadowSubscriptionManager.setDefaultDataSubscriptionId(SUB_ID); in handlePreferenceChanged_setTrue_isMultiSim_noOtherSimActive_enablesData() 212 getShadowSubscriptionManager().setCurrentActiveSubscriptionId(SUB_ID); in handlePreferenceChanged_setTrue_isMultiSim_noOtherSimActive_enablesData() 223 ShadowSubscriptionManager.setDefaultDataSubscriptionId(SUB_ID); in handlePreferenceChanged_setTrue_isMultiSim_noOtherSimActive_setsChecked() 224 getShadowSubscriptionManager().setCurrentActiveSubscriptionId(SUB_ID); in handlePreferenceChanged_setTrue_isMultiSim_noOtherSimActive_setsChecked() [all …]
|
D | MobileNetworkFragmentTest.java | 45 private static final int SUB_ID = 1; field in MobileNetworkFragmentTest 64 setUpFragmentWithSubId(SUB_ID, TEST_NAME); in onMobileNetworkUpdated_startWithArgument_updateTitle() 66 Collections.singletonList(createSubscriptionInfo(SUB_ID, TEST_NAME))); in onMobileNetworkUpdated_startWithArgument_updateTitle() 68 createSubscriptionInfo(SUB_ID + 1, TEST_NAME + "_1"), in onMobileNetworkUpdated_startWithArgument_updateTitle() 69 createSubscriptionInfo(SUB_ID + 2, TEST_NAME + "_2")); in onMobileNetworkUpdated_startWithArgument_updateTitle() 81 Collections.singletonList(createSubscriptionInfo(SUB_ID, TEST_NAME))); in onMobileNetworkUpdated_noArgumentProvided_updateTitle() 83 createSubscriptionInfo(SUB_ID + 1, TEST_NAME + "_1"), in onMobileNetworkUpdated_noArgumentProvided_updateTitle() 84 createSubscriptionInfo(SUB_ID + 2, TEST_NAME + "_2")); in onMobileNetworkUpdated_noArgumentProvided_updateTitle()
|
D | RoamingPreferenceControllerTest.java | 62 private static final int SUB_ID = 1; field in RoamingPreferenceControllerTest 79 getShadowTelephonyManager().setTelephonyManagerForSubscriptionId(SUB_ID, mTelephonyManager); in setUp() 80 mController.setSubId(SUB_ID); in setUp() 105 Settings.Global.getUriFor(Settings.Global.DATA_ROAMING + SUB_ID))).isNotEmpty(); in onStart_registerObserver_additionalSubId() 170 getShadowCarrierConfigManager().setConfigForSubId(SUB_ID, bundle); in callChangeListener_toggleTrue_needsDialog_showDialog() 184 getShadowCarrierConfigManager().setConfigForSubId(SUB_ID, bundle); in confirmDialog_turnOnRoaming() 209 getShadowCarrierConfigManager().setConfigForSubId(SUB_ID, bundle); in callChangeListener_toggleTrue_doesntNeedDialog_turnOnRoaming()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/ |
D | MobileDataPreferenceControllerTest.java | 51 private static final int SUB_ID = 2; field in MobileDataPreferenceControllerTest 78 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 85 ShadowSubscriptionManager.setDefaultDataSubscriptionId(SUB_ID); in setUp() 86 mController.init(mFragmentManager, SUB_ID); in setUp() 100 doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(SUB_ID); in isDialogNeeded_disableSingleSim_returnFalse() 110 doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(SUB_ID); in isDialogNeeded_enableNonDefaultSimInMultiSimMode_returnTrue() 132 doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(SUB_ID); in onPreferenceChange_singleSim_On_shouldEnableData() 144 doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(SUB_ID); in onPreferenceChange_multiSim_On_shouldEnableData() 155 mController.init(mFragmentManager, SUB_ID); in isChecked_returnUserDataEnabled() 164 doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(SUB_ID); in updateState_opportunistic_disabled() [all …]
|
D | EnabledNetworkModePreferenceControllerTest.java | 50 private static final int SUB_ID = 2; field in EnabledNetworkModePreferenceControllerTest 72 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 77 doReturn(mPersistableBundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in setUp() 83 mController.init(SUB_ID); in setUp() 109 mController.init(SUB_ID); in init_initShow4GForLTE() 117 Settings.Global.PREFERRED_NETWORK_MODE + SUB_ID, in updateState_updateByNetworkMode() local 130 Settings.Global.PREFERRED_NETWORK_MODE + SUB_ID, in updateState_updateByNetworkMode_useDefaultValue() local 141 doReturn(true).when(mTelephonyManager).setPreferredNetworkType(SUB_ID, in onPreferenceChange_updateSuccess() 148 Settings.Global.PREFERRED_NETWORK_MODE + SUB_ID, 0)).isEqualTo( in onPreferenceChange_updateSuccess() local 154 doReturn(false).when(mTelephonyManager).setPreferredNetworkType(SUB_ID, in onPreferenceChange_updateFail() [all …]
|
D | MmsMessagePreferenceControllerTest.java | 48 private static final int SUB_ID = 2; field in MmsMessagePreferenceControllerTest 67 when(mTelephonyManager.createForSubscriptionId(SUB_ID)).thenReturn(mTelephonyManager); in setUp() 71 ShadowSubscriptionManager.setDefaultDataSubscriptionId(SUB_ID); in setUp() 72 mController.init(SUB_ID); in setUp() 87 assertThat(mController.getAvailabilityStatus(SUB_ID)).isEqualTo(CONDITIONALLY_UNAVAILABLE); in getAvailabilityStatus_mobileDataOn_returnUnavailable() 94 assertThat(mController.getAvailabilityStatus(SUB_ID)).isEqualTo(CONDITIONALLY_UNAVAILABLE); in getAvailabilityStatus_meteredOff_returnUnavailable() 99 mController.init(SUB_ID); in getAvailabilityStatus_mobileDataOffWithValidSubId_returnAvailable() 103 assertThat(mController.getAvailabilityStatus(SUB_ID)).isEqualTo(AVAILABLE); in getAvailabilityStatus_mobileDataOffWithValidSubId_returnAvailable() 118 verify(mSubscriptionManager).setAlwaysAllowMmsData(SUB_ID, true); in setChecked_setDataIntoSubscriptionManager() 121 verify(mSubscriptionManager).setAlwaysAllowMmsData(SUB_ID, false); in setChecked_setDataIntoSubscriptionManager()
|
D | ApnPreferenceControllerTest.java | 53 private static final int SUB_ID = 2; field in ApnPreferenceControllerTest 75 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 82 mController.init(SUB_ID); in setUp() 93 doReturn(bundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in getAvailabilityStatus_apnSettingsNotSupported_returnUnavailable() 103 doReturn(bundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in getAvailabilityStatus_apnSettingsSupportedWithCDMA_returnAvailable() 113 doReturn(bundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in getAvailabilityStatus_apnSettingsSupportedWithGsm_returnAvailable() 121 when(mCarrierConfigManager.getConfigForSubId(SUB_ID)).thenReturn(null); in getAvailabilityStatus_carrierConfigNull_returnUnavailable() 133 doReturn(bundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in getAvailabilityStatus_hideCarrierNetworkSettings_returnUnavailable() 147 assertThat(intent.getIntExtra(ApnSettings.SUB_ID, 0)).isEqualTo(SUB_ID); in handPreferenceTreeClick_fireIntent()
|
D | PreferredNetworkModePreferenceControllerTest.java | 49 private static final int SUB_ID = 2; field in PreferredNetworkModePreferenceControllerTest 71 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 75 doReturn(mPersistableBundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in setUp() 81 mController.init(SUB_ID); in setUp() 105 Settings.Global.PREFERRED_NETWORK_MODE + SUB_ID, in updateState_updateByNetworkMode() local 118 doReturn(true).when(mTelephonyManager).setPreferredNetworkType(SUB_ID, in onPreferenceChange_updateSuccess() 125 Settings.Global.PREFERRED_NETWORK_MODE + SUB_ID, 0)).isEqualTo( in onPreferenceChange_updateSuccess() local 131 doReturn(false).when(mTelephonyManager).setPreferredNetworkType(SUB_ID, in onPreferenceChange_updateFail() 138 Settings.Global.PREFERRED_NETWORK_MODE + SUB_ID, 0)).isNotEqualTo( in onPreferenceChange_updateFail() local
|
D | DisabledSubscriptionControllerTest.java | 45 private static final int SUB_ID = 111; field in DisabledSubscriptionControllerTest 67 mController.init(mLifecycle, SUB_ID); in setUp() 72 doReturn(true).when(mSubscriptionManager).isActiveSubId(SUB_ID); in displayPreference_subscriptionEnabled_categoryIsVisible() 79 doReturn(false).when(mSubscriptionManager).isActiveSubId(SUB_ID); in displayPreference_subscriptionDisabled_categoryIsNotVisible() 86 doReturn(true).when(mSubscriptionManager).isActiveSubId(SUB_ID); in onSubscriptionsChanged_subscriptionBecomesDisabled_categoryIsNotVisible() 88 doReturn(false).when(mSubscriptionManager).isActiveSubId(SUB_ID); in onSubscriptionsChanged_subscriptionBecomesDisabled_categoryIsNotVisible() 95 doReturn(false).when(mSubscriptionManager).isActiveSubId(SUB_ID); in onSubscriptionsChanged_subscriptionBecomesEnabled_categoryIsVisible() 97 doReturn(true).when(mSubscriptionManager).isActiveSubId(SUB_ID); in onSubscriptionsChanged_subscriptionBecomesEnabled_categoryIsVisible()
|
D | DeleteSimProfilePreferenceControllerTest.java | 55 private static final int SUB_ID = 1234; field in DeleteSimProfilePreferenceControllerTest 75 when(mSubscriptionInfo.getSubscriptionId()).thenReturn(SUB_ID); in setUp() 93 mController.init(SUB_ID, mFragment, REQUEST_CODE); in getAvailabilityStatus_noSubs_notAvailable() 100 mController.init(SUB_ID, mFragment, REQUEST_CODE); in getAvailabilityStatus_physicalSim_notAvailable() 107 mController.init(SUB_ID, mFragment, REQUEST_CODE); in getAvailabilityStatus_unknownSim_notAvailable() 113 mController.init(SUB_ID, mFragment, REQUEST_CODE); in getAvailabilityStatus_knownEsim_isAvailable() 119 mController.init(SUB_ID, mFragment, REQUEST_CODE); in onPreferenceClick_startsIntent() 129 SubscriptionManager.INVALID_SUBSCRIPTION_ID)).isEqualTo(SUB_ID); in onPreferenceClick_startsIntent()
|
D | VideoCallingPreferenceControllerTest.java | 44 private static final int SUB_ID = 2; field in VideoCallingPreferenceControllerTest 66 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 71 doReturn(mCarrierConfig).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in setUp() 75 mController.init(SUB_ID); in setUp() 87 assertThat(mController.isVideoCallEnabled(SUB_ID, mImsManager)).isTrue(); in isVideoCallEnabled_allFlagsOn_returnTrue() 94 assertThat(mController.isVideoCallEnabled(SUB_ID, mImsManager)).isFalse(); in isVideoCallEnabled_disabledByPlatform_returnFalse() 103 assertThat(mController.isVideoCallEnabled(SUB_ID, mImsManager)).isFalse(); in isVideoCallEnabled_dataDisabled_returnFalse() 121 doReturn(TelephonyManager.CALL_STATE_IDLE).when(mTelephonyManager).getCallState(SUB_ID); in updateState_4gLteOnWithoutCall_checked()
|
D | CarrierPreferenceControllerTest.java | 56 private static final int SUB_ID = 2; field in CarrierPreferenceControllerTest 79 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 86 mController.init(SUB_ID); in setUp() 96 doReturn(bundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in getAvailabilityStatus_cdmaWithFlagOff_returnUnavailable() 106 doReturn(bundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in getAvailabilityStatus_cdmaWithFlagOnreturnAvailable() 116 doReturn(bundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in getAvailabilityStatus_gsmWithFlagOnreturnAvailable() 127 doReturn(bundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in handlePreferenceClick_activityFound_openCarrierSettingActivity() 147 doReturn(bundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in handlePreferenceClick_activityNotFound_DoNothing() 161 doReturn(bundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in handlePreferenceClick_activityNotConfigured_DoNothing()
|
D | WifiCallingPreferenceControllerTest.java | 54 private static final int SUB_ID = 2; field in WifiCallingPreferenceControllerTest 78 when(mTelephonyManager.createForSubscriptionId(SUB_ID)).thenReturn(mTelephonyManager); in setUp() 83 mController.init(SUB_ID); in setUp() 88 when(mCarrierConfigManager.getConfigForSubId(SUB_ID)).thenReturn(mCarrierConfig); in setUp() 113 when(mTelephonyManager.getCallState(SUB_ID)).thenReturn( in updateState_notCallIdle_disable() 134 mController.init(SUB_ID); in updateState_wfcNonRoaming() 180 SubscriptionManager.INVALID_SUBSCRIPTION_ID)).isEqualTo(SUB_ID); in displayPreference_available_setsSubscriptionIdOnIntent()
|
D | MobileDataSliceTest.java | 59 private static final int SUB_ID = 2; field in MobileDataSliceTest 78 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 80 doReturn(SUB_ID).when(mSubscriptionInfo).getSubscriptionId(); in setUp() 111 doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(SUB_ID); in handleUriChange_turnedOn_updatesMobileData() 123 doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(SUB_ID); in handleUriChange_turnedOff_updatesMobileData() 135 doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(SUB_ID); in handleUriChange_turnedOff_airplaneModeOn_mobileDataDoesNotUpdate() 191 doReturn(mSubscriptionInfo).when(mSubscriptionManager).getActiveSubscriptionInfo(SUB_ID); in airplaneModeEnabled_slicePrimaryActionIsEmpty()
|
D | DataServiceSetupPreferenceControllerTest.java | 55 private static final int SUB_ID = 2; field in DataServiceSetupPreferenceControllerTest 77 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 85 doReturn(mCarrierConfig).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in setUp() 89 mController.init(SUB_ID); in setUp() 111 mController.init(SUB_ID); in getAvailabilityStatus_missUrl_returnUnavailable()
|
D | DisableSimFooterPreferenceControllerTest.java | 42 private static final int SUB_ID = 111; field in DisableSimFooterPreferenceControllerTest 54 when(mInfo.getSubscriptionId()).thenReturn(SUB_ID); in setUp() 67 mController.init(SUB_ID); in isAvailable_eSIM_notAvailable() 74 mController.init(SUB_ID); in isAvailable_pSIM_available()
|
D | Enhanced4gLtePreferenceControllerTest.java | 47 private static final int SUB_ID = 2; field in Enhanced4gLtePreferenceControllerTest 73 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 78 doReturn(mCarrierConfig).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in setUp() 82 mController.init(SUB_ID); in setUp() 165 doReturn(TelephonyManager.CALL_STATE_IDLE).when(mTelephonyManager).getCallState(SUB_ID); in updateState_configEnabled_prefEnabled()
|
D | DataUsagePreferenceControllerTest.java | 49 private static final int SUB_ID = 2; field in DataUsagePreferenceControllerTest 65 shadowTelephonyManager.setTelephonyManagerForSubscriptionId(SUB_ID, telephonyManager); in setUp() 73 mController.init(SUB_ID); in setUp() 100 assertThat(intent.getIntExtra(Settings.EXTRA_SUB_ID, 0)).isEqualTo(SUB_ID); in handlePreferenceTreeClick_needDialog_showDialog()
|
D | RoamingPreferenceControllerTest.java | 50 private static final int SUB_ID = 2; field in RoamingPreferenceControllerTest 77 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 84 mController.init(mFragmentManager, SUB_ID); in setUp() 106 doReturn(bundle).when(mCarrierConfigManager).getConfigForSubId(SUB_ID); in isDialogNeeded_roamingDisabledWithoutFlag_returnTrue()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/gsm/ |
D | AutoSelectPreferenceControllerTest.java | 49 private static final int SUB_ID = 2; field in AutoSelectPreferenceControllerTest 75 when(mTelephonyManager.createForSubscriptionId(SUB_ID)).thenReturn(mTelephonyManager); in setUp() 80 when(mCarrierConfigManager.getConfigForSubId(SUB_ID)).thenReturn(mCarrierConfig); in setUp() 86 mController.init(SUB_ID); in setUp() 125 when(mCarrierConfigManager.getConfigForSubId(SUB_ID)).thenReturn(null); in init_carrierConfigNull_shouldNotCrash() 128 mController.init(SUB_ID); in init_carrierConfigNull_shouldNotCrash()
|
D | OpenNetworkSelectPagePreferenceControllerTest.java | 46 private static final int SUB_ID = 2; field in OpenNetworkSelectPagePreferenceControllerTest 72 when(mTelephonyManager.createForSubscriptionId(SUB_ID)).thenReturn(mTelephonyManager); in setUp() 76 when(mCarrierConfigManager.getConfigForSubId(SUB_ID)).thenReturn(mCarrierConfig); in setUp() 81 mController.init(SUB_ID); in setUp()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/cdma/ |
D | CdmaSystemSelectPreferenceControllerTest.java | 46 private static final int SUB_ID = 2; field in CdmaSystemSelectPreferenceControllerTest 71 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 78 when(mCarrierConfigManager.getConfigForSubId(SUB_ID)).thenReturn(mCarrierConfig); in setUp() 83 mController.init(mPreferenceManager, SUB_ID); in setUp() 120 Settings.Global.PREFERRED_NETWORK_MODE + SUB_ID, in updateState_LteGSMWcdma_disabled() local
|
D | CdmaSubscriptionPreferenceControllerTest.java | 49 private static final int SUB_ID = 2; field in CdmaSubscriptionPreferenceControllerTest 74 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 80 when(mCarrierConfigManager.getConfigForSubId(SUB_ID)).thenReturn(mCarrierConfig); in setUp() 84 mController.init(mPreferenceManager, SUB_ID); in setUp()
|
D | CdmaListPreferenceTest.java | 39 private static final int SUB_ID = 2; field in CdmaListPreferenceTest 56 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 59 mPreference.setSubId(SUB_ID); in setUp()
|