Home
last modified time | relevance | path

Searched refs:myUserHandle (Results 1 – 25 of 239) sorted by relevance

12345678910

/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()
DAppLocationPermissionPreferenceControllerTest.java73 mLocationManager.setLocationEnabledForUser(false, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOff_shouldReturnStringForOff()
81 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationIsOn_shouldReturnLoadingString()
89 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationAppCountIsOne_shouldShowSingularString()
102 mLocationManager.setLocationEnabledForUser(true, android.os.Process.myUserHandle()); in getSummary_whenLocationAppCountIsGreaterThanOne_shouldShowPluralString()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/users/
DCarSystemUIUserUtil.java72 UserHandle myUserHandle = Process.myUserHandle(); in isSecondaryMUMDSystemUI() local
74 && !myUserHandle.isSystem() in isSecondaryMUMDSystemUI()
75 && myUserHandle.getIdentifier() != ActivityManager.getCurrentUser(); in isSecondaryMUMDSystemUI()
84 && Process.myUserHandle().isSystem(); in isMUPANDSystemUI()
/packages/modules/Permission/PermissionController/tests/inprocess/src/com/android/permissioncontroller/permission/data/
DAttributionLabelLiveDataTest.kt21 import android.os.Process.myUserHandle
44 AttributionLabelLiveData["testTag", PKG, myUserHandle()].withLoadedValue { in getValidTag()
52 AttributionLabelLiveData[null, PKG, myUserHandle()].withLoadedValue { in getDefaultTag()
59 AttributionLabelLiveData["invalidTag", PKG, myUserHandle()].withLoadedValue { in getInvalidTag()
66 AttributionLabelLiveData["testTag", "invalid pkg", myUserHandle()].withLoadedValue { in getFromInvalidPkg()
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/util/
DLockedUserStateTest.kt49 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()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DEapFailureNotifierTest.java147 mNotification, android.os.Process.myUserHandle(), 0); in onEapFailureEapFailureConfigWithOverride()
188 mNotification, android.os.Process.myUserHandle(), 0); in onEapFailureWithDefinedErrorCodeWithoutNotificationShown()
215 mNotification, android.os.Process.myUserHandle(), 0); in onEapFailure_showNotificationFalse_notShown()
238 mNotification, android.os.Process.myUserHandle(), 0); in onEapFailureWithDefinedErrorCodeWithNotificationShownWithoutSameSsid()
268 mNotification, android.os.Process.myUserHandle(), 0); in onEapFailureWithDefinedErrorCodeWithNotificationShownWithSameSsid()
293 mNotification, android.os.Process.myUserHandle(), 0); in onEapFailureWithDefinedErrorCodeWithoutMessage()
318 mNotification, android.os.Process.myUserHandle(), 0); in onEapFailureWithUnknownErrorCode()
345 mNotification, android.os.Process.myUserHandle(), 0); in onEapFailureWithCarrierOverrideForDisableParameters()
375 mNotification, android.os.Process.myUserHandle(), 0); in onEapFailureWithNegativeErrorCode()
394 mNotification, android.os.Process.myUserHandle(), 0); in testPreTDeviceIgnoreSpecialFailure()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/service/
DRuntimePermissionsUpgradeController.kt27 import android.os.Process.myUserHandle in <lambda>()
154 PreinstalledUserPackageInfosLiveData[myUserHandle()] in <lambda>()
165 private val pkgInfoProvider = UserPackageInfosLiveData[myUserHandle()] in <lambda>()
231 pkgName, permission_group.LOCATION, myUserHandle()] in <lambda>()
266 pkgName, permission_group.SENSORS, myUserHandle()] in <lambda>()
279 pkgName, permission_group.STORAGE, myUserHandle()] in <lambda>()
286 myUserHandle()] in <lambda>()
292 myUserHandle()] in <lambda>()
300 myUserHandle()] in <lambda>()
309 myUserHandle()] in <lambda>()
DPermissionControllerServiceModel.kt134 val packageInfosLiveData = UserPackageInfosLiveData[Process.myUserHandle()] in <lambda>()
189 packageName, permToGroup[permName]!!, Process.myUserHandle()] in <lambda>()
250 val packageGroupsLiveData = PackagePermissionsLiveData[packageName, Process.myUserHandle()] in <lambda>()
266 AppPermGroupUiInfoLiveData[packageName, groupName, Process.myUserHandle()] in <lambda>()
307 val user = Process.myUserHandle() in <lambda>()
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/
DRevokePermissionTest.kt138 pm.revokeRuntimePermission(packageName, permission, Process.myUserHandle()) in testRevoke()
143 Process.myUserHandle(), in testRevoke()
150 pm.revokeRuntimePermission(packageName, permission, Process.myUserHandle()) in testRevoke()
155 Process.myUserHandle(), in testRevoke()
/packages/apps/Car/Notification/tests/unit/src/com/android/car/notification/
DNotificationUtilsTest.java269 when(Process.myUserHandle()).thenReturn(UserHandle.SYSTEM); in getCurrentUser_systemUser_returnsPrimaryUser()
278 when(Process.myUserHandle()).thenReturn(UserHandle.of(ActivityManager.getCurrentUser())); in getCurrentUser_primaryUser_returnsPrimaryUser()
286 UserHandle myUserHandle = UserHandle.of(1000); in getCurrentUser_secondaryUser_returnsSecondaryUser() local
288 when(Process.myUserHandle()).thenReturn(myUserHandle); in getCurrentUser_secondaryUser_returnsSecondaryUser()
291 myUserHandle.getIdentifier()); in getCurrentUser_secondaryUser_returnsSecondaryUser()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/utils/
DUserUtils.java50 UserHandle user = Process.myUserHandle(); in getWorkProfile()
81 UserHandle user = Process.myUserHandle(); in getPrivateProfile()
116 if (Process.myUserHandle().equals(user)) { in getUserContext()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/
DRequestRoleActivity.java109 if (!role.isAvailableAsUser(Process.myUserHandle(), this)) { in onCreate()
117 if (!role.isVisibleAsUser(Process.myUserHandle(), this)) { in onCreate()
163 Process.myUserHandle(), this); in onCreate()
183 if (!role.isPackageQualifiedAsUser(mPackageName, Process.myUserHandle(), this)) { in onCreate()
289 RoleManager.ROLE_SMS, Process.myUserHandle(), this) in handleSmsDefaultDialogCompatibility()
/packages/modules/Permission/tests/cts/permission/permissionTestUtilLib/src/android/permission/cts/
DTestUtils.java152 String runJobCmd = "cmd jobscheduler run -u " + Process.myUserHandle().getIdentifier() in runJobAndWaitUntilCompleted()
171 + Process.myUserHandle().getIdentifier() + " " + packageName + " " + jobId; in awaitJobUntilRequestedState()
191 + Process.myUserHandle().getIdentifier() + " " + packageName + " " + jobId; in awaitJobUntilRequestedState()
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/
DPhoneAccountRegistrarTest.java369 DefaultPhoneAccountHandle input = new DefaultPhoneAccountHandle(Process.myUserHandle(), in testDefaultPhoneAccountHandleEmptyGroup()
597 mRegistrar.setUserSelectedOutgoingPhoneAccount(telAccount1, Process.myUserHandle()); in testReplacePhoneAccountByGroup()
642 mRegistrar.setUserSelectedOutgoingPhoneAccount(telAccount1, Process.myUserHandle()); in testAddSameDefault()
644 mRegistrar.getUserSelectedOutgoingPhoneAccount(Process.myUserHandle()); in testAddSameDefault()
655 mRegistrar.getUserSelectedOutgoingPhoneAccount(Process.myUserHandle()); in testAddSameDefault()
666 mRegistrar.getUserSelectedOutgoingPhoneAccount(Process.myUserHandle()); in testAddSameDefault()
687 mRegistrar.setUserSelectedOutgoingPhoneAccount(telAccount1, Process.myUserHandle()); in testAddSameGroup()
689 mRegistrar.getUserSelectedOutgoingPhoneAccount(Process.myUserHandle()); in testAddSameGroup()
700 mRegistrar.getUserSelectedOutgoingPhoneAccount(Process.myUserHandle()); in testAddSameGroup()
712 mRegistrar.getUserSelectedOutgoingPhoneAccount(Process.myUserHandle()); in testAddSameGroup()
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/safetycenter/ui/model/
DSafetyCenterQsViewModel.kt156 val enabled = locationManager.isLocationEnabledForUser(Process.myUserHandle()) in toggleSensor()
157 locationManager.setLocationEnabledForUser(!enabled, Process.myUserHandle()) in toggleSensor()
176 locationManager.isLocationEnabledForUser(Process.myUserHandle()) in onUpdate()
239 userManager.getUserRestrictionSources(restriction, Process.myUserHandle()).isNotEmpty() in getEnforcedAdmin()
241 RestrictedLockUtils.getProfileOrDeviceOwner(app, Process.myUserHandle()) in getEnforcedAdmin()
/packages/apps/Launcher3/tests/multivalentTests/src/com/android/launcher3/ui/
DActivityAllAppsContainerViewTest.java80 .thenReturn(Arrays.asList(Process.myUserHandle(), WORK_HANDLE)); in setUp()
81 when(mUserCache.getUserInfo(Process.myUserHandle())) in setUp()
82 .thenReturn(new UserIconInfo(Process.myUserHandle(), 0)); in setUp()
DTestViewHelpers.java18 import static android.os.Process.myUserHandle;
51 return new WidgetManagerHelper(i.getTargetContext()).findProvider(cn, myUserHandle()); in findWidgetProvider()
/packages/apps/Car/Launcher/libs/appgrid/lib/robotests/src/com/android/car/carlauncher/datasources/
DLauncherActivitiesDataSourceImplTest.kt59 private val myUserHandle: UserHandle = mock() in <lambda>() constant in com.android.car.carlauncher.datasources.LauncherActivitiesDataSourceImplTest
61 on { getActivityList(null, myUserHandle) } doReturn launcherActivities in <lambda>()
67 myUserHandle, in <lambda>()
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/users/
DCarSystemUIUserUtilTest.java127 when(Process.myUserHandle()).thenReturn(UserHandle.SYSTEM); in isSecondaryMUMDSystemUI_systemUser_returnsFalse()
135 when(Process.myUserHandle()).thenReturn(UserHandle.of(mActivityManagerTestUser)); in isSecondaryMUMDSystemUI_currentUser_returnsFalse()
143 when(Process.myUserHandle()).thenReturn(mUserHandle); in isSecondaryMUMDSystemUI_isSecondaryUser_returnsTrue()
/packages/modules/Permission/tests/cts/permissionui/src/android/permissionui/cts/
DPermissionTest30WithBluetooth.kt85 val userHandle: UserHandle = Process.myUserHandle() in enableLocation()
96 val userHandle: UserHandle = Process.myUserHandle() in disableLocation()
178 Process.myUserHandle() in assertBluetoothRevokedCompatState()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/role/ui/specialappaccess/
DSpecialAppAccessListChildFragment.java120 Process.myUserHandle(), context)); in onRoleListChanged()
122 rolePreference, Process.myUserHandle(), context); in onRoleListChanged()
134 UserHandle user = Process.myUserHandle(); in onPreferenceClick()
/packages/apps/Launcher3/tests/src/com/android/launcher3/model/
DCacheDataUpdatedTaskTest.java3 import static android.os.Process.myUserHandle;
94 return new CacheDataUpdatedTask(op, myUserHandle(), in newTask()
133 new PackageUserKey(PENDING_APP_1, myUserHandle()), in testSessionUpdate_updates_pending_apps()
/packages/modules/Permission/PermissionController/tests/permissionui/src/com/android/permissioncontroller/permissionui/
DPermissionHub2Test.kt27 import android.os.Process.myUserHandle
52 context.packageManager.getPermissionFlags(CAMERA, APP, myUserHandle()) and in accessCamera()
/packages/apps/Launcher3/quickstep/tests/src/com/android/launcher3/model/
DWidgetsPredicationUpdateTaskTest.java20 import static android.os.Process.myUserHandle;
96 mUserHandle = myUserHandle(); in setup()
126 doReturn(allWidgets).when(manager).getInstalledProvidersForProfile(eq(myUserHandle())); in setup()
132 }).when(manager).getInstalledProvidersForPackage(any(), eq(myUserHandle())); in setup()
/packages/apps/Launcher3/src/com/android/launcher3/model/
DGridBackupTable.java47 Process.myUserHandle()); in createCustomBackupTable()
61 Process.myUserHandle()); in restoreFromCustomBackupTable()

12345678910