/frameworks/base/core/tests/PlatformCompatFramework/src/com/android/internal/compat/ |
D | ChangeReporterTest.java | 28 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/core/tests/coretests/BstatsTestApp/src/com/android/coretests/apps/bstatstestapp/ |
D | TestService.java | 53 Log.d(TAG, "onCreate called. myUid=" + Process.myUid()); in onCreate() 58 Log.d(TAG, "onStartCommand called. myUid=" + Process.myUid()); in onStartCommand() 68 Log.d(TAG, "onBind called. myUid=" + Process.myUid()); in onBind() 74 Log.d(TAG, "onDestroy called. myUid=" + Process.myUid()); in onDestroy() 87 Log.d(TAG, "Starting foreground. myUid=" + Process.myUid()); in startForeground() 145 Log.d(TAG, "Overlay displayed, myUid=" + Process.myUid());
|
D | IsolatedTestService.java | 29 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()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/appop/ |
D | AppOpsNotedWatcherTest.java | 59 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() 72 eq(Process.myUid()), eq(getContext().getPackageName()), in testWatchNotedOps()
|
D | AppOpsActiveWatcherTest.java | 69 eq(Process.myUid()), eq(getContext().getPackageName()), eq(true)); in testWatchActiveOps() 79 Process.myUid(), getContext().getPackageName())).isTrue(); in testWatchActiveOps() 87 eq(Process.myUid()), eq(getContext().getPackageName()), eq(false)); in testWatchActiveOps() 91 Process.myUid(), getContext().getPackageName())).isFalse(); in testWatchActiveOps()
|
/frameworks/base/tests/net/java/com/android/server/net/ |
D | NetworkStatsCollectionTest.java | 27 import static android.os.Process.myUid; 219 int myUid = Process.myUid(); in testAccessLevels() local 220 int otherUidInSameUser = Process.myUid() + 1; in testAccessLevels() 221 int uidInDifferentUser = Process.myUid() + UserHandle.PER_USER_RANGE; in testAccessLevels() 225 collection.recordData(identSet, myUid, SET_DEFAULT, TAG_NONE, 0, 60 * MINUTE_IN_MILLIS, in testAccessLevels() 244 assertArrayEquals(new int[] { myUid }, in testAccessLevels() 246 assertArrayEquals(new int[] { Process.SYSTEM_UID, myUid, otherUidInSameUser }, in testAccessLevels() 249 new int[] { Process.SYSTEM_UID, myUid, otherUidInSameUser, uidInDifferentUser }, in testAccessLevels() 253 … assertNotNull(collection.getHistory(buildTemplateMobileAll(TEST_IMSI), null, myUid, SET_DEFAULT, in testAccessLevels() local 254 TAG_NONE, 0, 0L, 0L, NetworkStatsAccess.Level.DEFAULT, myUid)); in testAccessLevels() local [all …]
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/ |
D | SliceManagerServiceTest.java | 119 when(mContextSpy.checkPermission("perm1", Process.myPid(), Process.myUid())) in testCheckAutoGrantPermissions() 121 when(mContextSpy.checkPermission("perm2", Process.myPid(), Process.myUid())) in testCheckAutoGrantPermissions() 125 Process.myUid(), testPerms); in testCheckAutoGrantPermissions() 127 verify(mContextSpy).checkPermission(eq("perm1"), eq(Process.myPid()), eq(Process.myUid())); in testCheckAutoGrantPermissions() 128 verify(mContextSpy).checkPermission(eq("perm2"), eq(Process.myPid()), eq(Process.myUid())); in testCheckAutoGrantPermissions()
|
/frameworks/base/core/java/android/net/ |
D | TrafficStats.java | 333 setThreadStatsUid(android.os.Process.myUid()); in setThreadStatsUidSelf() 474 final int uid = android.os.Process.myUid(); in incrementOperationCount() 780 final int callingUid = android.os.Process.myUid(); in getUidTxBytes() 813 final int callingUid = android.os.Process.myUid(); in getUidRxBytes() 846 final int callingUid = android.os.Process.myUid(); in getUidTxPackets() 879 final int callingUid = android.os.Process.myUid(); in getUidRxPackets() 985 final int uid = android.os.Process.myUid(); in getDataLayerSnapshotForUid()
|
/frameworks/base/tests/PlatformCompatGating/src/com/android/tests/gating/ |
D | PlatformCompatPermissionsTest.java | 118 mPlatformCompat.reportChangeByUid(1, Process.myUid()); in reportChangeByUid_noLogCompatChangePermission_throwsSecurityException() 126 mPlatformCompat.reportChangeByUid(1, Process.myUid()); in reportChangeByUid_logCompatChangePermission_noThrow() 190 mPlatformCompat.isChangeEnabledByUid(1, Process.myUid()); in isChangeEnabledByUid_noReadCompatConfigPermission_throwsSecurityException() 199 mPlatformCompat.isChangeEnabledByUid(1, Process.myUid()); in isChangeEnabledByUid_noLogCompatChangePermission_throwsSecurityException() 207 mPlatformCompat.isChangeEnabledByUid(1, Process.myUid()); in isChangeEnabledByUid_readAndLogCompatChangeConfigPermission_noThrow()
|
/frameworks/base/core/java/android/os/ |
D | ServiceManager.java | 271 final int myUid = Process.myUid(); in rawGetService() local 272 final boolean isCore = UserHandle.isCore(myUid); in rawGetService()
|
D | Process.java | 687 public static final int myUid() { in myUid() method in Process 698 return UserHandle.of(UserHandle.getUserId(myUid())); in myUserHandle() 723 return isIsolated(myUid()); in isIsolated()
|
D | Vibrator.java | 169 return setAlwaysOnEffect(Process.myUid(), mPackageName, alwaysOnId, effect, attributes); in setAlwaysOnEffect() 294 vibrate(Process.myUid(), mPackageName, vibe, null, attributes); in vibrate()
|
/frameworks/base/core/tests/coretests/src/android/app/compat/ |
D | CompatChangesTest.java | 68 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/ |
D | WearPackageIconProvider.java | 150 final int myUid = android.os.Process.myUid(); in enforcePermissions() local 152 if (uid == myUid || isSystemApp(context, pid)) { in enforcePermissions()
|
/frameworks/opt/net/wifi/tests/wifitests/src/com/android/server/wifi/ |
D | WifiServiceImplTest.java | 552 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME); in testSetWifiEnabledMetricsNormalAppBelowQSDK() 571 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME); in testSetWifiEnabledMetricsNormalAppTargetingQSDKNoIncrement() 615 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME); in testSetWifiEnabledSuccessForDOAppsTargetingQSDK() 619 Process.myUid(), DeviceAdminInfo.USES_POLICY_DEVICE_OWNER)) in testSetWifiEnabledSuccessForDOAppsTargetingQSDK() 635 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME); in testSetWifiEnabledSuccessForSystemAppsTargetingQSDK() 653 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME); in testSetWifiEnabledSuccessForAppsTargetingBelowQSDK() 684 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME); in testSetWifiEnabledFailureForAppsTargetingQSDK() 701 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME); in testSetWifiEnableAppOpsRejected() 721 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME); in testSetWifiEnableAppOpsIgnored() 753 .noteOp(AppOpsManager.OPSTR_CHANGE_WIFI_STATE, Process.myUid(), TEST_PACKAGE_NAME); in testSetWifiEnabledFromAppFailsWhenInAirplaneMode() [all …]
|
/frameworks/base/services/tests/servicestests/test-apps/ConnTestApp/src/com/android/servicestests/apps/conntestapp/ |
D | ConnTestActivity.java | 135 final boolean restrictedByFwRules = nms.isNetworkRestricted(Process.myUid()); in checkNetworkStatus() 136 final boolean restrictedByUidRules = npms.isUidNetworkingBlocked(Process.myUid(), true); in checkNetworkStatus()
|
/frameworks/base/tests/net/java/com/android/server/ |
D | ConnectivityServiceTest.java | 1149 mPolicyListener.onUidRulesChanged(Process.myUid(), uidRules); in setUidRulesChanged() 1251 mockVpn(Process.myUid()); in setUp() 1355 assertEquals(mCm.getActiveNetwork(), mCm.getActiveNetworkForUid(Process.myUid())); in verifyActiveNetwork() 1384 assertNull(mCm.getActiveNetworkForUid(Process.myUid())); in verifyNoNetwork() 2838 mWiFiNetworkAgent.mNetworkMonitor.forceReevaluation(Process.myUid()); in testCaptivePortalApp() 3209 final int uid = Process.myUid(); in testRegisterDefaultNetworkCallback() 4959 mWiFiNetworkAgent.mNetworkMonitor.forceReevaluation(Process.myUid()); in testPrivateDnsNotification() 4964 mWiFiNetworkAgent.mNetworkMonitor.forceReevaluation(Process.myUid()); in testPrivateDnsNotification() 4971 mWiFiNetworkAgent.mNetworkMonitor.forceReevaluation(Process.myUid()); in testPrivateDnsNotification() 4978 mWiFiNetworkAgent.mNetworkMonitor.forceReevaluation(Process.myUid()); in testPrivateDnsNotification() [all …]
|
/frameworks/base/tests/net/java/com/android/server/connectivity/ |
D | VpnTest.java | 709 .thenReturn(Process.myUid()); in createVpnAndSetupUidChecks() 712 when(mAppOps.noteOpNoThrow(op, Process.myUid(), TEST_VPN_PKG)) in createVpnAndSetupUidChecks() 731 verify(mAppOps).noteOpNoThrow(checkedOp, Process.myUid(), TEST_VPN_PKG); in checkProvisionVpnProfile() 849 eq(Process.myUid()), in testStartVpnProfile() 863 verify(mAppOps).noteOpNoThrow(AppOpsManager.OP_ACTIVATE_VPN, Process.myUid(), TEST_VPN_PKG); in testStartVpnProfileVpnServicePreconsented() 880 eq(Process.myUid()), in testStartVpnProfileNotConsented() 882 verify(mAppOps).noteOpNoThrow(AppOpsManager.OP_ACTIVATE_VPN, Process.myUid(), TEST_VPN_PKG); in testStartVpnProfileNotConsented() 904 eq(Process.myUid()), in testStartVpnProfileMissingProfile() 942 eq(Process.myUid()), in testSetPackageAuthorizationVpnService() 955 eq(Process.myUid()), in testSetPackageAuthorizationPlatformVpn() [all …]
|
/frameworks/base/core/tests/benchmarks/src/android/net/ |
D | TrafficStatsBenchmark.java | 22 TrafficStats.getUidRxBytes(android.os.Process.myUid()); in timeGetUidRxBytes()
|
/frameworks/base/core/java/android/content/ |
D | PermissionChecker.java | 197 Process.myUid(), context.getPackageName()); in checkSelfPermissionForDataDelivery() 232 Process.myUid(), context.getPackageName()); in checkSelfPermissionForPreflight()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/os/ |
D | KernelCpuThreadReaderEndToEndTest.java | 128 KernelCpuThreadReader.create(8, uid -> uid == Process.myUid()); in getAverageWorkTime() 130 kernelCpuThreadReader.setUidPredicate(uid -> uid == Process.myUid()); in getAverageWorkTime()
|
/frameworks/base/core/java/android/app/ |
D | AppCompatCallbacks.java | 66 int uid = Process.myUid(); in reportChange()
|
/frameworks/base/tests/permission/src/com/android/framework/permission/tests/ |
D | VibratorServicePermissionTest.java | 58 mVibratorService.vibrate(Process.myUid(), null, effect, attrs, in testVibrate()
|
/frameworks/opt/chips/src/com/android/ex/chips/ |
D | ChipsUtil.java | 65 return context.checkPermission(permission, Process.myPid(), Process.myUid()); in checkPermission()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/ |
D | BinderCallsStatsServiceTest.java | 41 return Process.myUid(); in weTrustOurselves()
|