/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/Settings/src/com/android/settings/network/ |
D | MobileNetworkRepository.java | 249 TelephonyManager telephonyManager = mContext.getSystemService( in createTelephonyManagerBySubId() local 251 telephonyManager.registerTelephonyCallback(mContext.getMainExecutor(), in createTelephonyManagerBySubId() 254 mTelephonyManagerMap.put(subId, telephonyManager); in createTelephonyManagerBySubId() 258 TelephonyManager telephonyManager = mTelephonyManagerMap.get(subId); in getTelephonyManagerBySubId() local 259 if (telephonyManager != null) { in getTelephonyManagerBySubId() 260 return telephonyManager; in getTelephonyManagerBySubId() 264 telephonyManager = context.getSystemService(TelephonyManager.class); in getTelephonyManagerBySubId() 265 if (telephonyManager != null) { in getTelephonyManagerBySubId() 266 telephonyManager = telephonyManager.createForSubscriptionId(subId); in getTelephonyManagerBySubId() 272 return telephonyManager; in getTelephonyManagerBySubId() [all …]
|
D | AllowedNetworkTypesListener.java | 54 TelephonyManager telephonyManager = context.getSystemService( in register() local 56 telephonyManager.registerTelephonyCallback(mExecutor, this); in register() 65 TelephonyManager telephonyManager = context.getSystemService( in unregister() local 67 telephonyManager.unregisterTelephonyCallback(this); in unregister()
|
/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/apps/Settings/src/com/android/settings/datausage/lib/ |
D | DataUsageLib.java | 46 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in getMobileTemplate() local 47 final int mobileDefaultSubId = telephonyManager.getSubscriptionId(); in getMobileTemplate() 55 return getMobileTemplateForSubId(telephonyManager, mobileDefaultSubId); in getMobileTemplate() 60 return getNormalizedMobileTemplate(telephonyManager, subId); in getMobileTemplate() 64 return getMobileTemplateForSubId(telephonyManager, mobileDefaultSubId); in getMobileTemplate() 68 TelephonyManager telephonyManager, int subId) { in getNormalizedMobileTemplate() argument 69 final NetworkTemplate mobileTemplate = getMobileTemplateForSubId(telephonyManager, subId); in getNormalizedMobileTemplate() 70 final String[] mergedSubscriberIds = telephonyManager in getNormalizedMobileTemplate() 103 TelephonyManager telephonyManager, int subId) { in getMobileTemplateForSubId() argument 105 String subscriberId = telephonyManager.getSubscriberId(subId); in getMobileTemplateForSubId()
|
/packages/apps/Car/Settings/tests/unit/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 | 46 TelephonyManager telephonyManager = mock(TelephonyManager.class); in getAvailableSubscriptions_hasSubscriptionsFromSubscriptionManager_valueReturned() local 52 when(telephonyManager.getUiccSlotsInfo()).thenReturn(new UiccSlotInfo[0]); in getAvailableSubscriptions_hasSubscriptionsFromSubscriptionManager_valueReturned() 55 subscriptionManager, telephonyManager); in getAvailableSubscriptions_hasSubscriptionsFromSubscriptionManager_valueReturned() 63 TelephonyManager telephonyManager = mock(TelephonyManager.class); in getAvailableSubscriptions_hasSimSlotNotInSubscriptionManager_valueReturned() local 73 when(telephonyManager.getUiccSlotsInfo()).thenReturn(new UiccSlotInfo[]{slotInfo}); in getAvailableSubscriptions_hasSimSlotNotInSubscriptionManager_valueReturned() 76 subscriptionManager, telephonyManager); in getAvailableSubscriptions_hasSimSlotNotInSubscriptionManager_valueReturned() 84 TelephonyManager telephonyManager = mock(TelephonyManager.class); in getAvailableSubscriptions_hasInactiveInsertedPSim_valueRemoved() local 90 when(telephonyManager.getUiccSlotsInfo()).thenReturn(new UiccSlotInfo[0]); in getAvailableSubscriptions_hasInactiveInsertedPSim_valueRemoved() 93 subscriptionManager, telephonyManager); in getAvailableSubscriptions_hasInactiveInsertedPSim_valueRemoved()
|
/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/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/coex/ |
D | CoexManagerTest.java | 129 TelephonyManager telephonyManager = mock(TelephonyManager.class); in setUpSubIdMocks() local 131 .thenReturn(telephonyManager); in setUpSubIdMocks() 135 return telephonyManager; in setUpSubIdMocks() 392 final TelephonyManager telephonyManager = setUpSubIdMocks(0); in testTelephonyCallback_defaultAlgorithmEnabledXmlExists_registersWithTelephony() local 398 verify(telephonyManager, times(1)) in testTelephonyCallback_defaultAlgorithmEnabledXmlExists_registersWithTelephony() 413 final TelephonyManager telephonyManager = setUpSubIdMocks(0); in testTelephonyCallback_defaultAlgorithmDisabled_doesNotRegisterWithTelephony() local 416 verify(telephonyManager, never()) in testTelephonyCallback_defaultAlgorithmDisabled_doesNotRegisterWithTelephony() 429 final TelephonyManager telephonyManager = setUpSubIdMocks(0); in testGetCoexUnsafeChannels_neighboringLte40_returns2gNeighboringChannels() local 436 verify(telephonyManager).registerTelephonyCallback(any(Executor.class), in testGetCoexUnsafeChannels_neighboringLte40_returns2gNeighboringChannels() 461 final TelephonyManager telephonyManager = setUpSubIdMocks(0); in testGetCoexUnsafeChannels_neighboringLte46_returns5gNeighboringChannels() local [all …]
|
/packages/services/Telephony/src/com/android/phone/vvm/ |
D | VvmSimStateTracker.java | 86 TelephonyManager telephonyManager = getTelephonyManager(mContext, mPhoneAccountHandle); in listen() local 87 if(telephonyManager == null){ in listen() 91 telephonyManager.registerTelephonyCallback(TelephonyManager.INCLUDE_LOCATION_DATA_NONE, in listen() 162 TelephonyManager telephonyManager = getTelephonyManager(context, phoneAccountHandle); in onBootCompleted() local 163 if (telephonyManager == null) { in onBootCompleted() 166 if (telephonyManager.getServiceState().getState() == ServiceState.STATE_IN_SERVICE) { in onBootCompleted() 222 TelephonyManager telephonyManager = getTelephonyManager(context, phoneAccountHandle); in onCarrierConfigChanged() local 223 if(telephonyManager == null){ in onCarrierConfigChanged() 234 if (telephonyManager.getServiceState().getState() in onCarrierConfigChanged()
|
/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 | MmsRequest.java | 222 final TelephonyManager telephonyManager = mContext.getSystemService( in listenToDataConnectionState() local 224 telephonyManager.registerTelephonyCallback(r -> r.run(), connectionStateCallback); in listenToDataConnectionState() 229 final TelephonyManager telephonyManager = mContext.getSystemService( in stopListeningToDataConnectionState() local 231 telephonyManager.unregisterTelephonyCallback(connectionStateCallback); in stopListeningToDataConnectionState() 310 TelephonyManager telephonyManager = in reportPossibleAnomaly() local 316 telephonyManager.getSimCarrierId()); in reportPossibleAnomaly() 350 final TelephonyManager telephonyManager = mContext.getSystemService( in isPoorSignal() local 352 final int cellLevel = telephonyManager.getSignalStrength().getLevel(); in isPoorSignal()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/consent/ |
D | DeviceRegionProvider.java | 46 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in isEuDevice() local 48 if (telephonyManager == null) return true; in isEuDevice() 57 String deviceCountryIso = telephonyManager.getSimCountryIso(); in isEuDevice() 81 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in isEuDevice() local 83 if (telephonyManager == null) return true; in isEuDevice() 92 String deviceCountryIso = telephonyManager.getSimCountryIso(); in isEuDevice()
|
/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/services/Telephony/testapps/TestRcsApp/aosp_test_rcsclient/src/com/android/libraries/rcs/simpleclient/filetransfer/requestexecutor/ |
D | GbaAuthenticationProvider.java | 40 private final TelephonyManager telephonyManager; field in GbaAuthenticationProvider 45 TelephonyManager telephonyManager, String contentServerUrl, Executor executor) { in GbaAuthenticationProvider() argument 46 this.telephonyManager = telephonyManager; in GbaAuthenticationProvider() 57 PersistableBundle carrierConfig = telephonyManager.getCarrierConfig(); in provideCredentials() 97 telephonyManager.bootstrapAuthenticationRequest( in provideCredentials()
|
/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()
|
/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/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/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/Settings/src/com/android/settings/network/telephony/ |
D | MobileNetworkUtils.java | 339 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in isMobileDataEnabled() local 340 if (!telephonyManager.isDataEnabled()) { in isMobileDataEnabled() 342 final TelephonyManager tmDefaultData = telephonyManager.createForSubscriptionId( in isMobileDataEnabled() 357 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) in setMobileDataEnabled() local 361 telephonyManager.setDataEnabled(enabled); in setMobileDataEnabled() 394 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) in isCdmaOptions() local 396 if (telephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) { in isCdmaOptions() 402 (int) telephonyManager.getAllowedNetworkTypesForReason( in isCdmaOptions() 430 final TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class) in isGsmOptions() local 433 (int) telephonyManager.getAllowedNetworkTypesForReason( in isGsmOptions() [all …]
|
/packages/apps/Settings/src/com/android/settings/sim/ |
D | SimDialogActivity.java | 256 final TelephonyManager telephonyManager = getSystemService( in autoDataSwitchEnabledOnNonDataSub() local 258 if (telephonyManager.isMobileDataPolicyEnabled( in autoDataSwitchEnabledOnNonDataSub() 323 final TelephonyManager telephonyManager = getSystemService( in onEnableAutoDataSwitch() local 325 telephonyManager.setMobileDataPolicyEnabled( in onEnableAutoDataSwitch() 348 final TelephonyManager telephonyManager = getSystemService( in setDefaultDataSubId() local 352 telephonyManager.setDataEnabledForReason(TelephonyManager.DATA_ENABLED_REASON_USER, in setDefaultDataSubId() 377 final TelephonyManager telephonyManager = getSystemService(TelephonyManager.class); in subscriptionIdToPhoneAccountHandle() local 380 if (subId == telephonyManager.getSubscriptionId(handle)) { in subscriptionIdToPhoneAccountHandle()
|
/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/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()
|