/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/permission/ |
D | FirstGrantTimeUnitTest.java | 77 private static final UserHandle CURRENT_USER = Process.myUserHandle(); field in FirstGrantTimeUnitTest 97 when(mDatastore.readForUser(CURRENT_USER, DATA_TYPE_CURRENT)) in setUp() 99 when(mDatastore.readForUser(CURRENT_USER, DATA_TYPE_STAGED)) in setUp() 101 when(mTracker.supportsPermissionUsageIntent(SELF_PACKAGE_NAME, CURRENT_USER)) in setUp() 151 when(mDatastore.readForUser(CURRENT_USER, DATA_TYPE_CURRENT)) in testSetFirstGrantTimeForAnApp_expectOtherAppsGrantTimesRemained() 159 assertThat(mGrantTimeManager.getFirstGrantTime(SELF_PACKAGE_NAME, CURRENT_USER)) in testSetFirstGrantTimeForAnApp_expectOtherAppsGrantTimesRemained() 161 assertThat(mGrantTimeManager.getFirstGrantTime(anotherPackage, CURRENT_USER)) in testSetFirstGrantTimeForAnApp_expectOtherAppsGrantTimesRemained() 164 mGrantTimeManager.setFirstGrantTime(SELF_PACKAGE_NAME, instant3, CURRENT_USER); in testSetFirstGrantTimeForAnApp_expectOtherAppsGrantTimesRemained() 165 verify(mDatastore).writeForUser(captor.capture(), eq(CURRENT_USER), anyInt()); in testSetFirstGrantTimeForAnApp_expectOtherAppsGrantTimesRemained() 177 mGrantTimeManager.getFirstGrantTime("android.unknown_package", CURRENT_USER); in testUnknownPackage_throwsException() [all …]
|
D | HealthPermissionIntentAppsTrackerTest.java | 43 private static final UserHandle CURRENT_USER = Process.myUserHandle(); field in HealthPermissionIntentAppsTrackerTest 56 when(mUserManager.getUserHandles(anyBoolean())).thenReturn(List.of(CURRENT_USER)); in setUp() 64 assertThat(mTracker.supportsPermissionUsageIntent(SELF_PACKAGE_NAME, CURRENT_USER)) in testCheckPackage_packageSupportsIntent_returnsTrue() 71 assertThat(mTracker.supportsPermissionUsageIntent(SELF_PACKAGE_NAME, CURRENT_USER)) in testCheckPackage_packageDoesntSupportIntent_returnsFalse() 78 assertThat(mTracker.supportsPermissionUsageIntent(SELF_PACKAGE_NAME, CURRENT_USER)) in testUpdatePackageState_packageSupportIntentRemoved_returnsRemovedIntentTrue() 81 assertThat(mTracker.updateStateAndGetIfIntentWasRemoved(SELF_PACKAGE_NAME, CURRENT_USER)) in testUpdatePackageState_packageSupportIntentRemoved_returnsRemovedIntentTrue() 83 assertThat(mTracker.supportsPermissionUsageIntent(SELF_PACKAGE_NAME, CURRENT_USER)) in testUpdatePackageState_packageSupportIntentRemoved_returnsRemovedIntentTrue() 88 when(mPackageManager.queryIntentActivitiesAsUser(any(), any(), eq(CURRENT_USER))) in setSelfIntentSupport()
|
D | PermissionPackageChangesOrchestratorTest.java | 50 private static final UserHandle CURRENT_USER = Process.myUserHandle(); field in PermissionPackageChangesOrchestratorTest 93 .updateStateAndGetIfIntentWasRemoved(eq(SELF_PACKAGE_NAME), eq(CURRENT_USER)); in testPackageAdded_callsTrackerToUpdateState_noGrantTimeOrPermsCalls() 95 .revokeAllHealthPermissions(eq(SELF_PACKAGE_NAME), anyString(), eq(CURRENT_USER)); in testPackageAdded_callsTrackerToUpdateState_noGrantTimeOrPermsCalls() 97 .onPackageRemoved(eq(SELF_PACKAGE_NAME), eq(mCurrentUid), eq(CURRENT_USER)); in testPackageAdded_callsTrackerToUpdateState_noGrantTimeOrPermsCalls() 105 .updateStateAndGetIfIntentWasRemoved(eq(SELF_PACKAGE_NAME), eq(CURRENT_USER)); in testPackageChanged_intentWasRemoved_revokesPerms() 107 .revokeAllHealthPermissions(eq(SELF_PACKAGE_NAME), anyString(), eq(CURRENT_USER)); in testPackageChanged_intentWasRemoved_revokesPerms() 116 .onPackageRemoved(eq(SELF_PACKAGE_NAME), eq(mCurrentUid), eq(CURRENT_USER)); in testPackageRemoved_resetsGrantTime() 138 .onPackageRemoved(eq(SELF_PACKAGE_NAME), eq(mCurrentUid), eq(CURRENT_USER)); in testPackageReplaced_noGrantTimeResetsOrPermsRevokes() 140 .revokeAllHealthPermissions(eq(SELF_PACKAGE_NAME), anyString(), eq(CURRENT_USER)); in testPackageReplaced_noGrantTimeResetsOrPermsRevokes() 150 .revokeAllHealthPermissions(eq(SELF_PACKAGE_NAME), anyString(), eq(CURRENT_USER)); in testPackageReplaced_intentNotSupported_revokesPerms() [all …]
|
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/ |
D | ItemsProviderTest.java | 576 Item item = Item.fromCursor(res, UserId.CURRENT_USER); in testGetItems_withPagination_sameDateModified() 604 assertThat(Item.fromCursor(res2, UserId.CURRENT_USER).compareTo( in testGetItems_withPagination_sameDateModified() 639 Item item = Item.fromCursor(res, UserId.CURRENT_USER); in testGetItems_withPagination_differentTimeModified() 665 assertThat(Item.fromCursor(res2, UserId.CURRENT_USER).compareTo( in testGetItems_withPagination_differentTimeModified() 882 Item item = Item.fromCursor(res, UserId.CURRENT_USER); in testGetItemsImages_withLocalIdSelection() 918 Item item = Item.fromCursor(res, UserId.CURRENT_USER); in testGetItemsImages_withLocalIdSelection_largeDataSet() 1027 UserId.CURRENT_USER); in testGetLocalItems_withCloudFeatureOn() 1032 UserId.CURRENT_USER, /* cancellationSignal */ null)) { in testGetLocalItems_withCloudFeatureOn() argument 1044 UserId.CURRENT_USER, in testGetLocalItems_withCloudFeatureOn() argument 1074 UserId.CURRENT_USER); in testGetLocalItems_mergedAlbum_withCloudFeatureOn() [all …]
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/base/ |
D | UserIdTest.java | 48 assertEquals(UserId.CURRENT_USER, UserId.CURRENT_USER); in testEquals() 54 assertFalse(UserId.CURRENT_USER.equals(null)); in testEquals_handlesNulls()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/base/ |
D | UserId.java | 48 public static final UserId CURRENT_USER = UserId.of(Process.myUserHandle()); field in UserId 51 public static final UserId DEFAULT_USER = CURRENT_USER; 86 if (CURRENT_USER.equals(this) || isUnspecified()) { in asContext()
|
D | State.java | 111 if (canForwardToProfileIdMap.isEmpty() && UserId.CURRENT_USER.equals(userId)) { in canInteractWith() 116 return canShareAcrossProfile || UserId.CURRENT_USER.equals(userId); in canInteractWith()
|
D | DocumentInfo.java | 101 userId = UserId.CURRENT_USER; in read() 339 if (UserId.CURRENT_USER.equals(userId)) { in getDocumentUri() 351 if (UserId.CURRENT_USER.equals(userId)) { in getTreeDocumentUri()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/ |
D | CarOccupantZoneServiceTest.java | 129 private static final int CURRENT_USER = 100; field in CarOccupantZoneServiceTest 263 mVisibleUsers.add(CURRENT_USER); in setUp() 270 doReturn(CURRENT_USER).when(mService).getCurrentUser(); in setUp() 405 doReturn(CURRENT_USER).when(mService).getCurrentUser(); in setUpServiceWithProfileSupportEnabled() 409 doReturn(profileUsers).when(mUserHandleHelper).getEnabledProfiles(CURRENT_USER); in setUpServiceWithProfileSupportEnabled() 526 assertUserForThreeZones(CURRENT_USER, VISIBLE_USER, in assertVisibleUserAssignment() 543 assertUserForThreeZones(CURRENT_USER, VISIBLE_USER, in testKeepVisibleUserAfterDisplayChange() 550 assertUserForThreeZones(CURRENT_USER, VISIBLE_USER, in testKeepVisibleUserAfterDisplayChange() 597 assertUserForThreeZones(CURRENT_USER, CarOccupantZoneManager.INVALID_USER_ID, in testUnassignAfterUserStop() 812 assertOccupantConfig(configs.get(0), CURRENT_USER, new Display[]{mDisplay0, mDisplay1}, in testActiveOccupantConfigs() [all …]
|
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/data/model/ |
D | CategoryTest.java | 54 final Category category = Category.fromCursor(cursor, UserId.CURRENT_USER); in testConstructor() 61 /* authority */ LOCAL_PROVIDER_AUTHORITY, UserId.CURRENT_USER)); in testConstructor()
|
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/model/ |
D | UserId.java | 37 public static final UserId CURRENT_USER = UserId.of(Process.myUserHandle()); field in UserId 66 if (CURRENT_USER.equals(this)) { in asContext()
|
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/dirlist/ |
D | DirectoryAddonsAdapterPrivateSpaceTest.java | 53 private static final UserId CURRENT_USER = TestProvidersAccess.USER_ID; field in DirectoryAddonsAdapterPrivateSpaceTest 82 userIdToLabelMap.put(CURRENT_USER, "Personal"); in setUp() 92 CURRENT_USER, SELECTED_USER, userIdToLabelMap, mUserManager, mTestConfigStore); in setUp()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | UserIdManager.java | 105 this(context, UserId.CURRENT_USER, in RuntimeUserIdManager() 203 Log.w(TAG, "The current user " + UserId.CURRENT_USER in getUserIdsInternal()
|
D | ProfileTabs.java | 97 mUserIds = Collections.singletonList(UserId.CURRENT_USER); in ProfileTabs() 249 return UserId.CURRENT_USER; in getSelectedUser()
|
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/ |
D | UserIdManager.java | 195 this(context, UserId.CURRENT_USER); in RuntimeUserIdManager() 269 return mCurrentUserProfile.equals(UserId.CURRENT_USER); in isCurrentUserSelected()
|
D | ItemsProvider.java | 265 userId = UserId.CURRENT_USER; in queryMedia() 334 userId = UserId.CURRENT_USER; in queryAlbums() 383 if (userId.equals(UserId.CURRENT_USER)) { in getItemsUri()
|
D | PickerResult.java | 76 final String userId = userInfo == null ? UserId.CURRENT_USER.toString() : userInfo; in getPickerUri()
|
D | UserManagerState.java | 250 this(context, UserId.CURRENT_USER); in RuntimeUserManagerState() 361 return mCurrentUserProfile.equals(UserId.CURRENT_USER); in isCurrentUserSelected()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/sidebar/ |
D | ProfileItem.java | 32 super(info, title, UserId.CURRENT_USER, actionHandler); in ProfileItem()
|
D | RootsFragment.java | 283 UserId.CURRENT_USER, getContext().getPackageManager(), in onActivityCreated() 364 if (!UserId.CURRENT_USER.equals(getBaseActivity().getSelectedUser())) { in updateCrossProfileStateAndMaybeRefresh() 375 if (!UserId.CURRENT_USER.equals(getBaseActivity().getSelectedUser())) { in updateCrossProfileMapStateAndMaybeRefresh() 595 if (UserId.CURRENT_USER.equals(userIds.get(i))) { in addToApplicationItemListPrivateSpaceEnabled() 627 if (UserId.CURRENT_USER.equals(item.userId)) { in createRootListsPrivateSpaceDisabled()
|
D | UserItemsCombiner.java | 56 mCurrentUser = UserId.CURRENT_USER; in UserItemsCombiner()
|
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/viewmodel/ |
D | PickerViewModelTest.java | 174 when(userManagerState.getCurrentUserProfileId()).thenReturn(UserId.CURRENT_USER); in setUp() 180 when(userIdManager.getCurrentUserProfileId()).thenReturn(UserId.CURRENT_USER); in setUp() 190 UserId.CURRENT_USER.getIdentifier()); in setUp() 221 final Category fakeFirstCategory = Category.fromCursor(fakeCursor, UserId.CURRENT_USER); in testGetCategories() 224 UserId.CURRENT_USER); in testGetCategories() 380 UserId.CURRENT_USER)); in test_initialisePreSelectionItems_correctItemsLoaded()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/picker/ |
D | PickActivity.java | 237 } else if (CrossProfileUtils.getCrossProfileResolveInfo(UserId.CURRENT_USER, in setupLayout() 419 mInjector.pickResult.setHasCrossProfileUri(!UserId.CURRENT_USER.equals(doc.userId)); in onDocumentPicked() 443 if (!UserId.CURRENT_USER.equals(doc.userId)) { in onDocumentsPicked()
|
D | ActionHandler.java | 375 boolean isCurrentUser = UserId.CURRENT_USER.equals(userId); in openRoot() 381 Metrics.logLaunchOtherApp(!UserId.CURRENT_USER.equals(userId)); in openRoot()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/roots/ |
D | ProvidersAccess.java | 116 if (!UserId.CURRENT_USER.equals(root.userId) && !state.supportsCrossProfile()) { in getMatchingRoots()
|