Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d254516 authored by Stanley Wang's avatar Stanley Wang
Browse files

Fixed the issue that the MainSwitchPreference is invalid after the

page is resumed.

- MainSwithBar will be recreated after the page is resumed. We
  should keep the OnMainSwitchChangeListener for
  MainSwitchPreference and re-register the listeners after the
  page is resumed.

Bug: 225289727
Test: manual test and see the UI
Change-Id: I1b959f36fbd4c57fddf6b37ea00f11c486bbe5b9
parent 3ecf7b2c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -144,6 +144,5 @@ public class MainSwitchPreference extends TwoStatePreference implements OnMainSw
        for (OnMainSwitchChangeListener listener : mSwitchChangeListeners) {
            mMainSwitchBar.addOnSwitchChangeListener(listener);
        }
        mSwitchChangeListeners.clear();
    }
}