Fix that when scrolling to the top on Wi-Fi page, the "Turn off SIM"
notification will pop up. The root cause of the problem is that the switch preference and switch bar status are not sync when using setCheckedInternal API. Fix: 179498532 Test: Run robotest and see the ui Change-Id: Ib51dc2ef27ce49b9c8ba69eb32757bf6b9945baf
This commit is contained in:
@@ -176,6 +176,7 @@ public class SettingsMainSwitchPreference extends TwoStatePreference {
|
|||||||
* Update the status of switch but doesn't notify the mOnBeforeListener.
|
* Update the status of switch but doesn't notify the mOnBeforeListener.
|
||||||
*/
|
*/
|
||||||
public void setCheckedInternal(boolean checked) {
|
public void setCheckedInternal(boolean checked) {
|
||||||
|
super.setChecked(checked);
|
||||||
if (mMainSwitchBar != null) {
|
if (mMainSwitchBar != null) {
|
||||||
mMainSwitchBar.setCheckedInternal(checked);
|
mMainSwitchBar.setCheckedInternal(checked);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user