Return DISABLED_FOR_USER in IMEI availability if not admin user
The correct return when checking for the IMEI field availability for non-admin users is DISABLED_FOR_USER. UNSUPPORTED_ON_DEVICE should only be used when the setting is unconditionally hidden as the device does not support the feature. Bug: 395714454 Flag: EXEMPT bugfix Test: atest ImeiInfoPreferenceControllerTest Test: atest MobileNetworkImeiPreferenceControllerTest Change-Id: I4ee89a84953993daad539d33d3a2e576540c580f
This commit is contained in:
@@ -265,7 +265,7 @@ public class ImeiInfoPreferenceControllerTest {
|
||||
|
||||
when(mUserManager.isAdminUser()).thenReturn(false);
|
||||
assertThat(mController.getAvailabilityStatus()).isEqualTo(
|
||||
BasePreferenceController.UNSUPPORTED_ON_DEVICE);
|
||||
BasePreferenceController.DISABLED_FOR_USER);
|
||||
}
|
||||
|
||||
private <T> void mockService(String serviceName, Class<T> serviceClass, T service) {
|
||||
|
||||
Reference in New Issue
Block a user