Fix a bug in show surface updates
- fix a bug that caused the master switch to unintentionally turn on the show surface updates preference Bug: 34203528 Test: make RunSettingsRoboTests -j40 Change-Id: I307a801aa1a7c1606b3f5d55a0d1f2dbf1d60416
This commit is contained in:
@@ -86,8 +86,12 @@ public class ShowSurfaceUpdatesPreferenceController extends DeveloperOptionsPref
|
||||
|
||||
@Override
|
||||
protected void onDeveloperOptionsSwitchDisabled() {
|
||||
writeShowUpdatesSetting(false);
|
||||
mPreference.setChecked(false);
|
||||
if (mPreference.isChecked()) {
|
||||
// Writing false to the preference when the setting is already off will have a
|
||||
// side effect of turning on the preference that we wish to avoid
|
||||
writeShowUpdatesSetting(false);
|
||||
mPreference.setChecked(false);
|
||||
}
|
||||
mPreference.setEnabled(false);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user