/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/apps/Settings/src/com/android/settings/datausage/lib/ |
D | DataUsageLib.kt | 37 val telephonyManager = context.getSystemService(TelephonyManager::class.java)!! in getMobileTemplate() constant 38 val mobileDefaultSubId = telephonyManager.subscriptionId in getMobileTemplate() 43 return getMobileTemplateForSubId(telephonyManager, mobileDefaultSubId) in getMobileTemplate() 47 return getNormalizedMobileTemplate(telephonyManager, subId) in getMobileTemplate() 51 return getMobileTemplateForSubId(telephonyManager, mobileDefaultSubId) in getMobileTemplate() 55 telephonyManager: TelephonyManager, in getNormalizedMobileTemplate() 58 val mobileTemplate = getMobileTemplateForSubId(telephonyManager, subId) in getNormalizedMobileTemplate() 60 telephonyManager.createForSubscriptionId(subId).mergedImsisFromGroup in getNormalizedMobileTemplate() 90 fun getMobileTemplateForSubId(telephonyManager: TelephonyManager, subId: Int): NetworkTemplate { in getMobileTemplateForSubId() 92 val subscriberId = telephonyManager.getSubscriberId(subId) in getMobileTemplateForSubId()
|
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/datausage/lib/ |
D | DataUsageLibTest.kt | 48 private lateinit var telephonyManager: TelephonyManager variable in com.android.settings.datausage.lib.DataUsageLibTest 56 .thenReturn(telephonyManager) in setUp() 60 whenever(telephonyManager.subscriptionId).thenReturn(DEFAULT_SUB_ID) in setUp() 61 whenever(telephonyManager.getSubscriberId(SUB_ID)).thenReturn(SUBSCRIBER_ID) in setUp() 62 whenever(telephonyManager.getSubscriberId(DEFAULT_SUB_ID)).thenReturn(DEFAULT_SUBSCRIBER_ID) in setUp() 63 whenever(telephonyManager.createForSubscriptionId(SUB_ID)).thenReturn(telephonyManager) in setUp() 92 whenever(telephonyManager.mergedImsisFromGroup).thenReturn(emptyArray()) in getMobileTemplate_mergedImsisFromGroupEmpty_returnRequestedSub() 105 whenever(telephonyManager.mergedImsisFromGroup).thenReturn(arrayOf(DEFAULT_SUBSCRIBER_ID)) in getMobileTemplate_mergedImsisFromGroupNotContainSub_returnRequestedSub() 118 whenever(telephonyManager.mergedImsisFromGroup) in getMobileTemplate_mergedImsisFromGroupContainSub_returnRequestedSub() 131 whenever(telephonyManager.getSubscriberId(SUB_ID)).thenReturn(SUBSCRIBER_ID) in getMobileTemplateForSubId_subscriberIdNotNull() [all …]
|
/packages/apps/Settings/src/com/android/settings/network/telephony/ |
D | MmsMessagePreferenceController.kt | 40 private lateinit var telephonyManager: TelephonyManager variable 46 telephonyManager = mContext.getSystemService(TelephonyManager::class.java)!! in init() 52 this::telephonyManager.isInitialized && in getAvailabilityStatus() 53 !telephonyManager.isDataEnabled && in getAvailabilityStatus() 54 telephonyManager.isApnMetered(ApnSetting.TYPE_MMS) && in getAvailabilityStatus() 61 telephonyManager.createForSubscriptionId(defaultDataSubId).isDataEnabled && in getAvailabilityStatus() 62 telephonyManager.isMobileDataPolicyEnabled( in getAvailabilityStatus() 81 override fun isChecked(): Boolean = telephonyManager.isMobileDataPolicyEnabled( in isChecked() 86 telephonyManager.setMobileDataPolicyEnabled( in isChecked()
|
D | TelephonyRepository.kt | 49 val telephonyManager = context.telephonyManager(subId) in isMobileDataPolicyEnabledFlow() constant 52 telephonyManager.isMobileDataPolicyEnabled(policy) in isMobileDataPolicyEnabledFlow() 64 val telephonyManager = context.telephonyManager(subId) in setMobileDataPolicyEnabled() constant 66 telephonyManager.setMobileDataPolicyEnabled(policy, enabled) in setMobileDataPolicyEnabled() 74 val telephonyManager = context.telephonyManager(subId) in isDataEnabledFlow() constant 75 telephonyManager.isDataEnabledForReason(TelephonyManager.DATA_ENABLED_REASON_USER) in isDataEnabledFlow() 117 ): Flow<T> = telephonyManager(subId).telephonyCallbackFlow(block) in telephonyCallbackFlow() 130 fun Context.telephonyManager(subId: Int): TelephonyManager = method
|
D | VoNrRepository.kt | 33 private val telephonyManager = context.telephonyManager(subId) constant in com.android.settings.network.telephony.VoNrRepository 53 ((telephonyManager.supportedRadioAccessFamily and in has5gCapability() 58 .map { telephonyManager.isVoNrEnabled } in isVoNrEnabledFlow() 65 val result = telephonyManager.setVoNrEnabled(enabled) in <lambda>()
|
/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/apps/Settings/src/com/android/settings/network/ |
D | MobileNetworkRepository.java | 244 TelephonyManager telephonyManager = mContext.getSystemService( in createTelephonyManagerBySubId() local 246 telephonyManager.registerTelephonyCallback(mContext.getMainExecutor(), in createTelephonyManagerBySubId() 249 mTelephonyManagerMap.put(subId, telephonyManager); in createTelephonyManagerBySubId() 253 TelephonyManager telephonyManager = mTelephonyManagerMap.get(subId); in getTelephonyManagerBySubId() local 254 if (telephonyManager != null) { in getTelephonyManagerBySubId() 255 return telephonyManager; in getTelephonyManagerBySubId() 259 telephonyManager = context.getSystemService(TelephonyManager.class); in getTelephonyManagerBySubId() 260 if (telephonyManager != null) { in getTelephonyManagerBySubId() 261 telephonyManager = telephonyManager.createForSubscriptionId(subId); in getTelephonyManagerBySubId() 267 return telephonyManager; in getTelephonyManagerBySubId() [all …]
|
D | AllowedNetworkTypesListener.java | 58 TelephonyManager telephonyManager = context.getSystemService( in register() local 60 telephonyManager.registerTelephonyCallback(mExecutor, this); in register() 69 TelephonyManager telephonyManager = context.getSystemService( in unregister() local 71 telephonyManager.unregisterTelephonyCallback(this); in unregister()
|
/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/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()
|
/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/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/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/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/modules/ConfigInfrastructure/service/java/com/android/server/deviceconfig/ |
D | SimPinReplayManager.java | 53 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in prepareSimPinReplay() local 54 if (telephonyManager == null) { in prepareSimPinReplay() 59 int prepareUnattendedRebootResult = telephonyManager.prepareForUnattendedReboot(); in prepareSimPinReplay() 76 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in getPinLockedSubscriptionIds() local 79 if (telephonyManager.createForSubscriptionId(subscriptionId).isIccLockEnabled()) { in getPinLockedSubscriptionIds()
|
/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/modules/Bluetooth/android/pandora/server/src/ |
D | Map.kt | 36 private var telephonyManager = context.getSystemService(TelephonyManager::class.java)!! variable 42 telephonyManager = telephonyManager.createForSubscriptionId(defaultSmsSub) in sendSMS() 43 val avdPhoneNumber = telephonyManager.getLine1Number() in sendSMS()
|
/packages/apps/Settings/src/com/android/settings/network/telephony/scan/ |
D | NetworkScanRepository.kt | 31 import com.android.settings.network.telephony.telephonyManager 52 private val telephonyManager = context.telephonyManager(subId) constant 97 val networkScan = telephonyManager.requestNetworkScan( in <lambda>() 129 telephonyManager.getAllowedNetworkTypesBitmask() and in getAllowedNetworkTypes() 166 val phoneCapability = telephonyManager.getPhoneCapability() in hasNrSaCapability()
|