Home
last modified time | relevance | path

Searched refs:mRemoveProfileHandler (Results 1 – 7 of 7) sorted by relevance

/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/profiles/
DRemoveProfileHandlerTest.java71 private RemoveProfileHandler mRemoveProfileHandler; field in RemoveProfileHandlerTest
91 mRemoveProfileHandler = new RemoveProfileHandler( in setUp()
106 assertThat(mRemoveProfileHandler.canRemoveProfile(userInfo)).isTrue(); in userNotRestricted_canRemoveProfile()
114 assertThat(mRemoveProfileHandler.canRemoveProfile(userInfo)).isFalse(); in userRestricted_cannotRemoveProfile()
122 assertThat(mRemoveProfileHandler.canRemoveProfile(userInfo)).isFalse(); in viewingForegroundUser_cannotRemoveProfile()
129 assertThat(mRemoveProfileHandler.canRemoveProfile(userInfo)).isFalse(); in viewingSystemUser_cannotRemoveProfile()
137 assertThat(mRemoveProfileHandler.canRemoveProfile(userInfo)).isFalse(); in isDemoUser_cannotRemoveProfile()
143 mRemoveProfileHandler.setUserInfo(userInfo); in hasPreviousDeleteDialog_dialogListenerSet()
148 mRemoveProfileHandler.resetListeners(); in hasPreviousDeleteDialog_dialogListenerSet()
157 mRemoveProfileHandler.showConfirmRemoveProfileDialog(); in showConfirmRemoveProfileDialog_showsConfirmationDialog()
[all …]
DProfileDetailsActionButtonsPreferenceControllerTest.java83 private RemoveProfileHandler mRemoveProfileHandler; field in ProfileDetailsActionButtonsPreferenceControllerTest
96 mMockProfileHelper, mMockUserManager, mRemoveProfileHandler); in setUp()
168 when(mRemoveProfileHandler.canRemoveProfile(userInfo)).thenReturn(true); in onStart_isAdminViewingSelf_manageOtherProfilesButtonShown()
237 when(mRemoveProfileHandler.canRemoveProfile(userInfo)).thenReturn(true); in onStart_profileIsRemovable_deleteButtonShown()
250 when(mRemoveProfileHandler.getAvailabilityStatus(mContext, userInfo, in onStart_profileIsNotRemovable_deleteButtonHidden()
264 when(mRemoveProfileHandler.getAvailabilityStatus(mContext, userInfo, in onStart_userIsViewingSelf_deleteButtonHidden()
266 when(mRemoveProfileHandler.canRemoveProfile(userInfo)).thenReturn(true); in onStart_userIsViewingSelf_deleteButtonHidden()
281 when(mRemoveProfileHandler.canRemoveProfile(userInfo)).thenReturn(true); in onStart_userIsNotViewingSelf_deleteButtonShown()
298 verify(mRemoveProfileHandler).resetListeners(); in onCreate_hasPreviousDeleteDialog_dialogListenerSet()
337 when(mRemoveProfileHandler.canRemoveProfile(userInfo)).thenReturn(true); in onDeleteButtonClicked_showsConfirmationDialog()
[all …]
DProfileDetailsDeletePreferenceControllerTest.java64 private RemoveProfileHandler mRemoveProfileHandler; field in ProfileDetailsDeletePreferenceControllerTest
82 mRemoveProfileHandler = new RemoveProfileHandler( in setUp()
86 mMockProfileHelper, mRemoveProfileHandler); in setUp()
134 when(mRemoveProfileHandler.canRemoveProfile(userInfo)).thenReturn(true); in onCreate_userIsViewingSelf_deleteButtonHidden()
146 when(mRemoveProfileHandler.canRemoveProfile(userInfo)).thenReturn(true); in onCreate_userIsNotViewingSelf_deleteButtonHidden()
/packages/apps/Car/Settings/src/com/android/car/settings/profiles/
DProfileDetailsDeletePreferenceController.java40 private final RemoveProfileHandler mRemoveProfileHandler; field in ProfileDetailsDeletePreferenceController
57 mRemoveProfileHandler = removeProfileHandler; in ProfileDetailsDeletePreferenceController()
68 mRemoveProfileHandler.resetListeners(); in onCreateInternal()
70 mRemoveProfileHandler.runClickableWhileDisabled()); in onCreateInternal()
76 mRemoveProfileHandler.setUserInfo(userInfo); in setUserInfo()
82 mRemoveProfileHandler.runClickableWhileDisabled(); in handlePreferenceClicked()
85 mRemoveProfileHandler.showConfirmRemoveProfileDialog(); in handlePreferenceClicked()
91 return mRemoveProfileHandler.getAvailabilityStatus( in getDefaultAvailabilityStatus()
DProfileDetailsActionButtonsPreferenceController.java75 private final RemoveProfileHandler mRemoveProfileHandler; field in ProfileDetailsActionButtonsPreferenceController
94 mRemoveProfileHandler = removeProfileHandler; in ProfileDetailsActionButtonsPreferenceController()
120 mRemoveProfileHandler.resetListeners(); in onCreateInternal()
144 int removeProfileAvailabilityStatus = mRemoveProfileHandler.getAvailabilityStatus( in onStartInternal()
200 mRemoveProfileHandler.showConfirmRemoveProfileDialog(); in onStartInternal()
202 mRemoveProfileHandler.runClickableWhileDisabled(); in onStartInternal()
210 mRemoveProfileHandler.setUserInfo(userInfo); in setUserInfo()
/packages/apps/Car/Settings/src/com/android/car/settings/privacy/
DDeleteUserPreferenceController.java41 private final RemoveProfileHandler mRemoveProfileHandler; field in DeleteUserPreferenceController
56 mRemoveProfileHandler = removeProfileHandler; in DeleteUserPreferenceController()
58 mRemoveProfileHandler.setUserInfo(mUserInfo); in DeleteUserPreferenceController()
64 mRemoveProfileHandler.resetListeners(); in onCreateInternal()
77 mRemoveProfileHandler.showConfirmRemoveProfileDialog(); in handlePreferenceClicked()
83 return mRemoveProfileHandler.canRemoveProfile(mUserInfo) ? AVAILABLE in getDefaultAvailabilityStatus()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/privacy/
DDeleteUserPreferenceControllerTest.java65 private RemoveProfileHandler mRemoveProfileHandler; field in DeleteUserPreferenceControllerTest
78 mRemoveProfileHandler); in setUp()
84 when(mRemoveProfileHandler.canRemoveProfile(any())).thenReturn(true); in onCreate_canRemoveProfile_preferenceEnabled()
92 when(mRemoveProfileHandler.canRemoveProfile(any())).thenReturn(false); in onCreate_cannotRemoveProfile_preferenceDisabled()
105 when(mRemoveProfileHandler.canRemoveProfile(any())).thenReturn(false); in onClick_preferenceDisabled_showsToast()
120 when(mRemoveProfileHandler.canRemoveProfile(any())).thenReturn(true); in onClick_preferenceEnabled_showsDialog()
125 verify(mRemoveProfileHandler).showConfirmRemoveProfileDialog(); in onClick_preferenceEnabled_showsDialog()