Fix the problem that the ToggleSubscriptionDialogActivity
appears twice when switch changed. - Don't trigger the switch change event if the state of Switch and SwitchSettingsMainSwitchPreference are the same. Fix: 190767461 Test: robotest and operate the switch preference manually Change-Id: I6ab4b7e5ca1455948ca9118bb4a674fdc4fdbd50
This commit is contained in:
@@ -54,7 +54,7 @@ public class AutoBrightnessDetailPreferenceController extends
|
||||
SettingsMainSwitchPreference pref = (SettingsMainSwitchPreference) screen.findPreference(
|
||||
getPreferenceKey());
|
||||
pref.addOnSwitchChangeListener(this);
|
||||
pref.updateStatus(isChecked());
|
||||
pref.setChecked(isChecked());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user