Remove unnecessary onDeveloperOptionsSwitchEnabled/Disabled override.

- default implementation has been added in the super class to handle
enabling/disabling the preference when the master developer options
switch it turned on/off. Removing all subclass that originally
implemented the methods that only contains the default behavior.

Bug: 73955632
Test: make RunSettingsRoboTests
Change-Id: I13c372c2ab498a5786b40cdc1ad3b5f3424abb5a
This commit is contained in:
Doris Ling
2018-03-01 10:33:14 -08:00
parent 46d6ecc2b1
commit 4fbf04cd10
131 changed files with 489 additions and 1699 deletions

View File

@@ -191,20 +191,6 @@ public class OemUnlockPreferenceControllerTest {
}
@Test
public void onDeveloperOptionsDisabled_preferenceShouldCheckRestriction() {
mController = spy(mController);
doReturn(true).when(mController).isOemUnlockedAllowed();
doReturn(false).when(mController).isOemUnlockAllowedByUserAndCarrier();
doReturn(false).when(mController).isBootloaderUnlocked();
when(mPreference.isEnabled()).thenReturn(true);
mController.onDeveloperOptionsDisabled();
verify(mPreference).checkRestrictionAndSetDisabled(UserManager.DISALLOW_FACTORY_RESET);
}
@Test
public void onOemUnlockConfirmed_oemManagerShouldSetUnlockAllowedByUser() {
mController.onOemUnlockConfirmed();