/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | CarrierPrivilegeUtils.java | 87 int subId, in CarrierPrivilegeChangeMonitor() argument 94 TelephonyManager.class).createForSubscriptionId(subId); in CarrierPrivilegeChangeMonitor() 97 final int slotIndex = SubscriptionManager.getSlotIndex(subId); in CarrierPrivilegeChangeMonitor() 180 private static TelephonyManager getTelephonyManager(Context c, int subId) { in getTelephonyManager() argument 181 return c.getSystemService(TelephonyManager.class).createForSubscriptionId(subId); in getTelephonyManager() 184 private static boolean hasCarrierPrivileges(Context c, int subId) { in hasCarrierPrivileges() argument 187 return getTelephonyManager(c, subId).hasCarrierPrivileges(); in hasCarrierPrivileges() 190 private static boolean isCarrierServicePackage(Context c, int subId, boolean isShell) { in isCarrierServicePackage() argument 195 getTelephonyManager(c, subId) in isCarrierServicePackage() 197 SubscriptionManager.getSlotIndex(subId)); in isCarrierServicePackage() [all …]
|
/cts/tests/tests/vcn/src/android/net/vcn/cts/ |
D | VcnManagerTest.java | 332 boolean isRestricted, int subId) throws Exception { in createTestNetworkWrapperForPolicyTest() argument 339 return createTestNetworkWrapper(subId, LOCAL_ADDRESS, capabilities); in createTestNetworkWrapperForPolicyTest() 351 final int subId = verifyAndGetValidDataSubId(); in testApplyVcnNetworkPolicyDuringVcnSetup_onUnrestrictedNetwork() local 355 createTestNetworkWrapperForPolicyTest(false /* isRestricted */, subId)) { in testApplyVcnNetworkPolicyDuringVcnSetup_onUnrestrictedNetwork() argument 357 subId, in testApplyVcnNetworkPolicyDuringVcnSetup_onUnrestrictedNetwork() 385 final int subId = verifyAndGetValidDataSubId(); in testApplyVcnNetworkPolicyDuringVcnSetup_onRestrictedNetwork() local 389 createTestNetworkWrapperForPolicyTest(true /* isRestricted */, subId)) { in testApplyVcnNetworkPolicyDuringVcnSetup_onRestrictedNetwork() argument 392 subId, in testApplyVcnNetworkPolicyDuringVcnSetup_onRestrictedNetwork() 439 final int subId = verifyAndGetValidDataSubId(); in verifyApplyVcnNetworkPolicyPostVcnSetupChangeNetworkRestriction() local 443 createTestNetworkWrapperForPolicyTest(true /* isRestricted */, subId)) { in verifyApplyVcnNetworkPolicyPostVcnSetupChangeNetworkRestriction() argument [all …]
|
/cts/tests/tests/telephony/current/src/android/telephony/cts/util/ |
D | SubscriptionGroupUtils.java | 43 Context c, int subId, ThrowingConsumer<ParcelUuid> action) throws Exception { in withEphemeralSubscriptionGroup() argument 47 subGrp = subMgr.createSubscriptionGroup(Collections.singletonList(subId)); in withEphemeralSubscriptionGroup() 51 subMgr.removeSubscriptionsFromGroup(Collections.singletonList(subId), subGrp); in withEphemeralSubscriptionGroup() 57 Context c, int subId, ThrowingFunction<ParcelUuid, R> action) throws Exception { in withEphemeralSubscriptionGroup() argument 61 subGrp = subMgr.createSubscriptionGroup(Collections.singletonList(subId)); in withEphemeralSubscriptionGroup() 65 subMgr.removeSubscriptionsFromGroup(Collections.singletonList(subId), subGrp); in withEphemeralSubscriptionGroup()
|
/cts/tests/tests/telephony/current/src/android/telephony/ims/cts/ |
D | CallDomainSelectionTestOnMockModem.java | 277 private int getRegState(int domain, int subId) { in getRegState() argument 284 ServiceState ss = sTelephonyManager.createForSubscriptionId(subId).getServiceState(); in getRegState() 311 int subId = getActiveSubId(sTestSlot); in testCombinedAttachPsSelected() local 315 getRegState(NetworkRegistrationInfo.DOMAIN_PS, subId)); in testCombinedAttachPsSelected() 319 getRegState(NetworkRegistrationInfo.DOMAIN_CS, subId)); in testCombinedAttachPsSelected() 373 int subId = getActiveSubId(sTestSlot); in testVoiceCallOverPs() local 377 getRegState(NetworkRegistrationInfo.DOMAIN_PS, subId)); in testVoiceCallOverPs() 381 getRegState(NetworkRegistrationInfo.DOMAIN_CS, subId)); in testVoiceCallOverPs() 427 int subId = getActiveSubId(sTestSlot); in testVoiceCallOverCs() local 430 NetworkRegistrationInfo.REGISTRATION_STATE_HOME, getRegState(Domain.CS, subId)); in testVoiceCallOverCs() [all …]
|
D | TestImsService.java | 153 public void enableImsForSubscription(int slotId, int subId) { in enableImsForSubscription() argument 156 mSubIDs.add(subId); in enableImsForSubscription() 162 public void disableImsForSubscription(int slotId, int subId) { in disableImsForSubscription() argument 165 mSubIDs.add(subId); in disableImsForSubscription() 171 public RcsFeature createRcsFeatureForSubscription(int slotId, int subId) { in createRcsFeatureForSubscription() argument 199 mSubIDs.add(subId); in createRcsFeatureForSubscription() 224 public ImsConfigImplBase getConfigForSubscription(int slotId, int subId) { in getConfigForSubscription() argument 225 mSubIDs.add(subId); in getConfigForSubscription() 230 public MmTelFeature createMmTelFeatureForSubscription(int slotId, int subId) { in createMmTelFeatureForSubscription() argument 252 mSubIDs.add(subId); in createMmTelFeatureForSubscription() [all …]
|
D | ImsUtils.java | 118 private static boolean isSubIdInInfoList(List<SubscriptionInfo> infos, int subId) { in isSubIdInInfoList() argument 119 return infos.stream().anyMatch(info -> info.getSubscriptionId() == subId); in isSubIdInInfoList() 127 public static boolean shouldRunSmsImsTests(int subId) { in shouldRunSmsImsTests() argument 135 tm = tm.createForSubscriptionId(subId); in shouldRunSmsImsTests()
|
D | MmTelFeatureTestOnMockModem.java | 132 CarrierConfigReceiver(int subId) { in CarrierConfigReceiver() argument 133 mSubId = subId; in CarrierConfigReceiver() 139 int subId = intent.getIntExtra(CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX, -1); in onReceive() local 140 if (mSubId == subId) { in onReceive() 186 int subId = SubscriptionManager.getSubscriptionId(sTestSlot); in beforeAllTests() local 187 assertTrue(SubscriptionManager.isValidSubscriptionId(subId)); in beforeAllTests() 188 sTestSub = subId; in beforeAllTests()
|
D | TestSipDelegate.java | 45 public final int subId; field in TestSipDelegate 60 subId = sub; in TestSipDelegate()
|
D | EabBulkCapabilityUpdaterTest.java | 109 CarrierConfigReceiver(int subId) { in CarrierConfigReceiver() argument 110 mSubId = subId; in CarrierConfigReceiver() 116 int subId = intent.getIntExtra(CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX, -1); in onReceive() local 117 if (mSubId == subId) { in onReceive() 493 private static boolean getBooleanCarrierConfig(String key, int subId) { in getBooleanCarrierConfig() argument 497 b = mConfigManager.getConfigForSubId(subId); in getBooleanCarrierConfig()
|
/cts/tests/tests/telephony/current/src/android/telephony/cts/ |
D | FakeCarrierMessagingService.java | 33 int subId, ResultCallback<Integer> callback) { in onReceiveTextSms() argument 41 public void onSendTextSms(String text, int subId, String destAddress, in onSendTextSms() argument 50 public void onSendDataSms(byte[] data, int subId, String destAddress, in onSendDataSms() argument 59 public void onSendMultipartTextSms(List<String> parts, int subId, in onSendMultipartTextSms() argument 70 public void onSendMms(Uri pduUri, int subId, Uri location, in onSendMms() argument 80 public void onDownloadMms(Uri contentUri, int subId, Uri location, in onDownloadMms() argument
|
D | CarrierServiceTest.java | 108 int subId = SubscriptionManager.getDefaultSubscriptionId(); in notifyCarrierNetworkChangeForSubIdWithoutCarrierPrivileges() local 109 getService().notifyCarrierNetworkChange(subId, active); in notifyCarrierNetworkChangeForSubIdWithoutCarrierPrivileges() 110 fail("Expected SecurityException for notifyCarrierNetworkChangeWithSubId(" + subId in notifyCarrierNetworkChangeForSubIdWithoutCarrierPrivileges() 121 int subId = SubscriptionManager.getDefaultSubscriptionId(); in notifyCarrierNetworkChangeForSubIdWithCarrierPrivileges() local 124 subId, in notifyCarrierNetworkChangeForSubIdWithCarrierPrivileges() local 125 () -> getService().notifyCarrierNetworkChange(subId, active)); in notifyCarrierNetworkChangeForSubIdWithCarrierPrivileges() 139 public PersistableBundle onLoadConfig(int subId, CarrierIdentifier id) { in onLoadConfig() argument
|
D | CarrierConfigManagerTest.java | 546 int subId = SubscriptionManager.getDefaultSubscriptionId(); in testCarrierConfigNameOverride() local 568 mConfigManager.overrideConfig(subId, carrierNameOverride); in testCarrierConfigNameOverride() 582 mConfigManager.overrideConfig(subId, null); in testCarrierConfigNameOverride() 613 int subId = SubscriptionManager.getDefaultSubscriptionId(); in testExtraRebroadcastOnUnlock() local 615 mConfigManager.notifyConfigChangedForSubId(subId); in testExtraRebroadcastOnUnlock() 685 (slotIndex, subId, carrierId, preciseCarrierId) -> queue.offer( in testCarrierConfigChangeListener() 686 new CarrierConfigChangeParams(slotIndex, subId, carrierId, in testCarrierConfigChangeListener() 719 final int subId = SubscriptionManager.getDefaultSubscriptionId(); in testCellularServiceCapabilitiesOverride() local 720 final boolean wasDataOnlyService = isDataOnlyService(subId); in testCellularServiceCapabilitiesOverride() 725 boolean isDataOnlyService = isDataOnlyService(subId); in testCellularServiceCapabilitiesOverride() [all …]
|
D | TelephonyManagerTestOnMockModem.java | 339 private NetworkRegistrationInfo getNri(int domain, int subId) { in getNri() argument 344 ServiceState ss = sTelephonyManager.createForSubscriptionId(subId).getServiceState(); in getNri() 353 private int getRegState(int domain, int subId) { in getRegState() argument 356 NetworkRegistrationInfo nri = getNri(domain, subId); in getRegState() 364 private int getRegFailCause(int domain, int subId) { in getRegFailCause() argument 365 return getNri(domain, subId).getRejectCause(); in getRegFailCause() 418 int subId; in testServiceStateChange() local 424 subId = getActiveSubId(slotId); in testServiceStateChange() 425 assertTrue(subId > 0); in testServiceStateChange() 458 getRegState(NetworkRegistrationInfo.DOMAIN_CS, subId), in testServiceStateChange() [all …]
|
D | MmsTest.java | 355 int subId = mTelephonyManager.getSubscriptionId(); in sendMmsMessage() local 358 selfNumber = subscriptionManager.getPhoneNumber(subId); in sendMmsMessage() 598 public void setSubId(int subId) { in setSubId() argument 599 mSubId = subId; in setSubId() 605 int subId = intent.getIntExtra(CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX, -1); in onReceive() local 606 Log.d(TAG, "Carrier config changed for subId=" + subId in onReceive() 608 if (mSubId == subId) { in onReceive() 615 private static boolean overrideCarrierConfig(int subId, PersistableBundle bundle) { in overrideCarrierConfig() argument 620 sCarrierConfigReceiver.setSubId(subId); in overrideCarrierConfig() 622 (m) -> m.overrideConfig(subId, bundle)); in overrideCarrierConfig()
|
D | TestDomainSelectionService.java | 139 public void onServiceStateUpdated(int slotId, int subId, in onServiceStateUpdated() argument 143 super.onServiceStateUpdated(slotId, subId, serviceState); in onServiceStateUpdated() 149 public void onBarringInfoUpdated(int slotId, int subId, @NonNull BarringInfo barringInfo) { in onBarringInfoUpdated() argument 152 super.onBarringInfoUpdated(slotId, subId, barringInfo); in onBarringInfoUpdated()
|
D | SimultaneousCallingRestrictionsTest.java | 494 private static void updateCallCapablePhAcctsAfterSubAdded(int subId, TelecomManager tm) { in updateCallCapablePhAcctsAfterSubAdded() argument 496 assertTrue("Timed out waiting for subId=[" + subId + "] to be added to " in updateCallCapablePhAcctsAfterSubAdded() 498 updateCallCapablePhAcctsAndCheckForSubId(subId, tm), TEST_TIMEOUT_MS, 50)); in updateCallCapablePhAcctsAfterSubAdded() 504 private static boolean updateCallCapablePhAcctsAndCheckForSubId(int subId, TelecomManager tm) { in updateCallCapablePhAcctsAndCheckForSubId() argument 507 if (accountHandle.getId().equals(String.valueOf(subId))) { in updateCallCapablePhAcctsAndCheckForSubId() 592 private void registerImsCallbackAndWaitForImsUnregister(int subId, in registerImsCallbackAndWaitForImsUnregister() argument 595 registerImsRegistrationCallback(subId, callback); in registerImsCallbackAndWaitForImsUnregister() 606 private void registerImsRegistrationCallback(int subId, in registerImsRegistrationCallback() argument 610 ImsMmTelManager mmTelManager = imsManager.getImsMmTelManager(subId); in registerImsRegistrationCallback()
|
D | SubscriptionManagerTest.java | 145 CarrierConfigReceiver(int subId) { in CarrierConfigReceiver() argument 146 mSubId = subId; in CarrierConfigReceiver() 152 int subId = intent.getIntExtra(CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX, in onReceive() local 154 if (mSubId == subId) { in onReceive() 169 private void overrideCarrierConfig(PersistableBundle bundle, int subId) throws Exception { in overrideCarrierConfig() argument 170 mReceiver = new CarrierConfigReceiver(subId); in overrideCarrierConfig() 179 (cm) -> cm.overrideConfig(subId, bundle)); in overrideCarrierConfig() 797 .filter(subId -> subId != mSubId) in testSubscriptionGroupingWithPermission() 1375 private String getSubscriptionIso(int subId) { in getSubscriptionIso() argument 1377 (sm) -> sm.getActiveSubscriptionInfo(subId)); in getSubscriptionIso() [all …]
|
/cts/tests/tests/telephony/current/src/android/telephony/satellite/cts/ |
D | CarrierRoamingSatelliteTestBase.java | 161 int subId = SubscriptionManager.getSubscriptionId(SLOT_ID_0); in beforeAllTestBaseForIms() local 163 .getRegistrationForSubscription(SLOT_ID_0, subId) in beforeAllTestBaseForIms() 184 int subId = SubscriptionManager.getSubscriptionId(SLOT_ID_0); in afterAllTestBaseForIms() local 186 SLOT_ID_0, subId).onDeregistered(new ImsReasonInfo()); in afterAllTestBaseForIms() 206 int subId = intent.getIntExtra(CarrierConfigManager.EXTRA_SUBSCRIPTION_INDEX, -1); in onReceive() local 207 logd(TAG, "CarrierConfigReceiver onReceive() subId:" + subId); in onReceive() 209 if (mSubId == subId) { in onReceive() 216 public void setSubId(int subId) { in setSubId() argument 218 logd(TAG, "CarrierConfigReceiver setSubId() subId:" + subId); in setSubId() 219 mSubId = subId; in setSubId() [all …]
|
/cts/tests/tests/carrierapi/targetprep/device/src/android/carrierapi/cts/targetprep/ |
D | CsimRemover.java | 84 int subId = SubscriptionManager.getDefaultSubscriptionId(); in removeCsim() local 85 assumeTrue("No CSIM detected, CSIM removal will be skipped", isCsimPresent(subId)); in removeCsim() 88 ApduScriptUtil.runApduScript(subId, REMOVE_CSIM_SCRIPT); in removeCsim() 101 .that(isCsimPresent(subId)) in removeCsim() 105 private boolean isCsimPresent(int subId) { in isCsimPresent() argument 109 .createForSubscriptionId(subId), in isCsimPresent()
|
D | ApduScriptUtil.java | 85 public static void runApduScript(int subId, List<ApduCommand> apdus) in runApduScript() argument 90 .getActiveSubscriptionInfo(subId); in runApduScript() 131 rebootSimCard(subId, logicalSlotId, CARD_POWER_UP_PASS_THROUGH, in runApduScript() 138 rebootSimCard(subId, logicalSlotId, CARD_POWER_UP, listenToSimCardStateChange, in runApduScript() 160 private static void rebootSimCard(int subId, int logicalSlotId, int targetPowerState, in rebootSimCard() argument 164 setSimPowerAndWaitForCardState(subId, in rebootSimCard() 167 setSimPowerAndWaitForCardState(subId, in rebootSimCard() 173 setSimPowerAndWaitForCardState(subId, in rebootSimCard() 178 setSimPowerAndWaitForCardState(subId, in rebootSimCard() 182 setSimPowerAndWaitForCardState(subId, in rebootSimCard() [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | DeviceIdentifiersTest.java | 44 int subId = subscriptionManager.getDefaultSubscriptionId(); in testDeviceOwnerCanGetDeviceIdentifiersWithPermission() local 45 if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) { in testDeviceOwnerCanGetDeviceIdentifiersWithPermission() 48 (sm) -> sm.getActiveSubscriptionInfo(subId)); in testDeviceOwnerCanGetDeviceIdentifiersWithPermission() 50 subId); in testDeviceOwnerCanGetDeviceIdentifiersWithPermission()
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | DeviceIdentifiersTest.java | 81 int subId = subscriptionManager.getDefaultSubscriptionId(); in testProfileOwnerCanGetDeviceIdentifiersWithPermission() local 82 if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) { in testProfileOwnerCanGetDeviceIdentifiersWithPermission() 85 (sm) -> sm.getActiveSubscriptionInfo(subId)); in testProfileOwnerCanGetDeviceIdentifiersWithPermission() 87 subId); in testProfileOwnerCanGetDeviceIdentifiersWithPermission()
|
/cts/hostsidetests/appsecurity/test-apps/DeviceIdentifiers/src/android/appsecurity/cts/deviceids/ |
D | DeviceIdentifierAppOpTest.java | 82 int subId = subscriptionManager.getDefaultSubscriptionId(); in testAccessToDeviceIdentifiersWithAppOp() local 83 if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) { in testAccessToDeviceIdentifiersWithAppOp() 86 (sm) -> sm.getActiveSubscriptionInfo(subId)); in testAccessToDeviceIdentifiersWithAppOp() 88 subId); in testAccessToDeviceIdentifiersWithAppOp()
|
/cts/tests/tests/carrierapi/src/android/carrierapi/cts/ |
D | CarrierApiTest.java | 255 int subId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; in getFirstActivateCarrierPrivilegedSubscriptionId() local 263 subId = info.getSubscriptionId(); in getFirstActivateCarrierPrivilegedSubscriptionId() 264 return subId; in getFirstActivateCarrierPrivilegedSubscriptionId() 268 return subId; in getFirstActivateCarrierPrivilegedSubscriptionId() 503 int subId = SubscriptionManager.getDefaultSubscriptionId(); in testCarrierConfigIsAccessible() local 504 bundle = mCarrierConfigManager.getConfigForSubId(subId); in testCarrierConfigIsAccessible() 1069 int subId = SubscriptionManager.getDefaultSubscriptionId(); in testLine1NumberForDisplay() local 1083 assertThat(mSubscriptionManager.getPhoneNumber(subId, PHONE_NUMBER_SOURCE_CARRIER)) in testLine1NumberForDisplay() 1089 assertThat(mSubscriptionManager.getPhoneNumber(subId, PHONE_NUMBER_SOURCE_CARRIER)) in testLine1NumberForDisplay() 1096 assertThat(mSubscriptionManager.getPhoneNumber(subId, PHONE_NUMBER_SOURCE_CARRIER)) in testLine1NumberForDisplay() [all …]
|
/cts/tests/tests/telephony3/src/android/telephony3/cts/ |
D | TelephonyManagerTest.java | 101 int subId = subscriptionManager.getDefaultSubscriptionId(); in testDeviceIdentifiersAreNotAccessible() local 102 if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) { in testDeviceIdentifiersAreNotAccessible() 104 subId); in testDeviceIdentifiersAreNotAccessible()
|