Home
last modified time | relevance | path

Searched refs:Process (Results 1 – 25 of 781) sorted by relevance

12345678910>>...32

/packages/modules/OnDevicePersonalization/tests/servicetests/src/com/android/ondevicepersonalization/services/
DOnDevicePersonalizationExecutorsTests.java22 import android.os.Process;
39 assertEquals(Process.getThreadPriority(Process.myTid()), in testBackgroundExecutorSettings()
40 Process.THREAD_PRIORITY_BACKGROUND); in testBackgroundExecutorSettings()
50 assertEquals(Process.getThreadPriority(Process.myTid()), in testLightweightExecutorSettings()
51 Process.THREAD_PRIORITY_DEFAULT); in testLightweightExecutorSettings()
61 assertEquals(Process.getThreadPriority(Process.myTid()), in testBlockingExecutorSettings()
62 Process.THREAD_PRIORITY_BACKGROUND in testBlockingExecutorSettings()
63 + Process.THREAD_PRIORITY_LESS_FAVORABLE); in testBlockingExecutorSettings()
/packages/modules/OnDevicePersonalization/tests/federatedcomputetests/src/com/android/federatedcompute/services/common/
DFederatedComputeExecutorsTest.java22 import android.os.Process;
43 Process.getThreadPriority(Process.myTid()), in testBackgroundExecutorSettings()
44 Process.THREAD_PRIORITY_BACKGROUND); in testBackgroundExecutorSettings()
57 Process.getThreadPriority(Process.myTid()), in testLightweightExecutorSettings()
58 Process.THREAD_PRIORITY_DEFAULT); in testLightweightExecutorSettings()
70 Process.getThreadPriority(Process.myTid()), in testBlockingExecutorSettings()
71 Process.THREAD_PRIORITY_BACKGROUND in testBlockingExecutorSettings()
72 + Process.THREAD_PRIORITY_LESS_FAVORABLE); in testBlockingExecutorSettings()
/packages/providers/MediaProvider/tests/src/com/android/providers/media/
DTranscodeHelperTest.java25 import android.os.Process;
93 Process.LAST_APPLICATION_UID - Process.FIRST_APPLICATION_UID + 1) in testDoesNotTranscodeForMediaProvider()
94 + Process.FIRST_APPLICATION_UID; in testDoesNotTranscodeForMediaProvider()
102 int randomSystemProcessUid = random.nextInt(Process.FIRST_APPLICATION_UID); in testDoesNotTranscodeForSystemProcesses()
114 Process.LAST_APPLICATION_UID - Process.FIRST_APPLICATION_UID + 1) in testDoesNotTranscodeIfAppAcceptsOriginalFormat()
115 + Process.FIRST_APPLICATION_UID; in testDoesNotTranscodeIfAppAcceptsOriginalFormat()
130 Process.LAST_APPLICATION_UID - Process.FIRST_APPLICATION_UID + 1) in testDoesNotTranscodeIfAppExtraMediaCapabilitiesHevc_supported()
131 + Process.FIRST_APPLICATION_UID; in testDoesNotTranscodeIfAppExtraMediaCapabilitiesHevc_supported()
146 Process.LAST_APPLICATION_UID - Process.FIRST_APPLICATION_UID + 1) in testTranscodesIfAppExtraMediaCapabilitiesHevc_unsupported()
147 + Process.FIRST_APPLICATION_UID; in testTranscodesIfAppExtraMediaCapabilitiesHevc_unsupported()
/packages/modules/NetworkStack/src/com/android/server/util/
DPermissionUtil.java26 import android.os.Process;
39 private static volatile int sTestUid = Process.INVALID_UID;
47 if (caller == Process.SYSTEM_UID) { in enforceNetworkStackCallingPermission()
52 if (caller != Process.myUid() // apps with NETWORK_STACK_UID in enforceNetworkStackCallingPermission()
53 && UserHandle.getAppId(caller) != Process.BLUETOOTH_UID in enforceNetworkStackCallingPermission()
92 if (getCallingUid() != Process.ROOT_UID) { in setTestUid()
96 if (uid == Process.INVALID_UID) { in setTestUid()
121 if (caller != Process.myUid() && caller != Process.SYSTEM_UID && caller != Process.ROOT_UID in checkDumpPermission()
122 && caller != Process.SHELL_UID) { in checkDumpPermission()
/packages/modules/Connectivity/tests/unit/java/com/android/server/connectivityservice/
DCSBlockedReasonsTest.kt43 import android.os.Process
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()
[all …]
/packages/modules/OnDevicePersonalization/src/com/android/ondevicepersonalization/services/
DOnDevicePersonalizationExecutors.java22 import android.os.Process;
45 Process.THREAD_PRIORITY_BACKGROUND
46 + Process.THREAD_PRIORITY_MORE_FAVORABLE,
55 Process.THREAD_PRIORITY_BACKGROUND
56 + Process.THREAD_PRIORITY_LESS_FAVORABLE,
62 createThreadFactory("BG Thread", Process.THREAD_PRIORITY_BACKGROUND,
68 createThreadFactory("Lite Thread", Process.THREAD_PRIORITY_DEFAULT,
73 createThreadFactory("Blocking Thread", Process.THREAD_PRIORITY_BACKGROUND
74 + Process.THREAD_PRIORITY_LESS_FAVORABLE, Optional.empty())));
79 createThreadFactory("SCH Thread", Process.THREAD_PRIORITY_BACKGROUND,
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/concurrency/
DAdServicesExecutorTest.java22 import android.os.Process;
54 Process.THREAD_PRIORITY_DEFAULT, in testCreateLightWeightThreadSuccess()
65 Process.THREAD_PRIORITY_BACKGROUND, in testCreateBackgroundThreadSuccess()
75 Process.THREAD_PRIORITY_BACKGROUND + Process.THREAD_PRIORITY_LESS_FAVORABLE, in testCreateBlockingThreadSuccess()
85 Process.THREAD_PRIORITY_DEFAULT, in testCreateScheduledThreadSuccess()
96 Process.getThreadPriority(Process.myTid()), in runTaskAndAssertResult()
/packages/modules/RemoteKeyProvisioning/app/tests/e2e/src/com/android/rkpdapp/e2etest/
DKeystoreIntegrationTest.java30 import android.os.Process;
169 assertThat(mKeyDao.getKeyForClientAndIrpc(mServiceName, Process.KEYSTORE_UID, in testKeyCreationUsesRemotelyProvisionedCertificate()
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()
204 int bogusUidCounter = Process.LAST_APPLICATION_UID; in testKeyCreationWorksWhenAllKeysAssigned()
207 mKeyDao.getOrAssignKey(mServiceName, Instant.now(), Process.CREDSTORE_UID, in testKeyCreationWorksWhenAllKeysAssigned()
211 assertThat(mKeyDao.getKeyForClientAndIrpc(mServiceName, Process.KEYSTORE_UID, in testKeyCreationWorksWhenAllKeysAssigned()
212 Process.myUid())).isNull(); in testKeyCreationWorksWhenAllKeysAssigned()
226 mKeyDao.getOrAssignKey(mServiceName, Instant.now(), Process.KEYSTORE_UID, Process.myUid()); in testKeyCreationWithExpiringAttestationKey()
[all …]
/packages/modules/Connectivity/thread/tests/unit/src/android/net/thread/
DThreadNetworkControllerTest.java23 import static android.os.Process.SYSTEM_UID;
36 import android.os.Process;
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()
[all …]
/packages/modules/Permission/tests/cts/permissionpolicy/src/android/permissionpolicy/cts/
DPermissionMaxSdkVersionTest.java20 import android.os.Process;
41 Process.myPid(), Process.myUid()); in testMaxSdkInPast()
54 Process.myPid(), Process.myUid()); in testMaxSdkInFuture()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/concurrency/
DAdServicesExecutors.java20 import android.os.Process;
73 Process.setThreadPriority(priority); in createThreadFactory()
98 Process.THREAD_PRIORITY_DEFAULT,
126 Process.THREAD_PRIORITY_BACKGROUND,
149 Process.THREAD_PRIORITY_DEFAULT,
168 Process.THREAD_PRIORITY_BACKGROUND
169 + Process.THREAD_PRIORITY_LESS_FAVORABLE,
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DPowerUsageFeatureProviderImplTest.java27 import android.os.Process;
41 private static final int UID_OTHER = Process.FIRST_APPLICATION_UID + 2;
42 private static final int UID_CALENDAR = Process.FIRST_APPLICATION_UID + 3;
43 private static final int UID_MEDIA = Process.FIRST_APPLICATION_UID + 4;
44 private static final int UID_SYSTEMUI = Process.FIRST_APPLICATION_UID + 5;
92 assertThat(mPowerFeatureProvider.isTypeSystem(Process.ROOT_UID, null)).isTrue(); in isTypeSystem_uidRoot_returnTrue()
97 assertThat(mPowerFeatureProvider.isTypeSystem(Process.SYSTEM_UID, null)).isTrue(); in isTypeSystem_uidSystem_returnTrue()
102 assertThat(mPowerFeatureProvider.isTypeSystem(Process.MEDIA_UID, null)).isTrue(); in isTypeSystem_uidMedia_returnTrue()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/util/
DPriorityThreadFactoryTest.java33 priorityTest(android.os.Process.THREAD_PRIORITY_BACKGROUND); in testPriority()
34 priorityTest(android.os.Process.THREAD_PRIORITY_DEFAULT); in testPriority()
35 priorityTest(android.os.Process.THREAD_PRIORITY_FOREGROUND); in testPriority()
61 int tid = android.os.Process.myTid(); in run()
62 mPriority = new Integer(android.os.Process.getThreadPriority(tid)); in run()
/packages/modules/OnDevicePersonalization/federatedcompute/src/com/android/federatedcompute/services/common/
DFederatedComputeExecutors.java22 import android.os.Process;
45 Process.THREAD_PRIORITY_BACKGROUND,
55 Process.THREAD_PRIORITY_DEFAULT,
63 Process.THREAD_PRIORITY_BACKGROUND
64 + Process.THREAD_PRIORITY_LESS_FAVORABLE,
117 Process.setThreadPriority(priority); in createThreadFactory()
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/
DTopLevelLocationPreferenceControllerTest.java54 mLocationManager.setLocationEnabledForUser(false, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOff_shouldReturnStringForOff()
63 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOn_shouldPreservePreviousText()
67 mLocationManager.setLocationEnabledForUser(false, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOn_shouldPreservePreviousText()
69 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOn_shouldPreservePreviousText()
78 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationAppCountIsOne_shouldShowSingularString()
88 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationAppCountIsGreaterThanOne_shouldShowPluralString()
/packages/apps/Launcher3/src/com/android/launcher3/util/
DExecutors.java18 import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
22 import android.os.Process;
68 createAndStartNewLooper("UiThreadHelper", Process.THREAD_PRIORITY_FOREGROUND));
81 return createAndStartNewLooper(name, Process.THREAD_PRIORITY_DEFAULT); in createAndStartNewLooper()
107 createAndStartNewLooper(p, Process.THREAD_PRIORITY_DEFAULT))); in getPackageExecutor()
128 Process.setThreadPriority(mPriority); in newThread()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DWifiShellCommandTest.java63 import android.os.Process;
144 BinderUtil.setUid(Process.SHELL_UID); in setUp()
196 BinderUtil.setUid(Process.ROOT_UID); in testSetPollRssiIntervalMsecs()
220 BinderUtil.setUid(Process.ROOT_UID); in testGetPollRssiIntervalMsecs()
238 BinderUtil.setUid(Process.ROOT_UID); in testForceHiPerfMode()
261 BinderUtil.setUid(Process.ROOT_UID); in testAddFakeScans()
299 BinderUtil.setUid(Process.ROOT_UID); in testForceLowLatencyMode()
323 BinderUtil.setUid(Process.ROOT_UID); in testNetworkSuggestionsSetUserApproved()
349 BinderUtil.setUid(Process.ROOT_UID); in testNetworkSuggestionsHasUserApproved()
377 BinderUtil.setUid(Process.ROOT_UID); in testImsiProtectionExemptionsSetUserApproved()
[all …]
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DTrafficStatsTest.java21 import android.os.Process;
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()
DNetworkStatsBinderTest.java19 import static android.os.Process.INVALID_UID;
31 import android.os.Process;
95 final int myUid = Process.myUid(); in testAccessUidStatsFromBinder()
100 testUidList.add(Process.ROOT_UID); in testAccessUidStatsFromBinder()
101 testUidList.add(Process.SYSTEM_UID); in testAccessUidStatsFromBinder()
103 testUidList.add(Process.LAST_APPLICATION_UID); in testAccessUidStatsFromBinder()
104 testUidList.add(Process.LAST_APPLICATION_UID + 1); in testAccessUidStatsFromBinder()
DNetworkStatsManagerTest.java62 import android.os.Process;
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()
[all …]
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/oem/
DCarOemProxyServiceHelperTest.java31 import android.os.Process;
69 session.spyStatic(Process.class); in onSessionBuilder()
115 doThrow(new IllegalStateException()).when(() -> Process.killProcess(anyInt())); in testDoBinderCallTimeoutCrash_withCrash()
160 doThrow(new IllegalStateException()).when(() -> Process.killProcess(anyInt())); in testCrashCarService()
168 doThrow(new IllegalStateException()).when(() -> Process.killProcess(anyInt())); in testCircularCallSingleCaller()
180 mCarOemProxyServiceHelper.updateOemPid(Process.myPid()); in testCircularCallSingleCaller()
208 doThrow(new IllegalStateException()).when(() -> Process.killProcess(anyInt())); in testCircularCallMultipleCaller()
221 mCarOemProxyServiceHelper.updateOemPid(Process.myPid()); in testCircularCallMultipleCaller()
/packages/modules/Profiling/service/java/com/android/os/profiling/
DTracingSession.java47 private Process mActiveTrace;
48 private Process mActiveRedaction;
109 public void setActiveTrace(Process activeTrace) { in setActiveTrace()
113 public void setActiveRedaction(Process activeRedaction) { in setActiveRedaction()
152 public Process getActiveTrace() { in getActiveTrace()
156 public Process getActiveRedaction() { in getActiveRedaction()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/util/
DContactsPermissions.java23 import android.os.Process;
41 if (ALLOW_SELF_CALL && Binder.getCallingPid() == Process.myPid()) { in hasCallerOrSelfPermission()
51 + " self=" + Process.myPid() in hasCallerOrSelfPermission()
85 if (ALLOW_SELF_CALL && Binder.getCallingPid() == Process.myPid()) { in hasCallerUriPermission()
95 + " self=" + Process.myPid() in hasCallerUriPermission()
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/
DHealthConnectThreadSchedulerTest.java23 import android.os.Process;
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/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/util/
DLockedUserStateTest.kt21 import android.os.Process
49 whenever(userManager.isUserUnlocked(Process.myUserHandle())).thenReturn(true) in runOnUserUnlocked_runs_action_immediately_if_already_unlocked()
57 whenever(userManager.isUserUnlocked(Process.myUserHandle())).thenReturn(false) in runOnUserUnlocked_waits_to_run_action_until_user_is_unlocked()
69 whenever(userManager.isUserUnlocked(Process.myUserHandle())).thenReturn(true) in isUserUnlocked_returns_true_when_user_is_unlocked()
75 whenever(userManager.isUserUnlocked(Process.myUserHandle())).thenReturn(false) in isUserUnlocked_returns_false_when_user_is_locked()

12345678910>>...32