Home
last modified time | relevance | path

Searched refs:getCurrentUser (Results 1 – 25 of 64) sorted by relevance

123

/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DUserControlDisabledPackagesTest.java56 Log.d(TAG, "Starting " + intent + " on user " + getCurrentUser().getIdentifier()); in testLaunchActivity()
57 mContext.startActivityAsUser(intent, getCurrentUser()); in testLaunchActivity()
86 getCurrentUser().getIdentifier()); in isPackageStopped()
90 + getCurrentUser().getIdentifier() + " = " in isPackageStopped()
97 getCurrentUser().getIdentifier()) in assertPackageStopped()
DBaseDeviceOwnerTest.java127 protected final UserHandle getCurrentUser() { in getCurrentUser() method in BaseDeviceOwnerTest
128 return UserHandle.of(ActivityManager.getCurrentUser()); in getCurrentUser()
DListForegroundAffiliatedUsersTest.java35 UserHandle currentUser = invokeStaticMethodWithShellPermissions(() -> getCurrentUser()); in testListForegroundAffiliatedUsers_onlyForegroundUser()
/cts/tests/tests/wifi/src/android/net/wifi/cts/
DWifiMigrationTest.java106 UserHandle.of(ActivityManager.getCurrentUser())); in testWifiMigrationConfigStore()
112 UserHandle.of(ActivityManager.getCurrentUser())); in testWifiMigrationConfigStore()
128 UserHandle.of(ActivityManager.getCurrentUser())); in testWifiMigrationConfigStore()
134 UserHandle.of(ActivityManager.getCurrentUser())); in testWifiMigrationConfigStore()
/cts/hostsidetests/packagemanager/stats/src/com/android/cts/packagemanager/stats/host/
DInstalledIncrementalPackageStatsTests.java52 if (getDevice().isUserSecondary(getDevice().getCurrentUser())) { in testInstalledIncrementalMetricsReported()
59 String.valueOf(getDevice().getCurrentUser()))); in testInstalledIncrementalMetricsReported()
62 String.valueOf(getDevice().getCurrentUser()))); in testInstalledIncrementalMetricsReported()
DPackageManagerStatsTestsBase.java73 "pm install-incremental -t -g " + "--user " + getDevice().getCurrentUser() + " " in installPackageUsingIncremental()
79 final int currentUser = getDevice().getCurrentUser(); in getAppUid()
/cts/hostsidetests/content/src/android/content/cts/
DBaseContextCrossProfileTest.java71 mInitialUserId = getDevice().getCurrentUser(); in setFixedUsers()
78 if (getDevice().getCurrentUser() != mPrimaryUserId) { in setFixedUsers()
79 mFixedUsers.add(getDevice().getCurrentUser()); in setFixedUsers()
85 if (getDevice().getCurrentUser() != mInitialUserId) { in tearDown()
/cts/hostsidetests/gputools/src/android/gputools/cts/
DCtsRootlessGpuDebugHostTest.java346 "run-as", DEBUG_APP, "--user", Integer.toString(getDevice().getCurrentUser()), in testDebugLayerLoadVulkan()
349 "run-as", DEBUG_APP, "--user", Integer.toString(getDevice().getCurrentUser()), in testDebugLayerLoadVulkan()
380 "run-as", APP_NAME, "--user", Integer.toString(getDevice().getCurrentUser()), in testLayerNotLoadedVulkan()
426 "run-as", DEBUG_APP, "--user", Integer.toString(getDevice().getCurrentUser()), in testDebugNotEnabledVulkan()
454 "run-as", DEBUG_APP, "--user", Integer.toString(getDevice().getCurrentUser()), in testDebugWrongAppVulkan()
482 "run-as", DEBUG_APP, "--user", Integer.toString(getDevice().getCurrentUser()), in testDebugNoLayersEnabledVulkan()
533 "run-as", DEBUG_APP, "--user", Integer.toString(getDevice().getCurrentUser()), in testSystemPropertyIgnoreVulkan()
536 "run-as", DEBUG_APP, "--user", Integer.toString(getDevice().getCurrentUser()), in testSystemPropertyIgnoreVulkan()
630 "run-as", DEBUG_APP, "--user", Integer.toString(getDevice().getCurrentUser()), in testDebugLayerLoadGLES()
633 "run-as", DEBUG_APP, "--user", Integer.toString(getDevice().getCurrentUser()), in testDebugLayerLoadGLES()
[all …]
/cts/hostsidetests/statsdatom/src/android/cts/statsdatom/apphibernation/
DAppHibernationStatsTest.java83 getDevice().getCurrentUser()); in testUserLevelAppHibernationStateChanged_fromNotHibernatingToHibernating()
103 getDevice().getCurrentUser()); in testUserLevelAppHibernationStateChanged_fromHibernatingToNotHibernating()
117 final int userId = getDevice().getCurrentUser(); in testUserLevelHibernatedApps()
/cts/hostsidetests/accounts/src/android/host/accounts/
DBaseMultiUserTest.java64 mInitialUserId = getDevice().getCurrentUser(); in setUp()
73 if (getDevice().getCurrentUser() != mInitialUserId) { in tearDown()
/cts/hostsidetests/cpptools/src/com/android/cts/cpptools/
DRunasPermissionsTest.java54 int currentUser = getDevice().getCurrentUser(); in testRunasCanConnectToAppsSocket()
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/
DPasswordComplexityTest.java36 mCurrentUserId = getDevice().getCurrentUser(); in setUp()
DLimitAppIconHidingTest.java47 mCurrentUserId = getDevice().getCurrentUser(); in setUp()
DBaseDevicePolicyTest.java227 mInitialUserId = getDevice().getCurrentUser(); in setUp()
250 if (getDevice().getCurrentUser() != mPrimaryUserId) { in setUp()
251 mFixedUsers.add(getDevice().getCurrentUser()); in setUp()
305 if (mSupportsMultiUser && getDevice().getCurrentUser() != mInitialUserId) { in tearDown()
429 while (getDevice().getCurrentUser() != userId && (--retries) >= 0) { in switchUser()
435 …assertTrue("Failed to switch user after multiple retries", getDevice().getCurrentUser() == userId); in switchUser()
816 protected int getCurrentUser() throws DeviceNotAvailableException { in getCurrentUser() method in BaseDevicePolicyTest
817 return getDevice().getCurrentUser(); in getCurrentUser()
1200 if (getDevice().getCurrentUser() == userState.getUserId()) { in getDefaultLauncher()
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DUtils.java42 runDeviceTests(device, packageName, testClassName, testMethodName, device.getCurrentUser(), in runDeviceTestsAsCurrentUser()
49 runDeviceTests(device, packageName, testClassName, testMethodName, device.getCurrentUser(), in runDeviceTestsAsCurrentUser()
148 int currentUserId = device.getCurrentUser(); in prepareMultipleUsers()
DDocumentsTestCase.java60 getDevice().getCurrentUser()); in runDeviceTests()
DDeviceIdentifierTest.java72 "appops set --user " + getDevice().getCurrentUser() + " " + packageName + " " in setDeviceIdentifierAccessAppOp()
DRoleSecurityTest.java51 final int initialUserId = getDevice().getCurrentUser(); in cannotGetSmsRoleHolderForAnotherUser()
DExternalStorageHostTest.java636 int user = getDevice().getCurrentUser(); in testMediaEscalation_RequestWriteFilePathSupport()
665 int user = getDevice().getCurrentUser(); in doMediaEscalation()
744 int user = getDevice().getCurrentUser(); in testCreateRequest_userDenied()
769 int user = getDevice().getCurrentUser(); in testCreateRequest_noRESAndMES_showConfirmDialog()
804 int user = getDevice().getCurrentUser(); in testCreateRequest_noMANAGEMEDIA_showConfirmDialog()
837 int user = getDevice().getCurrentUser(); in testCreateRequest_withNoAML_showConfirmDialog()
874 int user = getDevice().getCurrentUser(); in testCreateRequest_withPermission_notShowConfirmDialog()
/cts/hostsidetests/multiuser/src/android/host/multiuser/
DSecondaryUsersTest.java63 isUserSecondary = getDevice().isUserSecondary(getDevice().getCurrentUser()); in testSwitchToSecondaryUserBeforeBootComplete()
/cts/hostsidetests/backup/src/android/cts/backup/
DProfileSerialNumberHostSideTest.java53 int userId = mDevice.getCurrentUser(); in setUp()
DMultiUserBackupStateTest.java57 int profileUserId = createProfileUser(getDevice().getCurrentUser(), "MU-State"); in setUp()
/cts/tests/tests/appwidget/src/android/appwidget/cts/
DAppWidgetTestCase.java245 runShellCommand(GRANT_BIND_APP_WIDGET_PERMISSION_COMMAND + getCurrentUser()); in grantBindAppWidgetPermission()
249 runShellCommand(REVOKE_BIND_APP_WIDGET_PERMISSION_COMMAND + getCurrentUser()); in revokeBindAppWidgetPermission()
252 private static int getCurrentUser() { in getCurrentUser() method in AppWidgetTestCase
/cts/hostsidetests/appsearch/src/android/appsearch/cts/
DAppSearchMultiUserTest.java56 mInitialUserId = getDevice().getCurrentUser(); in setUp()
/cts/tests/tests/media/src/android/media/cts/
DMediaProjectionTest.java73 new UserHandle(ActivityManager.getCurrentUser())); in setUp()

123