Home
last modified time | relevance | path

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

1234567

/frameworks/base/core/tests/PlatformCompatFramework/src/com/android/internal/compat/
DChangeReporterTest.java28 int myUid = 1022, otherUid = 1023; in testStatsLogOnce() local
32 assertTrue(reporter.shouldWriteToStatsLog(myUid, myChangeId, myState)); in testStatsLogOnce()
33 reporter.reportChange(myUid, myChangeId, myState); in testStatsLogOnce()
36 assertFalse(reporter.shouldWriteToStatsLog(myUid, myChangeId, myState)); in testStatsLogOnce()
39 assertTrue(reporter.shouldWriteToStatsLog(myUid, otherChangeId, myState)); in testStatsLogOnce()
40 assertTrue(reporter.shouldWriteToStatsLog(myUid, myChangeId, otherState)); in testStatsLogOnce()
46 int myUid = 1022; in testStatsLogAfterReset() local
50 assertTrue(reporter.shouldWriteToStatsLog(myUid, myChangeId, myState)); in testStatsLogAfterReset()
51 reporter.reportChange(myUid, myChangeId, myState); in testStatsLogAfterReset()
54 assertFalse(reporter.shouldWriteToStatsLog(myUid, myChangeId, myState)); in testStatsLogAfterReset()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/appop/
DAppOpsNotedWatcherTest.java59 appOpsManager.noteOp(AppOpsManager.OP_FINE_LOCATION, Process.myUid(), in testWatchNotedOps()
61 appOpsManager.noteOp(AppOpsManager.OP_CAMERA, Process.myUid(), in testWatchNotedOps()
68 eq(Process.myUid()), eq(getContext().getPackageName()), in testWatchNotedOps()
73 eq(Process.myUid()), eq(getContext().getPackageName()), in testWatchNotedOps()
92 appOpsManager.noteOp(AppOpsManager.OP_FINE_LOCATION, Process.myUid(), in testWatchNotedOps()
98 eq(Process.myUid()), eq(getContext().getPackageName()), in testWatchNotedOps()
DAppOpsActiveWatcherTest.java71 eq(Process.myUid()), eq(getContext().getPackageName()), in testWatchActiveOps()
82 Process.myUid(), getContext().getPackageName())).isTrue(); in testWatchActiveOps()
90 eq(Process.myUid()), eq(getContext().getPackageName()), isNull(), in testWatchActiveOps()
95 Process.myUid(), getContext().getPackageName())).isFalse(); in testWatchActiveOps()
128 eq(Process.myUid()), eq(getContext().getPackageName()), isNull(), in testWatchActiveOps()
DAppOpsStartedWatcherTest.java65 eq(Process.myUid()), eq(getContext().getPackageName()), in testWatchStartedOps()
72 eq(Process.myUid()), eq(getContext().getPackageName()), in testWatchStartedOps()
99 eq(Process.myUid()), eq(getContext().getPackageName()), in testWatchStartedOps()
/frameworks/base/core/tests/coretests/BstatsTestApp/src/com/android/coretests/apps/bstatstestapp/
DIsolatedTestService.java29 Log.d(TAG, "onCreate called. myUid=" + Process.myUid()); in onCreate()
34 Log.d(TAG, "onBind called. myUid=" + Process.myUid()); in onBind()
40 Log.d(TAG, "onDestroy called. myUid=" + Process.myUid()); in onDestroy()
DTestService.java59 Log.d(TAG, "onCreate called. myUid=" + Process.myUid()); in onCreate()
69 Log.d(TAG, "onStartCommand called. myUid=" + Process.myUid()); in onStartCommand()
79 Log.d(TAG, "onBind called. myUid=" + Process.myUid()); in onBind()
85 Log.d(TAG, "onDestroy called. myUid=" + Process.myUid()); in onDestroy()
98 Log.d(TAG, "Starting foreground. myUid=" + Process.myUid()); in startForeground()
155 Log.d(TAG, "Overlay displayed, myUid=" + Process.myUid());
/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/
DSliceManagerServiceTest.java124 when(mContextSpy.checkPermission("perm1", Process.myPid(), Process.myUid())) in testCheckAutoGrantPermissions()
126 when(mContextSpy.checkPermission("perm2", Process.myPid(), Process.myUid())) in testCheckAutoGrantPermissions()
130 Process.myUid(), testPerms); in testCheckAutoGrantPermissions()
132 verify(mContextSpy).checkPermission(eq("perm1"), eq(Process.myPid()), eq(Process.myUid())); in testCheckAutoGrantPermissions()
133 verify(mContextSpy).checkPermission(eq("perm2"), eq(Process.myPid()), eq(Process.myUid())); in testCheckAutoGrantPermissions()
/frameworks/base/tests/permission/src/com/android/framework/permission/tests/
DVibratorManagerServicePermissionTest.java104 mVibratorService.setAlwaysOnEffect(Process.myUid(), PACKAGE_NAME, 1, EFFECT, ATTRS); in testSetAlwaysOnEffectFails()
110 mVibratorService.vibrate(Process.myUid(), DISPLAY_ID, PACKAGE_NAME, EFFECT, ATTRS, in testVibrateWithoutPermissionFails()
120 mVibratorService.vibrate(Process.myUid(), DISPLAY_ID, PACKAGE_NAME, EFFECT, ATTRS, in testVibrateWithVibratePermissionAndSameProcessUidIsAllowed()
/frameworks/base/tests/PlatformCompatGating/src/com/android/tests/gating/
DPlatformCompatPermissionsTest.java119 mPlatformCompat.reportChangeByUid(1, Process.myUid()); in reportChangeByUid_noLogCompatChangePermission_throwsSecurityException()
127 mPlatformCompat.reportChangeByUid(1, Process.myUid()); in reportChangeByUid_logCompatChangePermission_noThrow()
191 mPlatformCompat.isChangeEnabledByUid(1, Process.myUid()); in isChangeEnabledByUid_noReadCompatConfigPermission_throwsSecurityException()
200 mPlatformCompat.isChangeEnabledByUid(1, Process.myUid()); in isChangeEnabledByUid_noLogCompatChangePermission_throwsSecurityException()
208 mPlatformCompat.isChangeEnabledByUid(1, Process.myUid()); in isChangeEnabledByUid_readAndLogCompatChangeConfigPermission_noThrow()
/frameworks/base/core/tests/coretests/src/android/app/compat/
DCompatChangesTest.java68 assertThat(CompatChanges.isChangeEnabled(CHANGE_ID, Process.myUid())).isTrue(); in testEnabledChange()
77 assertThat(CompatChanges.isChangeEnabled(CHANGE_ID, Process.myUid())).isFalse(); in testDisabledChange()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/wear/
DWearPackageIconProvider.java150 final int myUid = android.os.Process.myUid(); in enforcePermissions() local
152 if (uid == myUid || isSystemApp(context, pid)) { in enforcePermissions()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DVibratorHelper.java140 vibrate(Process.myUid(), in vibrateAuthSuccess()
150 vibrate(Process.myUid(), "com.android.systemui", in vibrateAuthError()
/frameworks/base/core/java/android/os/
DServiceManager.java376 final int myUid = Process.myUid(); in rawGetService() local
377 final boolean isCore = UserHandle.isCore(myUid); in rawGetService()
DProcess.java864 public static final int myUid() { in myUid() method in Process
875 return UserHandle.of(UserHandle.getUserId(myUid())); in myUserHandle()
900 return isIsolated(myUid()); in isIsolated()
951 return isSdkSandboxUid(myUid()); in isSdkSandbox()
/frameworks/libs/net/common/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()
/frameworks/base/core/tests/benchmarks/src/android/net/
DTrafficStatsBenchmark.java22 TrafficStats.getUidRxBytes(android.os.Process.myUid()); in timeGetUidRxBytes()
/frameworks/base/core/tests/coretests/src/android/os/
DEnvironmentTest.java135 setAppOpsModeForUid(Process.myUid(), AppOpsManager.MODE_ALLOWED, in testIsExternalStorageManager()
139 setAppOpsModeForUid(Process.myUid(), AppOpsManager.MODE_DEFAULT, in testIsExternalStorageManager()
/frameworks/base/services/tests/inprocesstests/src/com/android/frameworks/inprocesstests/
DInstrumentSystemServerTest.java38 assertThat(Process.myUid()).isEqualTo(Process.SYSTEM_UID); in testCodeIsRunningInSystemServer()
/frameworks/base/services/core/java/com/android/server/biometrics/sensors/
DAcquisitionClient.java202 vibrator.vibrate(Process.myUid(), in vibrateSuccess()
213 vibrator.vibrate(Process.myUid(), in vibrateError()
/frameworks/base/core/tests/coretests/src/com/android/internal/os/
DKernelCpuThreadReaderEndToEndTest.java128 KernelCpuThreadReader.create(8, uid -> uid == Process.myUid()); in getAverageWorkTime()
130 kernelCpuThreadReader.setUidPredicate(uid -> uid == Process.myUid()); in getAverageWorkTime()
/frameworks/base/services/core/java/com/android/server/telecom/
DInternalServiceRepository.java42 mDeviceIdleController.addPowerSaveTempWhitelistApp(Process.myUid(), packageName,
/frameworks/base/core/java/android/app/
DAppCompatCallbacks.java66 int uid = Process.myUid(); in reportChange()
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
DAccessibilitySecurityPolicyTest.java465 final int callingUserId = UserHandle.getUserId(Process.myUid()); in resolveCallingUserId_userIdIsCallingUser_shouldResolveProfileParent()
475 final int callingUserId = UserHandle.getUserId(Process.myUid()); in resolveCallingUserId_callingParentIsCurrentUser_returnCurrentUser()
491 final int callingUserId = UserHandle.getUserId(Process.myUid()); in resolveCallingUserId_callingParentNotCurrentUserAndNoPerm_shouldException()
510 final int callingUserId = UserHandle.getUserId(Process.myUid()); in resolveCallingUserId_anotherUserIdWithCrossUserPermission_returnUserId()
528 final int callingUserId = UserHandle.getUserId(Process.myUid()); in resolveCallingUserId_anotherUserIdWithCrossUserFullPermission_returnUserId()
546 final int callingUserId = UserHandle.getUserId(Process.myUid()); in resolveCallingUserId_anotherUserIdWithoutCrossUserPermission_shouldException()
/frameworks/base/services/tests/servicestests/src/com/android/server/display/
DDisplayManagerServiceTest.java796 int myUid = Process.myUid(); in testShouldNotifyChangeWhenDisplayInfoFrameRateOverrideChanged() local
799 new DisplayEventReceiver.FrameRateOverride(myUid, 30f), in testShouldNotifyChangeWhenDisplayInfoFrameRateOverrideChanged()
806 new DisplayEventReceiver.FrameRateOverride(myUid, 30f), in testShouldNotifyChangeWhenDisplayInfoFrameRateOverrideChanged()
813 new DisplayEventReceiver.FrameRateOverride(myUid, 20f), in testShouldNotifyChangeWhenDisplayInfoFrameRateOverrideChanged()
857 Process.myUid(), 20f), in testDisplayInfoFrameRateOverride()
859 Process.myUid() + 1, 30f) in testDisplayInfoFrameRateOverride()
1129 Process.myUid(), 20f), in testDisplayInfoFrameRateOverrideModeCompat()
1131 Process.myUid() + 1, 30f) in testDisplayInfoFrameRateOverrideModeCompat()
1163 Process.myUid(), 20f) in testDisplayInfoNonNativeFrameRateOverrideMode()
1196 Process.myUid(), 20f) in testDisplayInfoNonNativeFrameRateOverride()
/frameworks/opt/chips/src/com/android/ex/chips/
DChipsUtil.java65 return context.checkPermission(permission, Process.myPid(), Process.myUid()); in checkPermission()

1234567