Home
last modified time | relevance | path

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

/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/accounts/
DContactSearchPreferenceController.java33 private UserHandle mManagedUser; field in ContactSearchPreferenceController
40 mManagedUser = managedUser; in setManagedUser()
45 return (mManagedUser != null) ? AVAILABLE : DISABLED_FOR_USER; in getAvailabilityStatus()
54 if (mManagedUser != null) { in updateState()
57 mContext, mManagedUser.getIdentifier()); in updateState()
64 if (mManagedUser == null) { in isChecked()
68 MANAGED_PROFILE_CONTACT_REMOTE_SEARCH, 0, mManagedUser.getIdentifier()); in isChecked()
72 if (mManagedUser != null) { in setChecked()
75 MANAGED_PROFILE_CONTACT_REMOTE_SEARCH, value, mManagedUser.getIdentifier()); in setChecked()
DWorkModePreferenceController.java42 private UserHandle mManagedUser; field in WorkModePreferenceController
56 mManagedUser = managedUser; in setManagedUser()
71 return (mManagedUser != null) ? AVAILABLE : DISABLED_FOR_USER; in getAvailabilityStatus()
89 if (mUserManager != null && mManagedUser != null) { in isChecked()
90 isWorkModeOn = !mUserManager.isQuietModeEnabled(mManagedUser); in isChecked()
96 if (mUserManager != null && mManagedUser != null) { in setChecked()
98 mUserManager.requestQuietModeEnabled(quietModeEnabled, mManagedUser); in setChecked()
133 UserHandle.USER_NULL) == mManagedUser.getIdentifier()) {
DManagedProfileSettings.java48 private UserHandle mManagedUser; field in ManagedProfileSettings
68 mManagedUser = getManagedUserFromArgument(); in onAttach()
69 if (mManagedUser == null) { in onAttach()
72 use(WorkModePreferenceController.class).setManagedUser(mManagedUser); in onAttach()
73 use(ContactSearchPreferenceController.class).setManagedUser(mManagedUser); in onAttach()
138 UserHandle.USER_NULL) == mManagedUser.getIdentifier()) { in onReceive()
/packages/apps/Settings/src/com/android/settings/accounts/
DContactSearchPreferenceController.java33 private UserHandle mManagedUser; field in ContactSearchPreferenceController
40 mManagedUser = managedUser; in setManagedUser()
45 return (mManagedUser != null) ? AVAILABLE : DISABLED_FOR_USER; in getAvailabilityStatus()
54 if (mManagedUser != null) { in updateState()
57 mContext, mManagedUser.getIdentifier()); in updateState()
64 if (mManagedUser == null) { in isChecked()
68 MANAGED_PROFILE_CONTACT_REMOTE_SEARCH, 0, mManagedUser.getIdentifier()); in isChecked()
72 if (mManagedUser != null) { in setChecked()
75 MANAGED_PROFILE_CONTACT_REMOTE_SEARCH, value, mManagedUser.getIdentifier()); in setChecked()
DCrossProfileCalendarPreferenceController.java33 private UserHandle mManagedUser; field in CrossProfileCalendarPreferenceController
40 mManagedUser = managedUser; in setManagedUser()
45 if (mManagedUser != null in getAvailabilityStatus()
47 mContext, mManagedUser.getIdentifier())) { in getAvailabilityStatus()
56 if (mManagedUser == null) { in isChecked()
61 mManagedUser.getIdentifier()) == 1; in isChecked()
66 if (mManagedUser == null) { in setChecked()
71 CROSS_PROFILE_CALENDAR_ENABLED, value, mManagedUser.getIdentifier()); in setChecked()
DWorkModePreferenceController.java42 private UserHandle mManagedUser; field in WorkModePreferenceController
56 mManagedUser = managedUser; in setManagedUser()
71 return (mManagedUser != null) ? AVAILABLE : DISABLED_FOR_USER; in getAvailabilityStatus()
89 if (mUserManager != null && mManagedUser != null) { in isChecked()
90 isWorkModeOn = !mUserManager.isQuietModeEnabled(mManagedUser); in isChecked()
96 if (mUserManager != null && mManagedUser != null) { in setChecked()
98 mUserManager.requestQuietModeEnabled(quietModeEnabled, mManagedUser); in setChecked()
133 UserHandle.USER_NULL) == mManagedUser.getIdentifier()) {
DManagedProfileSettings.java55 private UserHandle mManagedUser; field in ManagedProfileSettings
75 mManagedUser = getManagedUserFromArgument(); in onAttach()
76 if (mManagedUser == null) { in onAttach()
79 use(WorkModePreferenceController.class).setManagedUser(mManagedUser); in onAttach()
80 use(ContactSearchPreferenceController.class).setManagedUser(mManagedUser); in onAttach()
81 use(CrossProfileCalendarPreferenceController.class).setManagedUser(mManagedUser); in onAttach()
82 use(CrossProfileCalendarDisabledPreferenceController.class).setManagedUser(mManagedUser); in onAttach()
147 UserHandle.USER_NULL) == mManagedUser.getIdentifier()) { in onReceive()
DCrossProfileCalendarDisabledPreferenceController.java26 private UserHandle mManagedUser; field in CrossProfileCalendarDisabledPreferenceController
29 mManagedUser = managedUser; in setManagedUser()
39 if (mManagedUser != null in getAvailabilityStatus()
41 mContext, mManagedUser.getIdentifier())) { in getAvailabilityStatus()
/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/
DContactSearchPreferenceControllerTest.java46 private UserHandle mManagedUser; field in ContactSearchPreferenceControllerTest
57 mController.setManagedUser(mManagedUser); in setUp()
70 mController.setManagedUser(mManagedUser); in getAvailabilityStatus_hasManagedUser_AVAILABLE()
78 MANAGED_PROFILE_CONTACT_REMOTE_SEARCH, 0, mManagedUser.getIdentifier()); in updateState_shouldRefreshContent()
83 MANAGED_PROFILE_CONTACT_REMOTE_SEARCH, 1, mManagedUser.getIdentifier()); in updateState_shouldRefreshContent()
98 MANAGED_PROFILE_CONTACT_REMOTE_SEARCH, 1, mManagedUser.getIdentifier())) in onPreferenceChange_shouldUpdateProviderValue()
103 MANAGED_PROFILE_CONTACT_REMOTE_SEARCH, 0, mManagedUser.getIdentifier())) in onPreferenceChange_shouldUpdateProviderValue()
DCrossProfileCalendarPreferenceControllerTest.java65 private UserHandle mManagedUser; field in CrossProfileCalendarPreferenceControllerTest
77 mController.setManagedUser(mManagedUser); in setUp()
81 when(mManagedUser.getIdentifier()).thenReturn(MANAGED_USER_ID); in setUp()
121 CROSS_PROFILE_CALENDAR_ENABLED, 0, mManagedUser.getIdentifier()); in updateStateToDisabled_isNotChecked()
131 CROSS_PROFILE_CALENDAR_ENABLED, 0, mManagedUser.getIdentifier()); in updateStateToEnabled_isChecked()
134 CROSS_PROFILE_CALENDAR_ENABLED, 1, mManagedUser.getIdentifier()); in updateStateToEnabled_isChecked()
144 CROSS_PROFILE_CALENDAR_ENABLED, 1, mManagedUser.getIdentifier())) in onPreferenceChangeToFalse_shouldUpdateProviderValue()
155 CROSS_PROFILE_CALENDAR_ENABLED, 0, mManagedUser.getIdentifier())) in onPreferenceChangeToTrue_shouldUpdateProviderValue()
DWorkModePreferenceControllerTest.java50 private UserHandle mManagedUser; field in WorkModePreferenceControllerTest
63 mController.setManagedUser(mManagedUser); in setUp()
76 mController.setManagedUser(mManagedUser); in getAvailabilityStatus_hasManagedUser_AVAILABLE()
101 verify(mUserManager).requestQuietModeEnabled(false, mManagedUser); in onPreferenceChange_shouldRequestQuietModeEnabled()
104 verify(mUserManager).requestQuietModeEnabled(true, mManagedUser); in onPreferenceChange_shouldRequestQuietModeEnabled()
DCrossProfileCalendarDisabledPreferenceControllerTest.java57 private UserHandle mManagedUser; field in CrossProfileCalendarDisabledPreferenceControllerTest
68 mController.setManagedUser(mManagedUser); in setUp()
71 when(mManagedUser.getIdentifier()).thenReturn(MANAGED_USER_ID); in setUp()