Use SettingsLib's MainSwitchBar to replace SwitchBar in Settings.
To log Settings metrics, the MainSwitch extends MainSwitchBar and replace the SwitchBar in SettingsActivity. Bug: 175181773 Test: Run robotest and apply the widget in Settings and see the ui Change-Id: I3add3702e9058ad9192b5172c7cf0e2ccfb55a70
This commit is contained in:
@@ -65,9 +65,9 @@ public abstract class SwitchWidgetController {
|
||||
/**
|
||||
* Update the preference title associated with the switch.
|
||||
*
|
||||
* @param isChecked whether the switch is currently checked
|
||||
* @param title the preference title
|
||||
*/
|
||||
public abstract void updateTitle(boolean isChecked);
|
||||
public abstract void setTitle(String title);
|
||||
|
||||
/**
|
||||
* Start listening to switch toggling.
|
||||
@@ -107,4 +107,4 @@ public abstract class SwitchWidgetController {
|
||||
* is {@code null}, then this preference will be enabled. Otherwise, it will be disabled.
|
||||
*/
|
||||
public abstract void setDisabledByAdmin(EnforcedAdmin admin);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user