Root cause: There is a bunch of different logic of preferences in ToggleAutoclickPreferenceFragment. It’s hard to implement new features and hard to maintain and hard to be testable.
Solution: Move out logic of ToggleAutoclickPreferenceFragment into controllers to reduce the complexity of the relationship between preference and fragment.
Bug: 197695932
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.accessibility
Change-Id: I5db18d5a0c577ad67d15c2d0169a36a67e9f13db
Root cause:
After OS upgrade to R, the original logic only check SP key but does not consider the setting enabled key to cause it cannot not show correctly.
Next:
1) accessibility_autoclick_enabled=1 but does not have SP key, customize layout is checked and show the right value
2) accessibility_autoclick_enabled=1 and have SP key, show according items is checked
3) accessibility_autoclick_enabled=0, off button is checked
Bug: 151123423
Test: local test
Change-Id: I9ebcbb35ee0071dbf8c969d0a70ea6293f4c6edb
Root cause: The OTHER quantity does not require special treatment of the given quantity
Next: Using few quantity for the language requires special treatment of "small" numbers (as with numbers ending 2, 3, or 4)
Bug: 154085511
Test: Change language to Slovensko to check the UI
Change-Id: I9143d9504cf8f9c5ccf17160e0dc0943fa10d31d