Home
last modified time | relevance | path

Searched refs:telephonyManager (Results 1 – 25 of 111) sorted by relevance

12345

/packages/apps/Contacts/src/com/android/contacts/compat/
DTelephonyManagerCompat.java42 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 …]
DTelephonyManagerSdkCompat.java27 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/
DTelephonyManagerCompat.java96 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/Settings/src/com/android/settings/datausage/lib/
DDataUsageLib.java40 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in getMobileTemplate() local
41 final int mobileDefaultSubId = telephonyManager.getSubscriptionId(); in getMobileTemplate()
49 return getMobileTemplateForSubId(telephonyManager, mobileDefaultSubId); in getMobileTemplate()
54 return getNormalizedMobileTemplate(telephonyManager, subId); in getMobileTemplate()
58 return getMobileTemplateForSubId(telephonyManager, mobileDefaultSubId); in getMobileTemplate()
62 TelephonyManager telephonyManager, int subId) { in getNormalizedMobileTemplate() argument
63 final NetworkTemplate mobileTemplate = getMobileTemplateForSubId(telephonyManager, subId); in getNormalizedMobileTemplate()
64 final String[] mergedSubscriberIds = telephonyManager in getNormalizedMobileTemplate()
75 TelephonyManager telephonyManager, int subId) { in getMobileTemplateForSubId() argument
76 return NetworkTemplate.buildTemplateMobileAll(telephonyManager.getSubscriberId(subId)); in getMobileTemplateForSubId()
/packages/apps/Dialer/java/com/android/dialer/assisteddialing/
DLocationDetector.java34 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/
DSuppServicesUiUtil.java92 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/
DNetworkUtilsTest.java64 TelephonyManager telephonyManager = mock(TelephonyManager.class); in hasSim_simAbsent_returnsFalse() local
65 when(telephonyManager.getSimState()).thenReturn(TelephonyManager.SIM_STATE_ABSENT); in hasSim_simAbsent_returnsFalse()
67 assertThat(NetworkUtils.hasSim(telephonyManager)).isFalse(); in hasSim_simAbsent_returnsFalse()
72 TelephonyManager telephonyManager = mock(TelephonyManager.class); in hasSim_simUnknown_returnsFalse() local
73 when(telephonyManager.getSimState()).thenReturn(TelephonyManager.SIM_STATE_UNKNOWN); in hasSim_simUnknown_returnsFalse()
75 assertThat(NetworkUtils.hasSim(telephonyManager)).isFalse(); in hasSim_simUnknown_returnsFalse()
80 TelephonyManager telephonyManager = mock(TelephonyManager.class); in hasSim_otherStatus_returnsTrue() local
81 when(telephonyManager.getSimState()).thenReturn(TelephonyManager.SIM_STATE_LOADED); in hasSim_otherStatus_returnsTrue()
83 assertThat(NetworkUtils.hasSim(telephonyManager)).isTrue(); in hasSim_otherStatus_returnsTrue()
DSubscriptionUtilsTest.java43 TelephonyManager telephonyManager = mock(TelephonyManager.class); in getAvailableSubscriptions_hasSubscriptionsFromSubscriptionManager_valueReturned() local
49 when(telephonyManager.getUiccSlotsInfo()).thenReturn(new UiccSlotInfo[0]); in getAvailableSubscriptions_hasSubscriptionsFromSubscriptionManager_valueReturned()
52 subscriptionManager, telephonyManager); in getAvailableSubscriptions_hasSubscriptionsFromSubscriptionManager_valueReturned()
60 TelephonyManager telephonyManager = mock(TelephonyManager.class); in getAvailableSubscriptions_hasSimSlotNotInSubscriptionManager_valueReturned() local
70 when(telephonyManager.getUiccSlotsInfo()).thenReturn(new UiccSlotInfo[]{slotInfo}); in getAvailableSubscriptions_hasSimSlotNotInSubscriptionManager_valueReturned()
73 subscriptionManager, telephonyManager); in getAvailableSubscriptions_hasSimSlotNotInSubscriptionManager_valueReturned()
81 TelephonyManager telephonyManager = mock(TelephonyManager.class); in getAvailableSubscriptions_hasInactiveInsertedPSim_valueRemoved() local
87 when(telephonyManager.getUiccSlotsInfo()).thenReturn(new UiccSlotInfo[0]); in getAvailableSubscriptions_hasInactiveInsertedPSim_valueRemoved()
90 subscriptionManager, telephonyManager); in getAvailableSubscriptions_hasInactiveInsertedPSim_valueRemoved()
/packages/services/Telephony/src/com/android/phone/vvm/
DVvmSimStateTracker.java82 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/
DMobileNetworkUtils.java222 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/
DPhoneUtils.java42 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()
DMmsHttpClient.java476 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/
DShortcutViewUtils.java213 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()
DCallForwardEditPreference.java93 TelephonyManager telephonyManager = new TelephonyManager(getContext(), in init() local
96 telephonyManager.getSimCarrierId()); in init()
263 final TelephonyManager telephonyManager = in getCurrentCountryIso() local
265 if (telephonyManager == null) { in getCurrentCountryIso()
268 return telephonyManager.getNetworkCountryIso().toUpperCase(); in getCurrentCountryIso()
284 public void onReceiveUssdResponse(final TelephonyManager telephonyManager,
311 public void onReceiveUssdResponseFailed(final TelephonyManager telephonyManager,
468 TelephonyManager telephonyManager = in sendUssdCommand() local
470 telephonyManager.sendUssdRequest(newUssdCommand, inputCallback, mHandler); in sendUssdCommand()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/datausage/
DDataUsageUtils.java74 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/
DAssistedDialAction.java88 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/
DCountryDetector.java78 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/
DSpecialCharSequenceMgr.java174 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/
DTelephonyManagerUtils.java37 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/Dialer/java/com/android/voicemail/impl/
DCarrierIdentifier.java63 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/Dialer/java/com/android/dialer/app/voicemail/
DVoicemailErrorManager.java112 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/Car/Settings/src/com/android/car/settings/network/
DNetworkUtils.java48 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/Contacts/src/com/android/contacts/location/
DCountryDetector.java52 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/
DTestUssdActivity.java24 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()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/connectivity/
DConnectivityListener.java143 final TelephonyManager telephonyManager = mContext in onStart() local
145 if (telephonyManager != null) { in onStart()
146 telephonyManager.listen(mPhoneStateListener, in onStart()
172 final TelephonyManager telephonyManager = mContext in onStop() local
174 if (telephonyManager != null) { in onStop()
175 telephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE); in onStop()

12345