Home
last modified time | relevance | path

Searched refs:myUid (Results 1 – 25 of 203) sorted by relevance

123456789

/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivityservice/
DCSBlockedReasonsTest.kt89 .`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/
DThreadNetworkControllerTest.java154 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/
DNetworkStatsManagerTest.java308 "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 …]
DTrafficStatsTest.java111 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()
DNetworkStatsBinderTest.java95 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()
DConnectivityManagerTest.java1119 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/
DDeviceLockServiceImplTest.java145 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/
DHealthConnectThreadSchedulerTest.java89 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/
DCustomAudienceServiceImplTest.java134 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/
DAccessCameraOrMicActivity.kt124 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/
DAndroidExtendedMockitoMockerTest.java43 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/
DNetworkStatsCollectionTest.java31 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/
DKeystoreIntegrationTest.java170 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/
DSdkSandboxConfigurationTest.java73 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/
DCarDevicePolicyManager.java19 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/
DShareResultSenderImplTest.kt66 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/
DCarExperimentalFeatureServiceController.java165 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/
DPermissionMaxSdkVersionTest.java41 Process.myPid(), Process.myUid()); in testMaxSdkInPast()
54 Process.myPid(), Process.myUid()); in testMaxSdkInFuture()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/
DCarServiceUtilsTest.java301 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/
DStatsLog.java350 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/
DCarPackageManagerServiceUnitTest.java239 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/
DAppSetIdServiceImplTest.java120 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/
DUpdateStatsPermissionTest.java72 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/
DBasicKeyChainServiceTest.java145 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/
DLocationPermissionCheckerTest.java145 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()

123456789