/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/hfp/ |
D | HeadsetPhoneStateTest.java | 56 @Mock private TelephonyManager mTelephonyManager; field in HeadsetPhoneStateTest 79 mTelephonyManager); in setUp() 80 when(mTelephonyManager.createForSubscriptionId(anyInt())).thenReturn(mTelephonyManager); in setUp() 108 verifyZeroInteractions(mTelephonyManager); in testListenForPhoneState_NoneResultsNoListen() 119 verify(mTelephonyManager).listen(any(), eq(PhoneStateListener.LISTEN_SERVICE_STATE)); in testListenForPhoneState_ServiceOnly() 120 verifyNoMoreInteractions(mTelephonyManager); in testListenForPhoneState_ServiceOnly() 133 verify(mTelephonyManager).listen(any(), eq(PhoneStateListener.LISTEN_SERVICE_STATE in testListenForPhoneState_ServiceAndSignalStrength() 146 verify(mTelephonyManager).listen(any(), eq(PhoneStateListener.LISTEN_SERVICE_STATE in testListenForPhoneState_ServiceAndSignalStrengthUpdateTurnOffSignalStrengh() 149 verify(mTelephonyManager).listen(any(), eq(PhoneStateListener.LISTEN_NONE)); in testListenForPhoneState_ServiceAndSignalStrengthUpdateTurnOffSignalStrengh() 150 verify(mTelephonyManager).listen(any(), eq(PhoneStateListener.LISTEN_SERVICE_STATE)); in testListenForPhoneState_ServiceAndSignalStrengthUpdateTurnOffSignalStrengh() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/simstatus/ |
D | SimStatusDialogControllerTest.java | 98 private TelephonyManager mTelephonyManager; field in SimStatusDialogControllerTest 141 mTelephonyManager = spy(mContext.getSystemService(TelephonyManager.class)); in setup() 142 final ShadowTelephonyManager shadowTelephonyMgr = shadowOf(mTelephonyManager); in setup() 144 SubscriptionManager.DEFAULT_SUBSCRIPTION_ID, mTelephonyManager); in setup() 145 doReturn(2).when(mTelephonyManager).getCardIdForDefaultEuicc(); in setup() 146 doReturn(TelephonyManager.NETWORK_TYPE_LTE).when(mTelephonyManager).getDataNetworkType(); in setup() 164 ReflectionHelpers.setField(mController, "mTelephonyManager", mTelephonyManager); in setup() 170 when(mTelephonyManager.getActiveModemCount()).thenReturn(MAX_PHONE_COUNT_SINGLE_SIM); in setup() 171 doReturn(new ArrayList<UiccCardInfo>()).when(mTelephonyManager).getUiccCardsInfo(); in setup() 172 doReturn(new HashMap<Integer, Integer>()).when(mTelephonyManager) in setup() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/network/ |
D | MobileDataTogglePreferenceControllerTest.java | 68 private TelephonyManager mTelephonyManager; field in MobileDataTogglePreferenceControllerTest 76 mTelephonyManager = mContext.getSystemService(TelephonyManager.class); in setUp() 77 mTelephonyManager.setDataEnabled(false); in setUp() 79 getShadowTelephonyManager().setTelephonyManagerForSubscriptionId(SUB_ID, mTelephonyManager); in setUp() 142 mTelephonyManager.setDataEnabled(true); in refreshUi_dataEnabled_setChecked() 150 mTelephonyManager.setDataEnabled(false); in refreshUi_dataDisabled_setUnchecked() 169 mTelephonyManager.setDataEnabled(true); in handlePreferenceChanged_setFalse_isMultiSim_disablesData() 173 assertThat(mTelephonyManager.isDataEnabled()).isFalse(); in handlePreferenceChanged_setFalse_isMultiSim_disablesData() 179 mTelephonyManager.setDataEnabled(true); in handlePreferenceChanged_setFalse_isMultiSim_setsUnchecked() 189 mTelephonyManager.setDataEnabled(false); in handlePreferenceChanged_setTrue_isSingleSim_enablesData() [all …]
|
D | RoamingPreferenceControllerTest.java | 68 private TelephonyManager mTelephonyManager; field in RoamingPreferenceControllerTest 78 mTelephonyManager = mContext.getSystemService(TelephonyManager.class); in setUp() 79 getShadowTelephonyManager().setTelephonyManagerForSubscriptionId(SUB_ID, mTelephonyManager); in setUp() 120 SubscriptionManager.INVALID_SUBSCRIPTION_ID, mTelephonyManager); in refreshUi_invalidSubId_isDisabled() 138 mTelephonyManager.setDataRoamingEnabled(true); in refreshUi_roamingEnabled_setChecked() 147 mTelephonyManager.setDataRoamingEnabled(false); in refreshUi_roamingDisabled_setUnchecked() 157 mTelephonyManager.setDataRoamingEnabled(true); in callChangeListener_toggleFalse_turnOffRoaming() 161 assertThat(mTelephonyManager.isDataRoamingEnabled()).isFalse(); in callChangeListener_toggleFalse_turnOffRoaming() 167 mTelephonyManager.setDataRoamingEnabled(false); in callChangeListener_toggleTrue_needsDialog_showDialog() 181 mTelephonyManager.setDataRoamingEnabled(false); in confirmDialog_turnOnRoaming() [all …]
|
/packages/apps/Settings/src/com/android/settings/deviceinfo/imei/ |
D | ImeiInfoDialogController.java | 70 private final TelephonyManager mTelephonyManager; field in ImeiInfoDialogController 82 mTelephonyManager = context.getSystemService(TelephonyManager.class) in ImeiInfoDialogController() 85 mTelephonyManager = tm; in ImeiInfoDialogController() 87 mTelephonyManager = null; in ImeiInfoDialogController() 95 if (mTelephonyManager == null) { in populateImeiInfo() 99 if (mTelephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) { in populateImeiInfo() 111 ? mTelephonyManager.getCdmaMin(mSubscriptionInfo.getSubscriptionId()) in updateDialogForCdmaPhone() 125 getTextAsDigits(mTelephonyManager.getImei(mSlotId))); in updateDialogForCdmaPhone() 127 getTextAsDigits(mTelephonyManager.getDeviceSoftwareVersion(mSlotId))); in updateDialogForCdmaPhone() 135 mDialog.setText(ID_IMEI_VALUE, getTextAsDigits(mTelephonyManager.getImei(mSlotId))); in updateDialogForGsmPhone() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/ |
D | MobileDataPreferenceControllerTest.java | 57 private TelephonyManager mTelephonyManager; field in MobileDataPreferenceControllerTest 76 doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE); in setUp() 78 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 79 doReturn(mInvalidTelephonyManager).when(mTelephonyManager).createForSubscriptionId( in setUp() 99 doReturn(true).when(mTelephonyManager).isDataEnabled(); in isDialogNeeded_disableSingleSim_returnFalse() 101 doReturn(1).when(mTelephonyManager).getActiveModemCount(); in isDialogNeeded_disableSingleSim_returnFalse() 108 doReturn(false).when(mTelephonyManager).isDataEnabled(); in isDialogNeeded_enableNonDefaultSimInMultiSimMode_returnTrue() 112 doReturn(2).when(mTelephonyManager).getActiveModemCount(); in isDialogNeeded_enableNonDefaultSimInMultiSimMode_returnTrue() 130 doReturn(true).when(mTelephonyManager).isDataEnabled(); in onPreferenceChange_singleSim_On_shouldEnableData() 132 doReturn(1).when(mTelephonyManager).getActiveModemCount(); in onPreferenceChange_singleSim_On_shouldEnableData() [all …]
|
D | MmsMessagePreferenceControllerTest.java | 51 private TelephonyManager mTelephonyManager; field in MmsMessagePreferenceControllerTest 64 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); in setUp() 65 when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager); in setUp() 67 when(mTelephonyManager.createForSubscriptionId(SUB_ID)).thenReturn(mTelephonyManager); in setUp() 85 when(mTelephonyManager.isDataEnabled()).thenReturn(true); in getAvailabilityStatus_mobileDataOn_returnUnavailable() 92 when(mTelephonyManager.isApnMetered(ApnSetting.TYPE_MMS)).thenReturn(false); in getAvailabilityStatus_meteredOff_returnUnavailable() 100 when(mTelephonyManager.isDataEnabled()).thenReturn(false); in getAvailabilityStatus_mobileDataOffWithValidSubId_returnAvailable() 101 when(mTelephonyManager.isApnMetered(ApnSetting.TYPE_MMS)).thenReturn(true); in getAvailabilityStatus_mobileDataOffWithValidSubId_returnAvailable() 108 when(mTelephonyManager.isDataEnabledForApn(ApnSetting.TYPE_MMS)).thenReturn(false); in isChecked_returnDataFromTelephonyManager() 111 when(mTelephonyManager.isDataEnabledForApn(ApnSetting.TYPE_MMS)).thenReturn(true); in isChecked_returnDataFromTelephonyManager() [all …]
|
D | NrDisabledInDsdsFooterPreferenceControllerTest.java | 45 private TelephonyManager mTelephonyManager; field in NrDisabledInDsdsFooterPreferenceControllerTest 54 doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE); in setUp() 57 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(anyInt()); in setUp() 68 when(mTelephonyManager.getSupportedRadioAccessFamily()) in isAvailable_dataOnAndDsdsAnd5GSupported_Available() 71 when(mTelephonyManager.isDataEnabled()).thenReturn(true); in isAvailable_dataOnAndDsdsAnd5GSupported_Available() 78 when(mTelephonyManager.getSupportedRadioAccessFamily()) in isAvailable_5gNotSupported_notAvailable() 81 when(mTelephonyManager.isDataEnabled()).thenReturn(true); in isAvailable_5gNotSupported_notAvailable() 88 when(mTelephonyManager.getSupportedRadioAccessFamily()) in isAvailable_mobileDataOff_notAvailable() 91 when(mTelephonyManager.isDataEnabled()).thenReturn(false); in isAvailable_mobileDataOff_notAvailable() 98 when(mTelephonyManager.getSupportedRadioAccessFamily()) in isAvailable_singleSimMode_notAvailable() [all …]
|
D | ApnPreferenceControllerTest.java | 54 private TelephonyManager mTelephonyManager; field in ApnPreferenceControllerTest 71 doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE); in setUp() 73 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 74 doReturn(mInvalidTelephonyManager).when(mTelephonyManager).createForSubscriptionId( in setUp() 88 doReturn(TelephonyManager.PHONE_TYPE_CDMA).when(mTelephonyManager).getPhoneType(); in getAvailabilityStatus_apnSettingsNotSupported_returnUnavailable() 98 doReturn(TelephonyManager.PHONE_TYPE_CDMA).when(mTelephonyManager).getPhoneType(); in getAvailabilityStatus_apnSettingsSupportedWithCDMA_returnAvailable() 108 doReturn(TelephonyManager.PHONE_TYPE_GSM).when(mTelephonyManager).getPhoneType(); in getAvailabilityStatus_apnSettingsSupportedWithGsm_returnAvailable() 118 doReturn(TelephonyManager.PHONE_TYPE_GSM).when(mTelephonyManager).getPhoneType(); in getAvailabilityStatus_carrierConfigNull_returnUnavailable() 127 doReturn(TelephonyManager.PHONE_TYPE_GSM).when(mTelephonyManager).getPhoneType(); in getAvailabilityStatus_hideCarrierNetworkSettings_returnUnavailable()
|
D | MobileNetworkUtilsTest.java | 67 private TelephonyManager mTelephonyManager; field in MobileNetworkUtilsTest 96 when(mContext.getSystemService(TelephonyManager.class)).thenReturn(mTelephonyManager); in setUp() 97 when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager); in setUp() 98 when(mTelephonyManager.createForSubscriptionId(SUB_ID_1)).thenReturn(mTelephonyManager); in setUp() 99 when(mTelephonyManager.createForSubscriptionId(SUB_ID_2)).thenReturn(mTelephonyManager2); in setUp() 119 when(mTelephonyManager.getNetworkOperatorName()).thenReturn( in setUp() 127 verify(mTelephonyManager).setDataEnabled(true); in setMobileDataEnabled_setEnabled_enabled() 136 verify(mTelephonyManager, never()).setDataEnabled(anyBoolean()); in setMobileDataEnabled_setDisabled_disabled() 143 verify(mTelephonyManager).setDataEnabled(true); in setMobileDataEnabled_disableOtherSubscriptions() 172 when(mTelephonyManager.getPhoneType()).thenReturn(PhoneConstants.PHONE_TYPE_CDMA); in isCdmaOptions_phoneTypeCdma_returnTrue() [all …]
|
D | PreferredNetworkModePreferenceControllerTest.java | 54 private TelephonyManager mTelephonyManager; field in PreferredNetworkModePreferenceControllerTest 72 doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE); in setUp() 73 doReturn(mTelephonyManager).when(mContext).getSystemService(TelephonyManager.class); in setUp() 75 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 76 doReturn(mInvalidTelephonyManager).when(mTelephonyManager).createForSubscriptionId( in setUp() 78 doReturn(mServiceState).when(mTelephonyManager).getServiceState(); in setUp() 143 doReturn(true).when(mTelephonyManager).setPreferredNetworkType(SUB_ID, in onPreferenceChange_updateSuccess() 156 doReturn(false).when(mTelephonyManager).setPreferredNetworkType(SUB_ID, in onPreferenceChange_updateFail()
|
D | VideoCallingPreferenceControllerTest.java | 48 private TelephonyManager mTelephonyManager; field in VideoCallingPreferenceControllerTest 66 doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE); in setUp() 67 doReturn(mTelephonyManager).when(mContext).getSystemService(TelephonyManager.class); in setUp() 69 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 85 doReturn(true).when(mTelephonyManager).isDataEnabled(); in setUp() 104 doReturn(false).when(mTelephonyManager).isDataEnabled(); in isVideoCallEnabled_dataDisabled_returnFalse() 124 doReturn(TelephonyManager.CALL_STATE_IDLE).when(mTelephonyManager).getCallState(SUB_ID); in updateState_4gLteOnWithoutCall_checked()
|
D | DataServiceSetupPreferenceControllerTest.java | 58 private TelephonyManager mTelephonyManager; field in DataServiceSetupPreferenceControllerTest 74 doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE); in setUp() 75 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 76 doReturn(mInvalidTelephonyManager).when(mTelephonyManager).createForSubscriptionId( in setUp() 93 doReturn(true).when(mTelephonyManager).isLteCdmaEvdoGsmWcdmaEnabled(); in getAvailabilityStatus_allConfigOn_returnAvailable() 104 doReturn(true).when(mTelephonyManager).isLteCdmaEvdoGsmWcdmaEnabled(); in getAvailabilityStatus_missUrl_returnUnavailable() 116 doReturn(false).when(mTelephonyManager).isLteCdmaEvdoGsmWcdmaEnabled(); in getAvailabilityStatus_notCdma_returnUnavailable()
|
D | RoamingPreferenceControllerTest.java | 55 private TelephonyManager mTelephonyManager; field in RoamingPreferenceControllerTest 74 doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE); in setUp() 77 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 78 doReturn(mInvalidTelephonyManager).when(mTelephonyManager).createForSubscriptionId( in setUp() 107 doReturn(false).when(mTelephonyManager).isDataRoamingEnabled(); in isDialogNeeded_roamingDisabledWithoutFlag_returnTrue() 114 doReturn(true).when(mTelephonyManager).isDataRoamingEnabled(); in isDialogNeeded_roamingEnabled_returnFalse() 139 doReturn(true).when(mTelephonyManager).isDataRoamingEnabled(); in updateState_validSubId_enabled()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/imei/ |
D | ImeiInfoDialogControllerTest.java | 67 private TelephonyManager mTelephonyManager; field in ImeiInfoDialogControllerTest 84 stm.setTelephonyManagerForSubscriptionId(SUB_ID, mTelephonyManager); in setup() 89 when(mTelephonyManager.getCdmaPrlVersion()).thenReturn(PRL_VERSION); in setup() 90 when(mTelephonyManager.getMeid(anyInt())).thenReturn(MEID_NUMBER); in setup() 91 when(mTelephonyManager.getCdmaMin(anyInt())).thenReturn(MIN_NUMBER); in setup() 92 when(mTelephonyManager.getDeviceSoftwareVersion(anyInt())).thenReturn(IMEI_SV_NUMBER); in setup() 93 when(mTelephonyManager.getImei(anyInt())).thenReturn(IMEI_NUMBER); in setup() 108 when(mTelephonyManager.getPhoneType()).thenReturn(TelephonyManager.PHONE_TYPE_CDMA); in populateImeiInfo_cdmaLteEnabled_shouldSetMeidAndImeiAndMin() 122 when(mTelephonyManager.getPhoneType()).thenReturn(TelephonyManager.PHONE_TYPE_CDMA); in populateImeiInfo_cdmaLteDisabled_shouldSetMeidAndMinAndRemoveGsmSettings() 135 when(mTelephonyManager.getPhoneType()).thenReturn(TelephonyManager.PHONE_TYPE_CDMA); in populateImeiInfo_cdmaSimDisabled_shouldRemoveImeiInfoAndSetMinPrlToEmpty() [all …]
|
D | ImeiInfoPreferenceControllerTest.java | 66 private TelephonyManager mTelephonyManager; field in ImeiInfoPreferenceControllerTest 85 ReflectionHelpers.setField(mController, "mTelephonyManager", mTelephonyManager); in setUp() 95 when(mTelephonyManager.getPhoneCount()).thenReturn(2); in displayPreference_multiSimGsm_shouldAddSecondPreference() 96 when(mTelephonyManager.getCurrentPhoneType(anyInt())).thenReturn(PHONE_TYPE_GSM); in displayPreference_multiSimGsm_shouldAddSecondPreference() 107 when(mTelephonyManager.getCurrentPhoneType(anyInt())).thenReturn(PHONE_TYPE_CDMA); in displayPreference_singleSimCdmaPhone_shouldSetSingleSimCdmaTitleAndMeid() 108 when(mTelephonyManager.getMeid(anyInt())).thenReturn(meid); in displayPreference_singleSimCdmaPhone_shouldSetSingleSimCdmaTitleAndMeid() 120 when(mTelephonyManager.getPhoneCount()).thenReturn(2); in displayPreference_multiSimCdmaPhone_shouldSetMultiSimCdmaTitleAndMeid() 121 when(mTelephonyManager.getCurrentPhoneType(anyInt())).thenReturn(PHONE_TYPE_CDMA); in displayPreference_multiSimCdmaPhone_shouldSetMultiSimCdmaTitleAndMeid() 122 when(mTelephonyManager.getMeid(anyInt())).thenReturn(meid); in displayPreference_multiSimCdmaPhone_shouldSetMultiSimCdmaTitleAndMeid() 137 when(mTelephonyManager.getCurrentPhoneType(anyInt())).thenReturn(PHONE_TYPE_GSM); in displayPreference_singleSimGsmPhone_shouldSetSingleSimGsmTitleAndImei() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/imei/ |
D | ImeiInfoDialogController.java | 69 private final TelephonyManager mTelephonyManager; field in ImeiInfoDialogController 77 mTelephonyManager = (TelephonyManager) context.getSystemService( in ImeiInfoDialogController() 86 if (mTelephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) { in populateImeiInfo() 97 mSubscriptionInfo != null ? mTelephonyManager.getCdmaMin( in updateDialogForCdmaPhone() 110 getTextAsDigits(mTelephonyManager.getImei(mSlotId))); in updateDialogForCdmaPhone() 112 getTextAsDigits(mTelephonyManager.getDeviceSoftwareVersion(mSlotId))); in updateDialogForCdmaPhone() 120 mDialog.setText(ID_IMEI_VALUE, getTextAsDigits(mTelephonyManager.getImei(mSlotId))); in updateDialogForGsmPhone() 122 getTextAsDigits(mTelephonyManager.getDeviceSoftwareVersion(mSlotId))); in updateDialogForGsmPhone() 139 return mTelephonyManager.getCdmaPrlVersion(); in getCdmaPrlVersion() 144 return mTelephonyManager.isLteCdmaEvdoGsmWcdmaEnabled(); in isCdmaLteEnabled() [all …]
|
D | ImeiInfoPreferenceController.java | 44 private final TelephonyManager mTelephonyManager; field in ImeiInfoPreferenceController 50 mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); in ImeiInfoPreferenceController() 51 mIsMultiSim = mTelephonyManager.getPhoneCount() > 1; in ImeiInfoPreferenceController() 68 for (int simSlotNumber = 1; simSlotNumber < mTelephonyManager.getPhoneCount(); in displayPreference() 81 final int phoneType = mTelephonyManager.getPhoneType(); in getSummary() 82 return phoneType == PHONE_TYPE_CDMA ? mTelephonyManager.getMeid() in getSummary() 83 : mTelephonyManager.getImei(); in getSummary() 124 final int phoneType = mTelephonyManager.getPhoneType(); in updatePreference() 131 preference.setSummary(mTelephonyManager.getImei(simSlot)); in updatePreference() 147 return mTelephonyManager.getMeid(simSlot); in getMeid()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/gsm/ |
D | AutoSelectPreferenceControllerTest.java | 53 private TelephonyManager mTelephonyManager; field in AutoSelectPreferenceControllerTest 71 when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager); in setUp() 75 when(mTelephonyManager.createForSubscriptionId(SUB_ID)).thenReturn(mTelephonyManager); in setUp() 91 when(mTelephonyManager.getNetworkSelectionMode()).thenReturn( in setChecked_isChecked_showProgressDialog() 98 verify(mTelephonyManager).setNetworkSelectionModeAutomatic(); in setChecked_isChecked_showProgressDialog() 103 when(mTelephonyManager.getServiceState().getRoaming()).thenReturn(true); in updateState_isRoaming_enabled() 112 when(mTelephonyManager.getServiceState().getRoaming()).thenReturn(false); in updateState_notRoamingWithAutoSelectOn_disabled() 113 doReturn(OPERATOR_NAME).when(mTelephonyManager).getSimOperatorName(); in updateState_notRoamingWithAutoSelectOn_disabled() 120 mTelephonyManager.getSimOperatorName())); in updateState_notRoamingWithAutoSelectOn_disabled()
|
/packages/apps/Settings/src/com/android/settings/deviceinfo/simstatus/ |
D | SimStatusDialogController.java | 130 mTelephonyManager = 131 mTelephonyManager.createForSubscriptionId(nextSubId); 143 private TelephonyManager mTelephonyManager; field in SimStatusDialogController 210 mTelephonyManager = mContext.getSystemService(TelephonyManager.class); in SimStatusDialogController() 237 final ServiceState serviceState = mTelephonyManager.getServiceState(); in updateSubscriptionStatus() 238 final SignalStrength signalStrength = mTelephonyManager.getSignalStrength(); in updateSubscriptionStatus() 267 mTelephonyManager = mTelephonyManager.createForSubscriptionId( in onResume() 269 mTelephonyManager.listen(mPhoneStateListener, in onResume() 293 mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); in onPause() 376 && mTelephonyManager.getPhoneType() != TelephonyManager.PHONE_TYPE_CDMA; in updateLatestAreaInfo() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/telephony/cdma/ |
D | CdmaSystemSelectPreferenceControllerTest.java | 53 private TelephonyManager mTelephonyManager; field in CdmaSystemSelectPreferenceControllerTest 71 doReturn(mTelephonyManager).when(mContext).getSystemService(Context.TELEPHONY_SERVICE); in setUp() 73 doReturn(mTelephonyManager).when(mTelephonyManager).createForSubscriptionId(SUB_ID); in setUp() 74 doReturn(mInvalidTelephonyManager).when(mTelephonyManager).createForSubscriptionId( in setUp() 95 doReturn(true).when(mTelephonyManager).setCdmaRoamingMode(anyInt()); in onPreferenceChange_selectHome_returnHomeMode() 109 mTelephonyManager).getCdmaRoamingMode(); in updateState_stateHome_displayHome() 120 mTelephonyManager).getCdmaRoamingMode(); in updateState_LteGSMWcdma_disabled() 136 mTelephonyManager).getCdmaRoamingMode(); in updateState_stateOther_resetToDefault()
|
/packages/apps/Messaging/src/com/android/messaging/util/ |
D | ConnectivityUtil.java | 40 private final TelephonyManager mTelephonyManager; field in ConnectivityUtil 49 mTelephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); in ConnectivityUtil() 54 mTelephonyManager = in ConnectivityUtil() 89 if (mTelephonyManager != null) { in register() 92 mTelephonyManager.listen(mPhoneStateListener, in register() 101 if (mTelephonyManager != null) { in unregister() 102 mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); in unregister()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/deviceinfo/simstatus/ |
D | SimStatusDialogController.java | 104 private final TelephonyManager mTelephonyManager; field in SimStatusDialogController 144 mTelephonyManager = (TelephonyManager) mContext.getSystemService( in SimStatusDialogController() 186 mTelephonyManager.createForSubscriptionId(mSubscriptionInfo.getSubscriptionId()) in onResume() 210 mTelephonyManager.createForSubscriptionId(mSubscriptionInfo.getSubscriptionId()) in onPause() 256 && mTelephonyManager.getPhoneType() != TelephonyManager.PHONE_TYPE_CDMA; in updateLatestAreaInfo() 338 final int actualDataNetworkType = mTelephonyManager.getDataNetworkType(subId); in updateNetworkType() 339 final int actualVoiceNetworkType = mTelephonyManager.getVoiceNetworkType(subId); in updateNetworkType() 341 dataNetworkTypeName = mTelephonyManager.getNetworkTypeName(actualDataNetworkType); in updateNetworkType() 344 voiceNetworkTypeName = mTelephonyManager.getNetworkTypeName(actualVoiceNetworkType); in updateNetworkType() 408 final boolean isImsRegistered = mTelephonyManager.isImsRegistered(subscriptionId); in updateImsRegistrationState() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | VibrateWhenRingPreferenceControllerTest.java | 65 private TelephonyManager mTelephonyManager; field in VibrateWhenRingPreferenceControllerTest 74 when(mContext.getSystemService(Context.TELEPHONY_SERVICE)).thenReturn(mTelephonyManager); in setUp() 83 when(mTelephonyManager.isVoiceCapable()).thenReturn(true); in display_shouldDisplay() 91 when(mTelephonyManager.isVoiceCapable()).thenReturn(false); in display_shouldNotDisplay_notVoiceCapable() 99 when(mTelephonyManager.isVoiceCapable()).thenReturn(true); in display_shouldNotDisplay_RampingRingerEnabled() 107 when(mTelephonyManager.isVoiceCapable()).thenReturn(true); in display_shouldNotDisplay_VoiceEnabled_RampingRingerEnabled() 115 when(mTelephonyManager.isVoiceCapable()).thenReturn(false); in display_shouldNotDisplay_VoiceDisabled_RampingRingerEnabled() 141 when(mTelephonyManager.isVoiceCapable()).thenReturn(true); in voiceCapable_availabled() 148 when(mTelephonyManager.isVoiceCapable()).thenReturn(false); in voiceCapable_notAvailabled()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/telephony/gsm/ |
D | AutoSelectPreferenceController.java | 56 private TelephonyManager mTelephonyManager; field in AutoSelectPreferenceController 66 mTelephonyManager = context.getSystemService(TelephonyManager.class); in AutoSelectPreferenceController() 87 return mTelephonyManager.getNetworkSelectionMode() in isChecked() 96 if (mTelephonyManager.getServiceState().getRoaming()) { in updateState() 103 mTelephonyManager.getSimOperatorName())); in updateState() 116 mTelephonyManager.setNetworkSelectionModeAutomatic(); in setChecked() 117 final int mode = mTelephonyManager.getNetworkSelectionMode(); in setChecked() 148 mTelephonyManager = TelephonyManager.from(mContext).createForSubscriptionId(mSubId); in init()
|