Convert Magnify controller to TogglePrefController
Convert below to TogglePreferenceController: MagnificationNavbarPreferenceController (Magnify with Button) MagnificationGesturesPreferenceController (Magnify with triple-tap) The two controllers share the same fragment, Add static method for set/get state in fragment, And use them in controllers and fragment. Change-Id: I2bdbdb36be71e1a3ffb557abc5a6115d48de53cf Fixes: 67997698 Fixes: 67997726 Test: make RunSettingsRoboTests
This commit is contained in:
@@ -59,9 +59,6 @@ public abstract class GesturePreferenceController extends TogglePreferenceContro
|
||||
public void updateState(Preference preference) {
|
||||
super.updateState(preference);
|
||||
if (preference != null) {
|
||||
if (!(preference instanceof TwoStatePreference)) {
|
||||
preference.setSummary(getSummary());
|
||||
}
|
||||
// Different meanings of "Enabled" for the Preference and Controller.
|
||||
preference.setEnabled(canHandleClicks());
|
||||
}
|
||||
|
Reference in New Issue
Block a user