Remove the getSwitch() in SwitchWidgetController

IMHO we don't need to expose switch in SwitchWidgetController.
This controller already has enough API to control the switch.

Also rename mSwitchWidget to mSwitchController because it is not a
widget.

Bug: 69973752
Test: test still pass
Change-Id: I0ac247e34468a44109ab26019f1303c814e381f2
This commit is contained in:
jackqdyulei
2017-11-30 13:55:09 -08:00
parent d5fff3645a
commit 9891b74533
5 changed files with 30 additions and 58 deletions

View File

@@ -90,7 +90,7 @@ public class MasterSwitchPreference extends TwoTargetPreference {
}
public boolean isChecked() {
return mSwitch != null && mSwitch.isEnabled() && mChecked;
return mSwitch != null && mChecked;
}
public void setChecked(boolean checked) {