Home
last modified time | relevance | path

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

12

/cts/tests/tests/telephony2/src/android/telephony2/cts/
DNoLocationPermissionTest.java56 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testGetCellLocation() local
57 assertNotNull(telephonyManager); in testGetCellLocation()
60 telephonyManager.getCellLocation(); in testGetCellLocation()
73 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testGetAllCellInfo() local
74 assertNotNull(telephonyManager); in testGetAllCellInfo()
77 telephonyManager.getAllCellInfo(); in testGetAllCellInfo()
90 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testListenCellLocation() local
91 assertNotNull(telephonyManager); in testListenCellLocation()
94 telephonyManager.listen(new PhoneStateListener(Runnable::run), in testListenCellLocation()
108 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testRequestCellInfoUpdate() local
[all …]
DCallStateListenerPermissionTest.java76 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testRegisterWithNoCallLogPermission() local
77 assertNotNull(telephonyManager); in testRegisterWithNoCallLogPermission()
81 () -> telephonyManager.registerTelephonyCallback(mSimpleExecutor, callback)); in testRegisterWithNoCallLogPermission()
98 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testCallStatePermission() local
99 assertNotNull(telephonyManager); in testCallStatePermission()
107 telephonyManager.registerTelephonyCallback(mSimpleExecutor, callback); in testCallStatePermission()
114 telephonyManager.listen(new PhoneStateListener(Runnable::run), in testCallStatePermission()
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
DDeviceIdentifiersTest.java46 TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService( in testProfileOwnerCanGetDeviceIdentifiersWithPermission() local
50 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in testProfileOwnerCanGetDeviceIdentifiersWithPermission()
51 TelephonyManager::getDeviceId), telephonyManager.getDeviceId()); in testProfileOwnerCanGetDeviceIdentifiersWithPermission()
55 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in testProfileOwnerCanGetDeviceIdentifiersWithPermission()
56 TelephonyManager::getImei), telephonyManager.getImei()); in testProfileOwnerCanGetDeviceIdentifiersWithPermission()
61 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in testProfileOwnerCanGetDeviceIdentifiersWithPermission()
62 TelephonyManager::getMeid), telephonyManager.getMeid()); in testProfileOwnerCanGetDeviceIdentifiersWithPermission()
65 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in testProfileOwnerCanGetDeviceIdentifiersWithPermission()
66 TelephonyManager::getSubscriberId), telephonyManager.getSubscriberId()); in testProfileOwnerCanGetDeviceIdentifiersWithPermission()
69 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in testProfileOwnerCanGetDeviceIdentifiersWithPermission()
[all …]
/cts/hostsidetests/appsecurity/test-apps/DeviceIdentifiers/src/android/appsecurity/cts/deviceids/
DDeviceIdentifierAppOpTest.java52 TelephonyManager telephonyManager = in testAccessToDeviceIdentifiersWithAppOp() local
56 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in testAccessToDeviceIdentifiersWithAppOp()
57 (tm) -> tm.getDeviceId()), telephonyManager.getDeviceId()); in testAccessToDeviceIdentifiersWithAppOp()
59 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in testAccessToDeviceIdentifiersWithAppOp()
60 (tm) -> tm.getImei()), telephonyManager.getImei()); in testAccessToDeviceIdentifiersWithAppOp()
62 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in testAccessToDeviceIdentifiersWithAppOp()
63 (tm) -> tm.getMeid()), telephonyManager.getMeid()); in testAccessToDeviceIdentifiersWithAppOp()
65 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in testAccessToDeviceIdentifiersWithAppOp()
66 (tm) -> tm.getSubscriberId()), telephonyManager.getSubscriberId()); in testAccessToDeviceIdentifiersWithAppOp()
69 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in testAccessToDeviceIdentifiersWithAppOp()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/telephony/
DTelephony.kt28 private val telephonyManager = constant
35 return telephonyManager.getDeviceId() in getDeviceId()
42 return telephonyManager.getImei() in getImei()
49 return telephonyManager.getMeid() in getMeid()
56 return telephonyManager.getSubscriberId() in getSubscriberId()
63 return telephonyManager.getSimSerialNumber() in getSimSerialNumber()
70 return telephonyManager.getNai() in getNai()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DDeviceIdentifiersTest.java32 TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService( in testProfileOwnerOnPersonalDeviceCannotGetDeviceIdentifiers() local
40 assertAccessDenied(telephonyManager::getDeviceId, mayReturnNull); in testProfileOwnerOnPersonalDeviceCannotGetDeviceIdentifiers()
41 assertAccessDenied(telephonyManager::getImei, mayReturnNull); in testProfileOwnerOnPersonalDeviceCannotGetDeviceIdentifiers()
42 assertAccessDenied(telephonyManager::getMeid, mayReturnNull); in testProfileOwnerOnPersonalDeviceCannotGetDeviceIdentifiers()
43 assertAccessDenied(telephonyManager::getSubscriberId, mayReturnNull); in testProfileOwnerOnPersonalDeviceCannotGetDeviceIdentifiers()
44 assertAccessDenied(telephonyManager::getSimSerialNumber, mayReturnNull); in testProfileOwnerOnPersonalDeviceCannotGetDeviceIdentifiers()
45 assertAccessDenied(telephonyManager::getNai, mayReturnNull); in testProfileOwnerOnPersonalDeviceCannotGetDeviceIdentifiers()
/cts/tests/devicepolicy/src/android/devicepolicy/cts/
DDeviceIdentifiersTest.java63 assertThat(testApp.telephonyManager().getDeviceId()).isEqualTo(deviceId); in getDeviceId_smsAppReturnsSameValue()
77 assertThat(testApp.telephonyManager().getImei()).isEqualTo(deviceId); in getImei_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue()
91 assertThat(testApp.telephonyManager().getMeid()).isEqualTo(deviceId); in getMeid_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue()
105 assertThat(testApp.telephonyManager().getSubscriberId()).isEqualTo(subscriberId); in getSubscriberId_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue()
119 assertThat(testApp.telephonyManager().getSimSerialNumber()).isEqualTo(simSerialNumber); in getSimSerialNumber_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue()
133 assertThat(testApp.telephonyManager().getNai()).isEqualTo(nai); in getNai_withReadPrivilegedPhoneStatePermission_withReadPhoneStatePermission_returnsSameValue()
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DTelephonyRegistryManagerTest.java338 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in testCarrierPrivilegesCallback() local
341 telephonyManager, in testCarrierPrivilegesCallback()
396 telephonyManager, in testCarrierPrivilegesCallback()
409 telephonyManager, tm -> tm.unregisterCarrierPrivilegesCallback(cpc)); in testCarrierPrivilegesCallback()
434 telephonyManager, in testCarrierPrivilegesCallback()
489 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in testSimultaneousCellularCallingNotifications() local
491 ShellIdentityUtils.invokeMethodWithShellPermissionsNoReturn(telephonyManager, in testSimultaneousCellularCallingNotifications()
508 ShellIdentityUtils.invokeMethodWithShellPermissionsNoReturn(telephonyManager, in testSimultaneousCellularCallingNotifications()
521 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in testNotifyPreciseCallStateWithImsCall() local
522 ShellIdentityUtils.invokeMethodWithShellPermissionsNoReturn(telephonyManager, in testNotifyPreciseCallStateWithImsCall()
[all …]
DCarrierServiceTest.java49 TelephonyManager telephonyManager = in hasCellular() local
52 && telephonyManager.getPhoneCount() > 0; in hasCellular()
DApnCarrierIdTest.java328 TelephonyManager telephonyManager, int desiredDataState) { in PreciseDataConnectionStateListener() argument
331 telephonyManager.registerTelephonyCallback(mSimpleExecutor, this); in PreciseDataConnectionStateListener()
/cts/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/
DSimPhonebookRequirementsRule.java49 TelephonyManager telephonyManager = context.getSystemService(TelephonyManager.class); in before() local
55 telephonyManager.getSupportedModemCount(), greaterThanOrEqualTo(mMinimumSimCount)); in before()
/cts/tests/tests/telephony/current/src/android/telephony/cts/util/
DTelephonyUtils.java277 public static boolean isSkt(TelephonyManager telephonyManager) { in isSkt() argument
278 return isOperator(telephonyManager, "45005"); in isSkt()
281 public static boolean isKt(TelephonyManager telephonyManager) { in isKt() argument
282 return isOperator(telephonyManager, "45002") in isKt()
283 || isOperator(telephonyManager, "45004") in isKt()
284 || isOperator(telephonyManager, "45008"); in isKt()
287 private static boolean isOperator(TelephonyManager telephonyManager, String operator) { in isOperator() argument
288 String simOperator = telephonyManager.getSimOperator(); in isOperator()
DDefaultSmsAppHelper.java178 TelephonyManager telephonyManager = (TelephonyManager) in hasSms() local
181 return telephonyManager.isSmsCapable(); in hasSms()
/cts/tests/location/location_gnss/src/android/location/cts/gnss/
DGnssTtffTests.java120 TelephonyManager telephonyManager = (TelephonyManager) getContext().getApplicationContext() in hasCellularData() local
122 if (!telephonyManager.isDataEnabled()) { in hasCellularData()
/cts/tests/tests/telephony/current/src/android/telephony/ims/cts/
DDomainSelectionCrossSimRedialingTestOnMockModem.java134 TelephonyManager telephonyManager = (TelephonyManager) getContext() in beforeAllTests() local
137 sModemCount = telephonyManager.getActiveModemCount(); in beforeAllTests()
144 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in beforeAllTests()
161 int simCardState = telephonyManager.getSimCardState(); in beforeAllTests()
167 simCardState = telephonyManager.getSimState(); in beforeAllTests()
178 simCardState = telephonyManager.getSimState(sOtherSlot); in beforeAllTests()
DEmergencyCallDomainSelectionTestOnMockModem.java169 TelephonyManager telephonyManager = (TelephonyManager) getContext() in beforeAllTests() local
173 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in beforeAllTests()
190 int simCardState = telephonyManager.getSimCardState(); in beforeAllTests()
196 simCardState = telephonyManager.getSimState(); in beforeAllTests()
1087 TelephonyManager telephonyManager = (TelephonyManager) getContext() in testOutGoingEmergencyCall() local
1090 telephonyManager, (tm) -> tm.registerTelephonyCallback(Runnable::run, testCb)); in testOutGoingEmergencyCall()
1118 telephonyManager, (tm) -> tm.unregisterTelephonyCallback(testCb)); in testOutGoingEmergencyCall()
/cts/tests/tests/telecom/src/android/telecom/cts/
DTelecomAvailabilityTest.java130 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testCreateLaunchEmergencyDialerIntent() local
133 || !telephonyManager.isVoiceCapable()) { in testCreateLaunchEmergencyDialerIntent()
/cts/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/
DDeviceInfoInstrument.java128 (telephonyManager) -> telephonyManager.getDeviceId()); in onStart()
133 (telephonyManager) -> telephonyManager.getSubscriberId()); in onStart()
/cts/tests/tests/telephony/current/LocationAccessingApp/src/android/telephony/cts/locationaccessingapp/
DCtsLocationAccessService.java150 public static ServiceState listenForServiceState(TelephonyManager telephonyManager) { in listenForServiceState() argument
163 telephonyManager.listen(listener, PhoneStateListener.LISTEN_SERVICE_STATE); in listenForServiceState()
/cts/tests/tests/content/src/android/content/cts/
DAvailableIntentsTest.java186 TelephonyManager telephonyManager = in testDialPhoneNumber() local
189 && telephonyManager.isVoiceCapable()) { in testDialPhoneNumber()
201 TelephonyManager telephonyManager = in testDialVoicemail() local
204 && telephonyManager.isVoiceCapable()) { in testDialVoicemail()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/net/
DMultiNetworkConnectivityTestActivity.java389 private boolean isMobileDataEnabled(TelephonyManager telephonyManager) { in isMobileDataEnabled() argument
391 return telephonyManager.isDataEnabled(); in isMobileDataEnabled()
403 TelephonyManager telephonyManager = in checkPreRequisites() local
405 if (telephonyManager == null) { in checkPreRequisites()
409 } else if (!isMobileDataEnabled(telephonyManager)) { in checkPreRequisites()
/cts/tests/tests/provider/src/android/provider/cts/
DBlockedNumberContractTest.java89 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testProviderInteractionsAsRegularApp_fails() local
95 if (telephonyManager.checkCarrierPrivilegesForPackage(mContext.getPackageName()) in testProviderInteractionsAsRegularApp_fails()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/
DManifestTestListAdapter.java508 TelephonyManager telephonyManager = in matchAllConfigs() local
510 if (!telephonyManager.isVoiceCapable()) { in matchAllConfigs()
/cts/tests/tests/telephony/current/src/android/telephony/euicc/cts/
DEuiccManagerTest.java674 TelephonyManager telephonyManager = getContext().getSystemService(TelephonyManager.class); in testIsSimPortAvailableWithValidPorts() local
676 ShellIdentityUtils.invokeMethodWithShellPermissions(telephonyManager, in testIsSimPortAvailableWithValidPorts()
/cts/common/device-side/bedstead/testapp/src/library/main/java/com/android/bedstead/testapp/
DTestAppInstance.java484 public RemoteTelephonyManager telephonyManager() { in telephonyManager() method in TestAppInstance

12