commit | 10c9cf6cd5e16d8e9a0efe4039e2ca860190798d | [log] [tgz] |
---|---|---|
author | Stanley Wang <stanleytfwang@google.com> | Wed Apr 27 17:17:21 2022 +0800 |
committer | Stanley Wang <stanleytfwang@google.com> | Wed Apr 27 17:17:21 2022 +0800 |
tree | 7eb86831ca245e105e3c095e01788d8256e4aff0 | |
parent | 17365c8e47e6e6da83907746b7445c1d770082bc [diff] |
Fixe the problem of invalid switch preference. The source of this problem is that onBindViewHolder is called after the user add the OnMainSwitchChangeListener. Then preference gets a new MainSwitchBar in onBindViewHolder and causes the listener to fail. Bug: 223325900 Test: Manually test and observe the UI Change-Id: I6e58c4cf035811bb8805e76bebb5fbb86c7a79da