Commit Graph

3 Commits

Author SHA1 Message Date
Jacky Wang
249e381a63 [Catalyst] Fix MainSwitchBarPreference NPE when configuration changed
When activity is recreated (due to configuration is changed),
preference screen is created before SettingsActivity sets view layout
and results in NPE. As a workaround, save the states inside
MainSwitchBarPreference to fix the problem.

Bug: 332201912
Flag: EXEMPT library
Test: manual
Change-Id: I052cd0a521dac203a5f58963c550911e7a741e6f
2024-12-10 15:25:39 +08:00
Jacky Wang
f79173a664 [Catalyst] Support callChangeListener for MainSwitchBarPreference
Bug: 335132588
Flag: EXEMPT library
Test: manual
Change-Id: I6924ccfa0d66b9a643811f49a2ec3fcdc1d749ae
2024-12-09 16:59:16 +08:00
Jacky Wang
6a52eeabbc [Catalyst] Support main switch bar
MainSwitchBar is a view widget in activity layout stick to the top of
screen UI. There is no corresponding Preference in the preference
screen. For Catalyst support, introduce an invisible Preference object
to manipulate with MainSwitchBar, so that the binding mechanism is
still working on top of this abstraction.

Bug: 332201912
Flag: EXEMPT new class
Test: manual
Change-Id: If50932a443c1ed3ac04d3ea2e3273724d750297d
2024-11-13 02:05:01 +08:00