/packages/apps/Contacts/src/com/android/contacts/compat/ |
D | TelephonyManagerCompat.java | 42 public static boolean isVoiceCapable(@Nullable TelephonyManager telephonyManager) { in isVoiceCapable() argument 43 if (telephonyManager == null) { in isVoiceCapable() 49 return telephonyManager.isVoiceCapable(); in isVoiceCapable() 51 final int phoneType = telephonyManager.getPhoneType(); in isVoiceCapable() 65 public static int getPhoneCount(@Nullable TelephonyManager telephonyManager) { in getPhoneCount() argument 66 if (telephonyManager == null) { in getPhoneCount() 71 return telephonyManager.getPhoneCount(); in getPhoneCount() 86 public static String getDeviceId(@Nullable TelephonyManager telephonyManager, int slotId) { in getDeviceId() argument 87 if (telephonyManager == null) { in getDeviceId() 93 return telephonyManager.getDeviceId(slotId); in getDeviceId() [all …]
|
D | TelephonyManagerSdkCompat.java | 27 public static Uri getVoicemailRingtoneUri(TelephonyManager telephonyManager, in getVoicemailRingtoneUri() argument 30 ? telephonyManager.getVoicemailRingtoneUri(accountHandle) : null; in getVoicemailRingtoneUri() 33 public static boolean isVoicemailVibrationEnabled(TelephonyManager telephonyManager, in isVoicemailVibrationEnabled() argument 36 ? telephonyManager.isVoicemailVibrationEnabled(accountHandle) : false; in isVoicemailVibrationEnabled()
|
/packages/apps/Dialer/java/com/android/dialer/compat/telephony/ |
D | TelephonyManagerCompat.java | 96 public static int getPhoneCount(@Nullable TelephonyManager telephonyManager) { in getPhoneCount() argument 97 if (telephonyManager == null) { in getPhoneCount() 100 return telephonyManager.getPhoneCount(); in getPhoneCount() 109 public static boolean isTtyModeSupported(@Nullable TelephonyManager telephonyManager) { in isTtyModeSupported() argument 110 return telephonyManager != null && telephonyManager.isTtyModeSupported(); in isTtyModeSupported() 121 @Nullable TelephonyManager telephonyManager) { in isHearingAidCompatibilitySupported() 122 return telephonyManager != null && telephonyManager.isHearingAidCompatibilitySupported(); in isHearingAidCompatibilitySupported() 136 TelephonyManager telephonyManager, PhoneAccountHandle accountHandle) { in getVoicemailRingtoneUri() argument 137 return telephonyManager.getVoicemailRingtoneUri(accountHandle); in getVoicemailRingtoneUri() 149 TelephonyManager telephonyManager, PhoneAccountHandle accountHandle) { in isVoicemailVibrationEnabled() argument [all …]
|
/packages/apps/Dialer/java/com/android/dialer/assisteddialing/ |
D | LocationDetector.java | 34 private final TelephonyManager telephonyManager; field in LocationDetector 38 @NonNull TelephonyManager telephonyManager, @Nullable String userProvidedHomeCountry) { in LocationDetector() 39 if (telephonyManager == null) { in LocationDetector() 43 this.telephonyManager = telephonyManager; in LocationDetector() 62 String simCountryIso = telephonyManager.getSimCountryIso(); in getUpperCaseUserHomeCountry() 65 return Optional.of(telephonyManager.getSimCountryIso().toUpperCase(Locale.US)); in getUpperCaseUserHomeCountry() 74 String networkCountryIso = telephonyManager.getNetworkCountryIso(); in getUpperCaseUserRoamingCountry() 76 return Optional.of(telephonyManager.getNetworkCountryIso().toUpperCase(Locale.US)); in getUpperCaseUserRoamingCountry()
|
/packages/services/Telephony/src/com/android/phone/settings/ |
D | SuppServicesUiUtil.java | 92 TelephonyManager telephonyManager = in makeMessage() local 94 boolean isRoaming = telephonyManager.isNetworkRoaming(phone.getSubId()); in makeMessage() 95 boolean isMultiSim = (telephonyManager.getSimCount() > 1); in makeMessage() 149 TelephonyManager telephonyManager = in isMobileDataOff() local 151 return !telephonyManager.getDataEnabled(phone.getSubId()); in isMobileDataOff() 155 TelephonyManager telephonyManager = in isDataRoamingOffUnderRoaming() local 157 return telephonyManager.isNetworkRoaming(phone.getSubId()) in isDataRoamingOffUnderRoaming() 176 TelephonyManager telephonyManager = new TelephonyManager(context, phone.getSubId()); in handleCallerIdUssdResponse() local 177 int carrierId = telephonyManager.getSimCarrierId(); in handleCallerIdUssdResponse() 206 final TelephonyManager telephonyManager, in handleCallerIdUssdResponse() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/network/ |
D | NetworkUtilsTest.java | 65 TelephonyManager telephonyManager = mock(TelephonyManager.class); in hasSim_simAbsent_returnsFalse() local 66 when(telephonyManager.getSimState()).thenReturn(TelephonyManager.SIM_STATE_ABSENT); in hasSim_simAbsent_returnsFalse() 68 assertThat(NetworkUtils.hasSim(telephonyManager)).isFalse(); in hasSim_simAbsent_returnsFalse() 73 TelephonyManager telephonyManager = mock(TelephonyManager.class); in hasSim_simUnknown_returnsFalse() local 74 when(telephonyManager.getSimState()).thenReturn(TelephonyManager.SIM_STATE_UNKNOWN); in hasSim_simUnknown_returnsFalse() 76 assertThat(NetworkUtils.hasSim(telephonyManager)).isFalse(); in hasSim_simUnknown_returnsFalse() 81 TelephonyManager telephonyManager = mock(TelephonyManager.class); in hasSim_otherStatus_returnsTrue() local 82 when(telephonyManager.getSimState()).thenReturn(TelephonyManager.SIM_STATE_LOADED); in hasSim_otherStatus_returnsTrue() 84 assertThat(NetworkUtils.hasSim(telephonyManager)).isTrue(); in hasSim_otherStatus_returnsTrue()
|
D | SubscriptionUtilsTest.java | 44 TelephonyManager telephonyManager = mock(TelephonyManager.class); in getAvailableSubscriptions_hasSubscriptionsFromSubscriptionManager_valueReturned() local 50 when(telephonyManager.getUiccSlotsInfo()).thenReturn(new UiccSlotInfo[0]); in getAvailableSubscriptions_hasSubscriptionsFromSubscriptionManager_valueReturned() 53 subscriptionManager, telephonyManager); in getAvailableSubscriptions_hasSubscriptionsFromSubscriptionManager_valueReturned() 61 TelephonyManager telephonyManager = mock(TelephonyManager.class); in getAvailableSubscriptions_hasSimSlotNotInSubscriptionManager_valueReturned() local 71 when(telephonyManager.getUiccSlotsInfo()).thenReturn(new UiccSlotInfo[]{slotInfo}); in getAvailableSubscriptions_hasSimSlotNotInSubscriptionManager_valueReturned() 74 subscriptionManager, telephonyManager); in getAvailableSubscriptions_hasSimSlotNotInSubscriptionManager_valueReturned() 82 TelephonyManager telephonyManager = mock(TelephonyManager.class); in getAvailableSubscriptions_hasInactiveInsertedPSim_valueRemoved() local 88 when(telephonyManager.getUiccSlotsInfo()).thenReturn(new UiccSlotInfo[0]); in getAvailableSubscriptions_hasInactiveInsertedPSim_valueRemoved() 91 subscriptionManager, telephonyManager); in getAvailableSubscriptions_hasInactiveInsertedPSim_valueRemoved()
|
/packages/services/Telephony/src/com/android/phone/vvm/ |
D | VvmSimStateTracker.java | 82 TelephonyManager telephonyManager = getTelephonyManager(mContext, mPhoneAccountHandle); in listen() local 83 if(telephonyManager == null){ in listen() 87 telephonyManager.listen(this, PhoneStateListener.LISTEN_SERVICE_STATE); in listen() 157 TelephonyManager telephonyManager = getTelephonyManager(context, phoneAccountHandle); in onBootCompleted() local 158 if (telephonyManager == null) { in onBootCompleted() 161 if (telephonyManager.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) { in onBootCompleted() 217 TelephonyManager telephonyManager = getTelephonyManager(context, phoneAccountHandle); in onCarrierConfigChanged() local 218 if(telephonyManager == null){ in onCarrierConfigChanged() 229 if (telephonyManager.getServiceState().getState() in onCarrierConfigChanged()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/network/telephony/ |
D | MobileNetworkUtils.java | 222 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) in setMobileDataEnabled() local 226 telephonyManager.setDataEnabled(enabled); in setMobileDataEnabled() 250 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) in isCdmaOptions() local 256 if (telephonyManager.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) { in isCdmaOptions() 276 && !isTdscdmaSupported(context, telephonyManager)) { in isCdmaOptions() 312 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) in isGsmBasicOptions() local 317 if (telephonyManager.getPhoneType() == PhoneConstants.PHONE_TYPE_GSM) { in isGsmBasicOptions() 345 final TelephonyManager telephonyManager = TelephonyManager.from(context) in shouldDisplayNetworkSelectOptions() local 354 && !telephonyManager.isManualNetworkSelectionAllowed())) { in shouldDisplayNetworkSelectOptions() 384 private static boolean isTdscdmaSupported(Context context, TelephonyManager telephonyManager) { in isTdscdmaSupported() argument [all …]
|
/packages/services/Mms/src/com/android/mms/service/ |
D | PhoneUtils.java | 42 public static String getNationalNumber(TelephonyManager telephonyManager, String phoneText) { in getNationalNumber() argument 43 final String country = getSimOrDefaultLocaleCountry(telephonyManager); in getNationalNumber() 73 private static String getSimOrDefaultLocaleCountry(TelephonyManager telephonyManager) { in getSimOrDefaultLocaleCountry() argument 74 String country = getSimCountry(telephonyManager); in getSimOrDefaultLocaleCountry() 83 private static String getSimCountry(TelephonyManager telephonyManager) { in getSimCountry() argument 84 final String country = telephonyManager.getSimCountryIso(); in getSimCountry()
|
D | MmsHttpClient.java | 476 final TelephonyManager telephonyManager = ((TelephonyManager) context.getSystemService( in getMacroValue() local 479 return telephonyManager.getLine1Number(); in getMacroValue() 481 return PhoneUtils.getNationalNumber(telephonyManager, in getMacroValue() 482 telephonyManager.getLine1Number()); in getMacroValue() 484 return getNai(telephonyManager, mmsConfig); in getMacroValue() 494 private static String getNai(TelephonyManager telephonyManager, Bundle mmsConfig) { in getNai() argument 495 String nai = telephonyManager.getNai(); in getNai()
|
/packages/services/Telephony/src/com/android/phone/ |
D | ShortcutViewUtils.java | 213 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in pickPreferredPhone() local 214 if (telephonyManager.getPhoneCount() <= 0) { in pickPreferredPhone() 220 getPromotedEmergencyNumberLists(telephonyManager); in pickPreferredPhone() 230 PhoneInfo phone = loadPhoneInfo(context, defaultHandle, telephonyManager, in pickPreferredPhone() 245 PhoneInfo phone = loadPhoneInfo(context, handle, telephonyManager, telecomManager, in pickPreferredPhone() 280 @NonNull TelephonyManager telephonyManager, in loadPhoneInfo() argument 292 subId = telephonyManager.getSubIdForPhoneAccount(phoneAccount); in loadPhoneInfo() 295 TelephonyManager subTelephonyManager = telephonyManager.createForSubscriptionId(subId); in loadPhoneInfo() 366 @NonNull TelephonyManager telephonyManager) { in getPromotedEmergencyNumberLists() 368 telephonyManager.getEmergencyNumberList(); in getPromotedEmergencyNumberLists()
|
D | CallForwardEditPreference.java | 93 TelephonyManager telephonyManager = new TelephonyManager(getContext(), in init() local 96 telephonyManager.getSimCarrierId()); in init() 284 final TelephonyManager telephonyManager = in getCurrentCountryIso() local 286 if (telephonyManager == null) { in getCurrentCountryIso() 289 return telephonyManager.getNetworkCountryIso().toUpperCase(); in getCurrentCountryIso() 305 public void onReceiveUssdResponse(final TelephonyManager telephonyManager, 332 public void onReceiveUssdResponseFailed(final TelephonyManager telephonyManager, 523 TelephonyManager telephonyManager = in sendUssdCommand() local 525 telephonyManager.sendUssdRequest(newUssdCommand, inputCallback, mHandler); in sendUssdCommand()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datausage/ |
D | DataUsageUtils.java | 74 final TelephonyManager telephonyManager = TelephonyManager.from(context);; in hasEthernet() local 80 ConnectivityManager.TYPE_ETHERNET, telephonyManager.getSubscriberId(), in hasEthernet() 150 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in hasSim() local 151 final int simState = telephonyManager.getSimState(); in hasSim() 183 TelephonyManager telephonyManager = TelephonyManager.from(context); in getDefaultTemplate() local 185 telephonyManager.getSubscriberId(defaultSubId)); in getDefaultTemplate() 187 telephonyManager.getMergedSubscriberIds()); in getDefaultTemplate()
|
/packages/apps/Dialer/java/com/android/dialer/precall/impl/ |
D | AssistedDialAction.java | 88 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in getAssistedDialingTelephonyManager() local 92 return telephonyManager; in getAssistedDialingTelephonyManager() 96 return telephonyManager; in getAssistedDialingTelephonyManager() 104 return telephonyManager; in getAssistedDialingTelephonyManager() 107 telephonyManager.createForSubscriptionId(subscriptionInfo.get().getSubscriptionId()); in getAssistedDialingTelephonyManager() 112 return telephonyManager; in getAssistedDialingTelephonyManager()
|
/packages/apps/Dialer/java/com/android/dialer/location/ |
D | CountryDetector.java | 78 private final TelephonyManager telephonyManager; field in CountryDetector 86 TelephonyManager telephonyManager, in CountryDetector() argument 90 this.telephonyManager = telephonyManager; in CountryDetector() 161 return telephonyManager.getNetworkCountryIso(); in getNetworkBasedCountryIso() 178 return telephonyManager.getSimCountryIso(); in getSimBasedCountryIso() 193 return telephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM; in isNetworkCountryCodeAvailable()
|
/packages/apps/Dialer/java/com/android/dialer/dialpadview/ |
D | SpecialCharSequenceMgr.java | 174 TelephonyManager telephonyManager = in handleAdnEntry() local 176 if (telephonyManager == null in handleAdnEntry() 177 || telephonyManager.getPhoneType() != TelephonyManager.PHONE_TYPE_GSM) { in handleAdnEntry() 315 TelephonyManager telephonyManager = in handleDeviceIdDisplay() local 318 if (telephonyManager != null && input.equals(MMI_IMEI_DISPLAY)) { in handleDeviceIdDisplay() 320 (telephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_GSM) in handleDeviceIdDisplay() 327 if (TelephonyManagerCompat.getPhoneCount(telephonyManager) > 1) { in handleDeviceIdDisplay() 328 for (int slot = 0; slot < telephonyManager.getPhoneCount(); slot++) { in handleDeviceIdDisplay() 329 String deviceId = telephonyManager.getDeviceId(slot); in handleDeviceIdDisplay() 342 telephonyManager.getDeviceId(), in handleDeviceIdDisplay()
|
/packages/apps/Contacts/src/com/android/contacts/util/ |
D | TelephonyManagerUtils.java | 37 final TelephonyManager telephonyManager = in getVoiceMailAlphaTag() local 39 final String voiceMailLabel = telephonyManager.getVoiceMailAlphaTag(); in getVoiceMailAlphaTag() 51 final TelephonyManager telephonyManager = in getCurrentCountryIso() local 53 String countryIso = telephonyManager.getNetworkCountryIso().toUpperCase(); in getCurrentCountryIso()
|
/packages/apps/Settings/src/com/android/settings/network/telephony/ |
D | MobileNetworkUtils.java | 344 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) in setMobileDataEnabled() local 348 telephonyManager.setDataEnabled(enabled); in setMobileDataEnabled() 372 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) in isCdmaOptions() local 378 if (telephonyManager.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) { in isCdmaOptions() 432 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) in isGsmBasicOptions() local 437 if (telephonyManager.getPhoneType() == PhoneConstants.PHONE_TYPE_GSM) { in isGsmBasicOptions() 465 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) in shouldDisplayNetworkSelectOptions() local 476 && !telephonyManager.isManualNetworkSelectionAllowed())) { in shouldDisplayNetworkSelectOptions() 514 private static boolean isTdscdmaSupported(Context context, TelephonyManager telephonyManager) { in isTdscdmaSupported() argument 526 final String operatorNumeric = telephonyManager.getServiceState().getOperatorNumeric(); in isTdscdmaSupported()
|
/packages/apps/Dialer/java/com/android/dialer/app/voicemail/ |
D | VoicemailErrorManager.java | 112 TelephonyManager telephonyManager = in addServiceStateListener() local 116 if (telephonyManager == null) { in addServiceStateListener() 128 telephonyManager.listen(serviceStateListener, PhoneStateListener.LISTEN_SERVICE_STATE); in addServiceStateListener() 161 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in onDestroy() local 163 telephonyManager.listen(listener, PhoneStateListener.LISTEN_NONE); in onDestroy()
|
/packages/apps/Dialer/java/com/android/voicemail/impl/ |
D | CarrierIdentifier.java | 63 TelephonyManager telephonyManager = in forHandle() local 67 if (telephonyManager == null) { in forHandle() 70 String gid1 = telephonyManager.getGroupIdLevel1(); in forHandle() 76 builder().setMccMnc(telephonyManager.getSimOperator()).setGid1(gid1).build()); in forHandle()
|
/packages/apps/Car/Settings/src/com/android/car/settings/network/ |
D | NetworkUtils.java | 48 public static boolean hasSim(TelephonyManager telephonyManager) { in hasSim() argument 49 int simState = telephonyManager.getSimState(); in hasSim() 63 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) in setMobileDataEnabled() local 67 telephonyManager.setDataEnabled(enabled); in setMobileDataEnabled()
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/ |
D | ConnectivityListener.java | 138 final TelephonyManager telephonyManager = mContext in onStart() local 140 if (telephonyManager != null) { in onStart() 141 telephonyManager.listen(mPhoneStateListener, in onStart() 167 final TelephonyManager telephonyManager = mContext in onStop() local 169 if (telephonyManager != null) { in onStop() 170 telephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); in onStop()
|
/packages/apps/Contacts/src/com/android/contacts/location/ |
D | CountryDetector.java | 52 private CountryDetector(Context context, TelephonyManager telephonyManager, in CountryDetector() argument 54 mTelephonyManager = telephonyManager; in CountryDetector() 62 public CountryDetector getInstanceForTest(Context context, TelephonyManager telephonyManager, in getInstanceForTest() argument 64 return new CountryDetector(context, telephonyManager, localeProvider); in getInstanceForTest()
|
/packages/services/Telecomm/testapps/src/com/android/server/telecom/testapps/ |
D | TestUssdActivity.java | 24 public void onReceiveUssdResponse(final TelephonyManager telephonyManager, 31 public void onReceiveUssdResponseFailed(final TelephonyManager telephonyManager, 64 final TelephonyManager telephonyManager = in placeUssdRequest() local 69 telephonyManager.sendUssdRequest(mUssdNumber, mReceiveUssdResponseCallback, h); in placeUssdRequest()
|