- Move preference related logic to Controllers.
- Add some test cases for controllers.
Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.accounts
make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
atest SettingsGatewayTest UniquePreferenceTest
Change-Id: If4fcd7bf572672c886d5c91b2d15013817d1aa67
- Build two controller to control list preferences.
- MediaOutputPreferenceController which allows switching
the media output between current device and connected
BT device supporting A2DP. It also controls disabling
media output switching during a call or cast mode.
- HandsFreeProfilePreferenceController which allows
switching between HFP-connected BT devices while in
on-call state.
- Add test cases for controllers.
Bug: 74130772
Test: make RunSettingsRoboTests ROBOTEST_FILTER="MediaOutputPreferenceControllerTest" -j56
Test: make RunSettingsRoboTests ROBOTEST_FILTER="HandsFreeProfileOutputPreferenceControllerTest" -j56
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j56
Change-Id: I37f5418442ce77e72cdff07f071ea519ab1047f3
* Implement available media devices group
* Add AvailableMediaDeviceGroupController to realize UI, the user can see the all device that can be activated in this group.
* ConnectedDeviceGroupController change to show the device that cannot be activated but is connected.
* Refactoring the below class, implement the controller in connected_devices.xml.
ConnectedDeviceGroupController.java
SavedDeviceGroupController.java
ConnectedDeviceDashboardFragment.java
connected_devices.xml
* Add AvailableMediaBluetoothDeviceUpdaterTest to verify the add/remove preference behavior when connectedStateChanged or profileAudioStateChanged
* Add test that used to verify device is connected or not in BluetoothDeviceUpdaterTest.
* Add test that used to verify the add/remove preference behavior when connectedStateChanged or profileAudioStateChanged in ConnectedBluetoothDeviceUpdaterTest.
* Add AvailableMediaDeviceGroupControllerTest to verify bluetooth feature is supported or not and test register callback.
* Add test that used to verify bluetooth feature is supported or not and test register callback in ConnectedDeviceGroupControllerTest.
* Add test that used to verify bluetooth feature is supported or not and test register callback in SavedDeviceGroupControllerTest
Bug: 74134939
Test: make -j40 RunSettingsRoboTests
Change-Id: I54d03c2ddadc6a4be7519dd74cdbcb5055d44083
InputMethodUtils.InputMethodSetting is a quite complicated inernal
class of InputMethodUtils and PhysicalKeyboardFragment's depending on
it just for getting/setting SHOW_IME_WITH_HARD_KEYBOARD is overkill.
With this CL, PhysicalKeyboardFragment just uses Secure Settings APIs
directly.
There should be no user-visible behavior change.
Bug: 77730201
Test: Manually verified as follows:
1. Open system settings.
2. Tap "System" -> "Languages & input" -> "Physical keyboard"
3. Make sure "Show virtual keyboard" is unchecked
4. Make sure the following command shows 0
adb shell settings get secure show_ime_with_hard_keyboard
5. Check "Show virtual keyboard"
6. Make sure the following command shows 1
adb shell settings get secure show_ime_with_hard_keyboard
7. Run the following command
adb shell settings put secure show_ime_with_hard_keyboard 0
8. Make sure "Show virtual keyboard" is chenged to unchecked
Change-Id: I956da5dad27313d6edf141f2320bb0a7954fbbea