Home
last modified time | relevance | path

Searched refs:mManagedUser (Results 1 – 14 of 14) sorted by relevance

/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
DUserManagerStateTest.java72 private final UserHandle mManagedUser = UserHandle.of(100); field in UserManagerStateTest
92 when(mMockUserManager.isManagedProfile(mManagedUser.getIdentifier())).thenReturn(true); in setup()
126 when(mMockUserManager.getUserProperties(mManagedUser)).thenReturn( in setup()
135 when(mMockUserManager.getProfileParent(mManagedUser)).thenReturn(mSystemUser); in setup()
171 Lists.newArrayList(mSystemUser, mManagedUser, mPrivateUser, mOtherUser, in testGetUserIds_allProfilesCurrentUserSystem_allShowInSharingSurfacesSeparate()
176 .containsExactly(UserId.of(mSystemUser), UserId.of(mManagedUser), in testGetUserIds_allProfilesCurrentUserSystem_allShowInSharingSurfacesSeparate()
183 UserId currentUser = UserId.of(mManagedUser); in testGetUserIds_allProfilesCurrentUserManaged_allShowInSharingSurfacesSeparate()
185 Lists.newArrayList(mSystemUser, mManagedUser, mPrivateUser, mOtherUser, in testGetUserIds_allProfilesCurrentUserManaged_allShowInSharingSurfacesSeparate()
190 .containsExactly(UserId.of(mSystemUser), UserId.of(mManagedUser), in testGetUserIds_allProfilesCurrentUserManaged_allShowInSharingSurfacesSeparate()
199 Lists.newArrayList(mSystemUser, mManagedUser, mPrivateUser, mOtherUser)); in testGetUserIds_allProfilesCurrentUserPrivate_allShowInSharingSurfacesSeparate()
[all …]
DProfileTabsTest.java54 private final UserId mManagedUser = UserId.of(100); field in ProfileTabsTest
122 initializeWithUsers(isPrivateSpaceEnabled, mSystemUser, mManagedUser); in testUpdateView_twoUsers_shouldShow()
132 assertThat(tab2.getTag()).isEqualTo(mManagedUser); in testUpdateView_twoUsers_shouldShow()
139 initializeWithUsers(true, mSystemUser, mManagedUser, mPrivateUser); in testUpdateView_multiUsers_shouldShow()
155 initializeWithUsers(isPrivateSpaceEnabled, mSystemUser, mManagedUser); in testUpdateView_twoUsers_doesNotSupportCrossProfile_shouldHide()
165 initializeWithUsers(isPrivateSpaceEnabled, mSystemUser, mManagedUser); in testUpdateView_twoUsers_subFolder_shouldHide()
177 initializeWithUsers(isPrivateSpaceEnabled, mSystemUser, mManagedUser); in testUpdateView_twoUsers_recents_subFolder_shouldHide()
190 initializeWithUsers(isPrivateSpaceEnabled, mSystemUser, mManagedUser); in testUpdateView_twoUsers_thirdParty_shouldHide()
203 initializeWithUsers(isPrivateSpaceEnabled, mSystemUser, mManagedUser); in testUpdateView_twoUsers_isSearching_shouldHide()
211 initializeWithUsers(isPrivateSpaceEnabled, mSystemUser, mManagedUser); in testUpdateView_getSelectedUser_afterUsersChanged()
[all …]
/packages/providers/MediaProvider/tests/src/com/android/providers/media/photopicker/data/
DUserManagerStateTest.java46 private final UserHandle mManagedUser = UserHandle.of(100); // like a managed profile field in UserManagerStateTest
61 mManagedUser.getIdentifier())).thenReturn(true); in setUp()
73 when(mMockUserManager.getProfileParent(mManagedUser)).thenReturn(mPersonalUser); in setUp()
106 when(mMockUserManager.getUserProperties(mManagedUser)) in setUp()
121 Arrays.asList(mPersonalUser, mManagedUser, mOtherUser1, mOtherUser2)); in testUserManagerStateThrowsErrorIfCalledFromNonMainThread()
124 () -> mUserManagerState.isManagedUserProfile(UserId.of(mManagedUser))); in testUserManagerStateThrowsErrorIfCalledFromNonMainThread()
136 () -> mUserManagerState.isCrossProfileAllowedToUser(UserId.of(mManagedUser))); in testUserManagerStateThrowsErrorIfCalledFromNonMainThread()
140 () -> mUserManagerState.isBlockedByAdmin(UserId.of(mManagedUser))); in testUserManagerStateThrowsErrorIfCalledFromNonMainThread()
142 () -> mUserManagerState.isProfileOff(UserId.of(mManagedUser))); in testUserManagerStateThrowsErrorIfCalledFromNonMainThread()
146 () -> mUserManagerState.setUserAsCurrentUserProfile(UserId.of(mManagedUser))); in testUserManagerStateThrowsErrorIfCalledFromNonMainThread()
[all …]
/packages/apps/Settings/src/com/android/settings/accounts/
DCrossProfileCalendarPreferenceController.java38 private UserHandle mManagedUser; field in CrossProfileCalendarPreferenceController
45 mManagedUser = Utils.getManagedProfile(userManager); in CrossProfileCalendarPreferenceController()
50 mManagedUser = managedUser; in setManagedUser()
55 if (mManagedUser != null in getAvailabilityStatus()
57 mContext, mManagedUser.getIdentifier())) { in getAvailabilityStatus()
66 if (mManagedUser == null) { in isChecked()
71 mManagedUser.getIdentifier()) == 1; in isChecked()
76 if (mManagedUser == null) { in setChecked()
81 CROSS_PROFILE_CALENDAR_ENABLED, value, mManagedUser.getIdentifier()); in setChecked()
DContactSearchPreferenceController.java43 private final UserHandle mManagedUser; field in ContactSearchPreferenceController
48 mManagedUser = Utils.getManagedProfile(context.getSystemService(UserManager.class)); in ContactSearchPreferenceController()
64 if (mManagedUser != null) { in updateState()
67 mContext, mManagedUser.getIdentifier()); in updateState()
92 if (mManagedUser == null || mQuietModeEnabler.isQuietModeEnabled()) { in isChecked()
96 MANAGED_PROFILE_CONTACT_REMOTE_SEARCH, 0, mManagedUser.getIdentifier()); in isChecked()
101 if (mManagedUser == null || mQuietModeEnabler.isQuietModeEnabled()) { in setChecked()
106 MANAGED_PROFILE_CONTACT_REMOTE_SEARCH, value, mManagedUser.getIdentifier()); in setChecked()
DManagedProfileSettings.java54 private UserHandle mManagedUser; field in ManagedProfileSettings
74 mManagedUser = getManagedUserFromArgument(); in onAttach()
76 if (mManagedUser == null) { in onAttach()
159 UserHandle.USER_NULL) == mManagedUser.getIdentifier()) { in onReceive()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/dirlist/
DIconHelperTest.java47 private final UserId mManagedUser = UserId.of(100); field in IconHelperTest
75 ? Lists.newArrayList(mSystemUser, mManagedUser, mPrivateUser) in setUp()
76 : Lists.newArrayList(mSystemUser, mManagedUser); in setUp()
82 mThumbnailCache, mManagedUser, null, mTestConfigStore); in setUp()
95 assertThat(mIconHelper.shouldShowBadge(mManagedUser.getIdentifier())).isTrue(); in testShouldShowBadge_returnTrue_onManagedUser()
108 mThumbnailCache, mManagedUser, null, mTestConfigStore); in testShouldShowBadge_returnFalse_onManagedUser_doNotShowBadge()
109 assertThat(mIconHelper.shouldShowBadge(mManagedUser.getIdentifier())).isFalse(); in testShouldShowBadge_returnFalse_onManagedUser_doNotShowBadge()
125 assertThat(mIconHelper.shouldShowBadge(mManagedUser.getIdentifier())).isFalse(); in testShouldShowBadge_returnFalseOnManagedUser_withoutManagedUser()
132 mTestUserManagerState.userIds = Lists.newArrayList(mManagedUser); in testShouldShowBadge_returnFalseOnManagedUser_withoutMultipleUsers()
136 assertThat(mIconHelper.shouldShowBadge(mManagedUser.getIdentifier())).isFalse(); in testShouldShowBadge_returnFalseOnManagedUser_withoutMultipleUsers()
/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/
DCrossProfileCalendarPreferenceControllerTest.java62 private UserHandle mManagedUser; field in CrossProfileCalendarPreferenceControllerTest
74 mController.setManagedUser(mManagedUser); in setUp()
78 when(mManagedUser.getIdentifier()).thenReturn(MANAGED_USER_ID); in setUp()
118 CROSS_PROFILE_CALENDAR_ENABLED, 0, mManagedUser.getIdentifier()); in updateStateToDisabled_isNotChecked()
128 CROSS_PROFILE_CALENDAR_ENABLED, 0, mManagedUser.getIdentifier()); in updateStateToEnabled_isChecked()
131 CROSS_PROFILE_CALENDAR_ENABLED, 1, mManagedUser.getIdentifier()); in updateStateToEnabled_isChecked()
141 CROSS_PROFILE_CALENDAR_ENABLED, 1, mManagedUser.getIdentifier())) in onPreferenceChangeToFalse_shouldUpdateProviderValue()
152 CROSS_PROFILE_CALENDAR_ENABLED, 0, mManagedUser.getIdentifier())) in onPreferenceChangeToTrue_shouldUpdateProviderValue()
DWorkModePreferenceControllerTest.java67 private UserHandle mManagedUser; field in WorkModePreferenceControllerTest
88 when(mUserManager.getUserProfiles()).thenReturn(Collections.singletonList(mManagedUser)); in setUp()
89 when(mManagedUser.getIdentifier()).thenReturn(MANAGED_USER_ID); in setUp()
126 verify(mUserManager).requestQuietModeEnabled(!mEnable, mManagedUser); in onPreferenceChange_shouldRequestQuietModeEnabled()
DManagedProfileQuietModeEnablerTest.java93 private UserHandle mManagedUser; field in ManagedProfileQuietModeEnablerTest
108 when(mManagedUser.getIdentifier()).thenReturn(MANAGED_USER_ID); in setUp()
109 when(mUserManager.getUserProfiles()).thenReturn(Collections.singletonList(mManagedUser)); in setUp()
120 verify(mUserManager).requestQuietModeEnabled(mEnable, mManagedUser); in onSetQuietMode_shouldRequestQuietModeEnabled()
DContactSearchPreferenceControllerTest.java58 private UserHandle mManagedUser; field in ContactSearchPreferenceControllerTest
73 when(mUserManager.getUserProfiles()).thenReturn(Collections.singletonList(mManagedUser)); in setUp()
74 when(mManagedUser.getIdentifier()).thenReturn(MANAGED_USER_ID); in setUp()
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/data/
DUserIdManager.java181 private UserId mManagedUser = null; field in UserIdManager.RuntimeUserIdManager
238 return mManagedUser; in getManagedUserId()
300 mManagedUser = null; in setUserIdsInternal()
319 mManagedUser = managedUser; in setUserIdsInternal()
332 mManagedUser = UserId.of(userHandle); in setUserIdsInternal()
/packages/apps/DocumentsUI/src/com/android/documentsui/
DUserIdManager.java92 private UserId mManagedUser = null; field in UserIdManager.RuntimeUserIdManager
149 return mManagedUser; in getManagedUser()
209 mManagedUser = managedUser; in getUserIdsInternal()
/packages/apps/DocumentsUI/src/com/android/documentsui/dirlist/
DIconHelper.java72 private final UserId mManagedUser; field in IconHelper
95 mManagedUser = managedUser; in IconHelper()
280 return mMaybeShowBadge && mManagedUser != null in shouldShowBadge()
281 && mManagedUser.getIdentifier() == userIdIdentifier; in shouldShowBadge()