/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivityservice/ |
D | CSBlockedReasonsTest.kt | 89 .`when`(bpfNetMaps).getUidNetworkingBlockedReasons(Process.myUid()) in cellNc() 121 .`when`(bpfNetMaps).getUidNetworkingBlockedReasons(Process.myUid()) in cellNc() 146 .`when`(bpfNetMaps).getUidNetworkingBlockedReasons(Process.myUid()) in cellNc() 158 .`when`(bpfNetMaps).getUidNetworkingBlockedReasons(Process.myUid()) in cellNc() 176 .`when`(bpfNetMaps).getUidNetworkingBlockedReasons(Process.myUid()) in cellNc() 206 .`when`(bpfNetMaps).getUidNetworkingBlockedReasons(Process.myUid()) in cellNc() 209 Process.myUid(), in cellNc() 221 .`when`(bpfNetMaps).getUidNetworkingBlockedReasons(Process.myUid()) in cellNc() 224 Process.myUid(), in cellNc() 243 .`when`(bpfNetMaps).getUidNetworkingBlockedReasons(Process.myUid()) in cellNc() [all …]
|
/packages/modules/Connectivity/thread/tests/unit/src/android/net/thread/ |
D | ThreadNetworkControllerTest.java | 154 assertThat(callbackUid.get()).isEqualTo(Process.myUid()); in registerStateCallback_callbackIsInvokedWithCallingAppIdentity() 195 assertThat(activeCallbackUid.get()).isEqualTo(Process.myUid()); in registerOperationalDatasetCallback_callbackIsInvokedWithCallingAppIdentity() 197 assertThat(pendingCallbackUid.get()).isEqualTo(Process.myUid()); in registerOperationalDatasetCallback_callbackIsInvokedWithCallingAppIdentity() 241 assertThat(successCallbackUid.get()).isEqualTo(Process.myUid()); in createRandomizedDataset_callbackIsInvokedWithCallingAppIdentity() 243 assertThat(errorCallbackUid.get()).isEqualTo(Process.myUid()); in createRandomizedDataset_callbackIsInvokedWithCallingAppIdentity() 284 assertThat(successCallbackUid.get()).isEqualTo(Process.myUid()); in join_callbackIsInvokedWithCallingAppIdentity() 286 assertThat(errorCallbackUid.get()).isEqualTo(Process.myUid()); in join_callbackIsInvokedWithCallingAppIdentity() 332 assertThat(successCallbackUid.get()).isEqualTo(Process.myUid()); in scheduleMigration_callbackIsInvokedWithCallingAppIdentity() 334 assertThat(errorCallbackUid.get()).isEqualTo(Process.myUid()); in scheduleMigration_callbackIsInvokedWithCallingAppIdentity() 371 assertThat(successCallbackUid.get()).isEqualTo(Process.myUid()); in leave_callbackIsInvokedWithCallingAppIdentity() [all …]
|
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/ |
D | NetworkStatsManagerTest.java | 308 "cmd activity get-uid-state " + Process.myUid()); in isInForeground() 526 if (bucket.getUid() == Process.myUid()) { in testAppSummary() 542 assertTrue("No Rx bytes usage for uid " + Process.myUid(), totalRxBytes > 0); in testAppSummary() 543 assertTrue("No Rx packets usage for uid " + Process.myUid(), totalRxPackets > 0); in testAppSummary() 544 assertTrue("No Tx bytes usage for uid " + Process.myUid(), totalTxBytes > 0); in testAppSummary() 545 assertTrue("No Tx packets usage for uid " + Process.myUid(), totalTxPackets > 0); in testAppSummary() 620 mStartTime, mEndTime, Process.myUid()); in testUidDetails() 634 assertEquals(bucket.getUid(), Process.myUid()); in testUidDetails() 641 assertTrue("No Rx bytes usage for uid " + Process.myUid(), totalRxBytes > 0); in testUidDetails() 642 assertTrue("No Rx packets usage for uid " + Process.myUid(), totalRxPackets > 0); in testUidDetails() [all …]
|
D | TrafficStatsTest.java | 111 final long uidTxBytesBefore = TrafficStats.getUidTxBytes(Process.myUid()); in testTrafficStatsForLocalhost() 112 final long uidRxBytesBefore = TrafficStats.getUidRxBytes(Process.myUid()); in testTrafficStatsForLocalhost() 113 final long uidTxPacketsBefore = TrafficStats.getUidTxPackets(Process.myUid()); in testTrafficStatsForLocalhost() 114 final long uidRxPacketsBefore = TrafficStats.getUidRxPackets(Process.myUid()); in testTrafficStatsForLocalhost() 189 final long uidTxBytesAfter = TrafficStats.getUidTxBytes(Process.myUid()); in testTrafficStatsForLocalhost() 190 final long uidRxBytesAfter = TrafficStats.getUidRxBytes(Process.myUid()); in testTrafficStatsForLocalhost() 191 final long uidTxPacketsAfter = TrafficStats.getUidTxPackets(Process.myUid()); in testTrafficStatsForLocalhost() 192 final long uidRxPacketsAfter = TrafficStats.getUidRxPackets(Process.myUid()); in testTrafficStatsForLocalhost() 236 final NetworkStats.Entry entry = testStats.getTotal(null, Process.myUid()); in testTrafficStatsForLocalhost()
|
D | NetworkStatsBinderTest.java | 95 final int myUid = Process.myUid(); in testAccessUidStatsFromBinder() local 102 testUidList.add(myUid); in testAccessUidStatsFromBinder() 118 if (uid != myUid) { in testAccessUidStatsFromBinder() 126 + ", uid=" + uid + ", myUid=" + myUid, uidTrafficStats, in testAccessUidStatsFromBinder()
|
D | ConnectivityManagerTest.java | 1119 networkCallbackRule.registerDefaultNetworkCallbackForUid(Process.myUid(), in testRegisterNetworkCallback() 2538 final int myUid = Process.myUid(); 2554 final Range<Integer> myUidRange = new Range<>(myUid, myUid); 3499 final int uid = Process.myUid(); 3540 final int myUid = Process.myUid(); 3547 final int previousUidFirewallRule = mCm.getUidFirewallRule(chain, myUid); 3555 mCm.setUidFirewallRule(chain, myUid, ruleToRemoveMatch); 3569 mCm.setUidFirewallRule(chain, myUid, ruleToAddMatch); 3579 mCm.setUidFirewallRule(chain, myUid, ruleToRemoveMatch); 3590 mCm.setUidFirewallRule(chain, myUid, previousUidFirewallRule); [all …]
|
/packages/modules/DeviceLock/tests/unittests/src/com/android/server/devicelock/ |
D | DeviceLockServiceImplTest.java | 145 mShadowPackageManager.setPackagesForUid(Process.myUid(), in setup() 241 Process.myUid(), in setCallerAllowedToSendUndismissibleNotifications_trueAllowsAppOp() 257 Process.myUid(), in setCallerAllowedToSendUndismissibleNotifications_falseDisallowsAppOp() 273 Process.myUid(), in setCallerExemptFromActivityBgStartRestrictionState_trueAllowsAppOp() 289 Process.myUid(), in setCallerExemptFromActivityBgStartRestrictionState_falseDisallowsAppOp() 300 mService.setUidExemptFromRestrictionsState(Process.myUid(), true, callback); in setUidExemptFromRestrictionsState_trueAllowsAppOps() 305 Process.myUid(), in setUidExemptFromRestrictionsState_trueAllowsAppOps() 310 Process.myUid(), in setUidExemptFromRestrictionsState_trueAllowsAppOps() 321 mService.setUidExemptFromRestrictionsState(Process.myUid(), false, callback); in setUidExemptFromRestrictionsState_falseDisallowsAppOps() 326 Process.myUid(), in setUidExemptFromRestrictionsState_falseDisallowsAppOps() [all …]
|
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/ |
D | HealthConnectThreadSchedulerTest.java | 89 HealthConnectThreadScheduler.schedule(mContext, () -> {}, Process.myUid(), false); in testHealthConnectSchedulerScheduleInternal() 101 runningAppProcessInfo.uid = Process.myUid(); in testHealthConnectSchedulerScheduleInternal() 106 HealthConnectThreadScheduler.schedule(mMockContext, () -> {}, Process.myUid(), false); in testHealthConnectSchedulerScheduleInternal() 143 HealthConnectThreadScheduler.schedule(mContext, () -> {}, Process.myUid(), false); in testScheduleAfterTheSchedulersAreShutdown_expectNoException() 144 HealthConnectThreadScheduler.schedule(mContext, () -> {}, Process.myUid(), true); in testScheduleAfterTheSchedulersAreShutdown_expectNoException()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/customaudience/ |
D | CustomAudienceServiceImplTest.java | 134 private static final int MY_UID = Process.myUid(); 226 Process.myUid(), in testJoinCustomAudience_runNormally() 271 Process.myUid(), in testJoinCustomAudienceWithRevokedUserConsentSuccess() 349 Process.myUid(), in testJoinCustomAudience_ownerAssertFailed() 368 Process.myUid(), in testJoinCustomAudience_ownerAssertFailed() 450 Process.myUid(), in testJoinCustomAudience_errorCreateCustomAudience() 502 Process.myUid(), in testJoinCustomAudience_errorReturnCallback() 556 Process.myUid(), in testJoinCustomAudience_devOptionsEnabled() 685 Process.myUid(), in testLeaveCustomAudience_runNormally() 730 Process.myUid(), in testLeaveCustomAudienceWithRevokedUserConsent() [all …]
|
/packages/modules/Permission/tests/cts/permissionui/AppThatAccessesCameraAndMic/src/android/permissionui/cts/appthataccessescameraandmic/ |
D | AccessCameraOrMicActivity.kt | 124 appOpsManager?.finishOp(AppOpsManager.OPSTR_CAMERA, Process.myUid(), packageName) in finish() 129 Process.myUid(), in finish() 208 appOpsManager?.startOpNoThrow(AppOpsManager.OPSTR_CAMERA, Process.myUid(), packageName) in startBackupCamera() 241 appOpsManager?.finishOp(AppOpsManager.OPSTR_RECORD_AUDIO, Process.myUid(), packageName) in useMic() 255 Process.myUid(), in useHotword()
|
/packages/modules/AdServices/shared/tests/device-side/java/com/android/adservices/mockito/ |
D | AndroidExtendedMockitoMockerTest.java | 43 int myUid = Process.myUid(); in testMockGetCallingUidOrThrow_noArgs() local 47 expect.withMessage("uid").that(Binder.getCallingUidOrThrow()).isEqualTo(myUid); in testMockGetCallingUidOrThrow_noArgs()
|
/packages/modules/Connectivity/tests/unit/java/android/net/ |
D | NetworkStatsCollectionTest.java | 31 import static android.os.Process.myUid; 254 int myUid = Process.myUid(); in testAccessLevels() local 255 int otherUidInSameUser = Process.myUid() + 1; in testAccessLevels() 256 int uidInDifferentUser = Process.myUid() + UserHandle.PER_USER_RANGE; in testAccessLevels() 260 collection.recordData(identSet, myUid, SET_DEFAULT, TAG_NONE, 0, 60 * MINUTE_IN_MILLIS, in testAccessLevels() 279 assertArrayEquals(new int[] { myUid }, in testAccessLevels() 281 assertArrayEquals(new int[] { Process.SYSTEM_UID, myUid, otherUidInSameUser }, in testAccessLevels() 284 new int[] { Process.SYSTEM_UID, myUid, otherUidInSameUser, uidInDifferentUser }, in testAccessLevels() 289 myUid, SET_DEFAULT, TAG_NONE, 0, 0L, 0L, NetworkStatsAccess.Level.DEFAULT, myUid)); in testAccessLevels() local 292 SET_DEFAULT, TAG_NONE, 0, 0L, 0L, NetworkStatsAccess.Level.DEFAULT, myUid); in testAccessLevels() local [all …]
|
/packages/modules/RemoteKeyProvisioning/app/tests/e2e/src/com/android/rkpdapp/e2etest/ |
D | KeystoreIntegrationTest.java | 170 Process.myUid())).isNull(); in testKeyCreationUsesRemotelyProvisionedCertificate() 188 mKeyDao.getOrAssignKey(mServiceName, Instant.now(), Process.KEYSTORE_UID, Process.myUid()); in testKeyCreationUsesAlreadyAssignedKey() 191 Process.KEYSTORE_UID, Process.myUid()); in testKeyCreationUsesAlreadyAssignedKey() 212 Process.myUid())).isNull(); in testKeyCreationWorksWhenAllKeysAssigned() 226 mKeyDao.getOrAssignKey(mServiceName, Instant.now(), Process.KEYSTORE_UID, Process.myUid()); in testKeyCreationWithExpiringAttestationKey() 229 Process.KEYSTORE_UID, Process.myUid()); in testKeyCreationWithExpiringAttestationKey() 236 Process.KEYSTORE_UID, Process.myUid()); in testKeyCreationWithExpiringAttestationKey() 409 Process.KEYSTORE_UID, Process.myUid()); in createKeystoreKeyAndVerifyAttestationKeyAssigned()
|
/packages/modules/AdServices/sdksandbox/tests/cts/inprocess/src/com/android/sdksandbox/tests/cts/inprocess/ |
D | SdkSandboxConfigurationTest.java | 73 String.valueOf(Process.myUserHandle().getUserId(Process.myUid())); 88 int myUid = Process.myUid(); in testUidBelongsToSdkSandboxRange() local 89 assertWithMessage(myUid + " is not a SdkSandbox uid").that(Process.isSdkSandbox()).isTrue(); in testUidBelongsToSdkSandboxRange() 122 Process.getAppUidForSdkSandboxUid(Process.myUid())); in testClientAppIsVisibleToSdkSandbox()
|
/packages/services/Car/car-lib/src/android/car/admin/ |
D | CarDevicePolicyManager.java | 19 import static android.os.Process.myUid; 151 int uid = myUid(); in removeUser() 198 int uid = myUid(); in createUser() 246 int uid = myUid(); in startUserInBackground() 287 int uid = myUid(); in stopUser()
|
/packages/modules/IntentResolver/tests/unit/src/com/android/intentresolver/ui/ |
D | ShareResultSenderImplTest.kt | 66 callerUid = Process.myUid(), in <lambda>() 100 callerUid = Process.myUid(), in <lambda>() 138 callerUid = Process.myUid(), in <lambda>() 179 callerUid = Process.myUid(), in <lambda>()
|
/packages/services/Car/service/src/com/android/car/ |
D | CarExperimentalFeatureServiceController.java | 165 int myUid = Process.myUid(); in bindService() local 166 if (myUid != Process.SYSTEM_UID) { in bindService() 168 + myUid); in bindService()
|
/packages/modules/Permission/tests/cts/permissionpolicy/src/android/permissionpolicy/cts/ |
D | PermissionMaxSdkVersionTest.java | 41 Process.myPid(), Process.myUid()); in testMaxSdkInPast() 54 Process.myPid(), Process.myUid()); in testMaxSdkInFuture()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/ |
D | CarServiceUtilsTest.java | 301 int myUid = Process.myUid(); in testCheckCalledByPackage_isNotOwner() local 309 expectWithMessage("exception message (uid)").that(msg).contains(String.valueOf(myUid)); in testCheckCalledByPackage_isNotOwner() 315 int myUid = Process.myUid(); in testCheckCalledByPackage_isOwner() local 316 when(mPm.getPackageUidAsUser(eq(packageName), anyInt())).thenReturn(myUid); in testCheckCalledByPackage_isOwner()
|
/packages/modules/StatsD/framework/java/android/util/ |
D | StatsLog.java | 350 int callingUid = Process.myUid(); in logStart() 366 int callingUid = Process.myUid(); in logStop() 382 int callingUid = Process.myUid(); in logEvent()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/pm/ |
D | CarPackageManagerServiceUnitTest.java | 239 int myUid = Process.myUid(); in testGetTargetCarVersion_self_ok() local 240 doReturn(myUid).when(mSpiedPackageManager).getPackageUidAsUser(eq(pkgName), anyInt()); in testGetTargetCarVersion_self_ok() 254 int myUid = Process.myUid(); in testGetTargetCarVersion_self_wrongUid() local 269 assertWithMessage("exception message (uid)").that(msg).contains(String.valueOf(myUid)); in testGetTargetCarVersion_self_wrongUid()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/appsetid/src/com/android/adservices/service/appsetid/ |
D | AppSetIdServiceImplTest.java | 120 when(mPackageManager.getPackageUid(TEST_APP_PACKAGE_NAME, 0)).thenReturn(Process.myUid()); in setup() 137 when(Binder.getCallingUidOrThrow()).thenReturn(Process.myUid()); in checkAllowList_emptyAllowList() 196 final int uid = Process.myUid(); in testEnforceForeground_disableEnforcing() 225 when(Binder.getCallingUidOrThrow()).thenReturn(Process.myUid()); in getAppSetId() 231 when(Binder.getCallingUidOrThrow()).thenReturn(Process.myUid()); in testGetAppSetId_enforceCallingPackage_invalidPackage()
|
/packages/modules/Connectivity/tests/cts/netpermission/updatestatspermission/src/android/net/cts/network/permission/ |
D | UpdateStatsPermissionTest.java | 72 final long uidTxBytesBefore = TrafficStats.getUidTxBytes(Process.myUid()); in testUpdateDeviceStatsPermission() 81 long uidTxBytesAfter = TrafficStats.getUidTxBytes(Process.myUid()); in testUpdateDeviceStatsPermission()
|
/packages/apps/KeyChain/tests/src/com/android/keychain/tests/ |
D | BasicKeyChainServiceTest.java | 145 mTestSupportService.grantAppPermission(Process.myUid(), ALIAS_1); in testCanAccessKeyAfterGettingGrant() 172 mTestSupportService.grantAppPermission(Process.myUid(), ALIAS_IMPORTED); in testInstallAndRemoveKeyPair() 239 mTestSupportService.grantAppPermission(Process.myUid(), ALIAS_GENERATED); in testGenerateKeyPairSucceeds() 309 mTestSupportService.grantAppPermission(Process.myUid(), ALIAS_GENERATED); in testSetKeyPairCertificate() 432 final int uid = Process.myUid(); in testGetGrants_NonEmpty()
|
/packages/modules/Connectivity/staticlibs/tests/unit/src/com/android/net/module/util/ |
D | LocationPermissionCheckerTest.java | 145 return UserHandle.getUserHandleForUid(Process.myUid()).getIdentifier(); in setupTestCase() 158 mCurrentUid = Process.myUid(); in initTestVars() 186 int myUid = (int) invocation.getArguments()[1]; in createPermissionAnswer() 191 if (myUid == uid) { in createPermissionAnswer()
|