[Spa] Fix State<T> as a parameter of SwitchPreference

Bug: 292036686
Test: manual - with Gallery
Test: manual - with Settings
Test: unit tests
Change-Id: Ia544909015aa9858224971084a5804103032ec49
31 files changed