Merge "Implement work-profile infra in BasePreferenceController"
This commit is contained in:
@@ -15,8 +15,6 @@
|
||||
*/
|
||||
package com.android.settings.location;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.mockito.ArgumentMatchers.any;
|
||||
import static org.mockito.ArgumentMatchers.anyInt;
|
||||
import static org.mockito.Mockito.doReturn;
|
||||
@@ -114,17 +112,6 @@ public class LocationForWorkPreferenceControllerTest {
|
||||
verify(mPreference).setSummary(R.string.switch_off_text);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isAvailable_noManagedProfile_shouldReturnFalse() {
|
||||
when(mUserManager.getUserProfiles()).thenReturn(new ArrayList<>());
|
||||
assertThat(mController.isAvailable()).isFalse();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void isAvailable_hasManagedProfile_shouldReturnTrue() {
|
||||
assertThat(mController.isAvailable()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onLocationModeChanged_disabledByAdmin_shouldDisablePreference() {
|
||||
mController.displayPreference(mScreen);
|
||||
|
||||
Reference in New Issue
Block a user