History log of /packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
59287d40d1f4668de1beadb684d34e8509edded3 08-Jun-2018 ryanywlin <ryanywlin@google.com> 2nd attempt handle BT is not supported on emulator

Error handle before using LocalBluetoothManager in the onStart
and onStop

Bug: 80491267
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j42
Change-Id: I47f7d3b7cddc2fbbafb8fb5cf0fb6adb2d0d2d55
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
ee96c3a259ad1ee3a8604730f8c722224ec07a50 07-Jun-2018 Fan Zhang <zhfan@google.com> Fix context leak in AudioSwitchPreferenceController.

In this controller the context is stored into a global singleton but was
not cleared, thus leaking context and associated views.

Change-Id: I4247f8ff753bc0a331c6c81a0e4b5b4bc41588de
Fixes: 80507279
Test: robotests
Test: inspected hprof before/after change
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
d67314e771d3abf6c7b3a5305176fd56a8cb54ff 31-May-2018 ryanywlin <ryanywlin@google.com> Handle Bluetooth is not supported on emulator

- Disable audio swicher while Bluetooth feature is not supported
- Error handle before using LocalBluetoothManager in the constructor

Bug: 80491267
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j42

Change-Id: I971f31cd08dd0a2778548f6d1d675f279d92ef8e
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
988dc9fbe6728196a6a47c159308db7f2a97034d 19-May-2018 ryanywlin <ryanywlin@google.com> Move getLocalBtManager into FutureTask

Utils.getLocalBtManager in constructor violate StrictMode
ThreadPolicy, move it into FutureTask.

Bug: 79985175
Test: make RunSettingsRoboTests ROBOTEST_FILTER="MediaOutputPreferenceControllerTest" -j28
Test: make RunSettingsRoboTests ROBOTEST_FILTER="HandsFreeProfileOutputPreferenceControllerTest" -j28
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j28
Change-Id: I0a14be18e4766245e7d165239d47ab54fa5e4acb
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
77d218ab72ad5b70589983aabdaef6fbeef7373b 18-May-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Update UI when BT device is rename" into pi-dev
b6ac12eed4e705ac4c52418c7a8905a5d332cb05 23-Apr-2018 hughchen <hughchen@google.com> Update DialogFragment UI when BT device is add/remove/rename

* Add AudioSwitchCallback() in AudioSwitchPreferenceController.
This callback is used to notify SoudSettings to update the dialogFragment UI.
* Add UpdatableListPreferenceDialogFragment that updates the available
options when dialog is shown
* Add test to verify the adapter count when
onListPreferenceUpdated() is called.

Bug: 77783217
Test: make -j50 RunSettingsRoboTests
Change-Id: I8cac1b30ec50df026f4b7722dd1cd2f69e77a4cb
Merged-In: I8cac1b30ec50df026f4b7722dd1cd2f69e77a4cb
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
615becb392fe57efcd8aac400a3f88924ce8c13c 20-Apr-2018 hughchen <hughchen@google.com> Update UI when BT device is rename

* Using getAliasName() instead of getName()
* Add BluetoothDevice isConnected check, when BluetoothDevice is
disconnected. Do not add to the show list.

Bug: 77783217
Test: make -j50 RunSettingsRoboTests
Change-Id: I183fc693eaefd690568ba2f1ec740258b2bb62c8
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
5365eaa6db467b36cb36c2cfc8f3616fd8b22e69 03-May-2018 ryanywlin <ryanywlin@google.com> Use another callback to notify the updater that UI should be updated

Replace onConnectionStateChanged callback
with onProfileConnectionStateChanged. While
updater is notified, isFilterMatched(cachedDevice)
will decide whether to add/remove from UI based
on audio profiles and audio mode.

Bug: 76447449
Test: make RunSettingsRoboTests -j28
Change-Id: Icfba1ce2297e4638679158f9f99bae276940d885
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
8276d966e9c39c70d6a84c724ef36bf26f298025 28-Apr-2018 ryanywlin <ryanywlin@google.com> Add hearing aid device in audio switch

- Add connected hearing aid device to MediaOutputPreferenceController
and HandsFreeProfileOutputPreferenceController

- Set active device to different profile depend on HisyncId

Bug: 78142719
Test: make RunSettingsRoboTests ROBOTEST_FILTER="MediaOutputPreferenceControllerTest" -j28
Test: make RunSettingsRoboTests ROBOTEST_FILTER="HandsFreeProfileOutputPreferenceControllerTest" -j28
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j28
Change-Id: Ib8fe4f06f8564572dffdce6fcc3f29578bf91bd9
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
9f407aba369f2699c3d2bb8d2879b2103afcb577 27-Apr-2018 ryanywlin <ryanywlin@google.com> Find active device for add hearing aids device into audio switcher.

- Find active device accroding to different stream type and
output device.

- update isStreamFromOutputDevice() to identify general case like
DEVICE_OUT_BLUETOOTH_A2DP is subset of DEVICE_OUT_ALL_A2DP.

- add test case for these methods.

Bug: 78142719
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j28
Change-Id: I381135c120dbf051679bff7626d47e41f8d589da
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
eb5019d05a8d16eeda1ca300cb025cbcf5b42f84 27-Apr-2018 ryanywlin <ryanywlin@google.com> Three methods for adding hearing aids device into audio switcher.

- Add three methods for subclass to get connected device list
denpending on different profiles.

- Test case for these methods.

Bug: 78142719
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j28
Change-Id: Ia1367a53ab6a3432878a514490722871ed878954
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
bd376296cd5b5a41c421b4d831036957915336ce 04-May-2018 Matthew Fritze <mfritze@google.com> Establish permanently unavailable settings

Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.

The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.

Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.

Bug: 78910582
Fixes: 79245656
Test: robotests
Change-Id: I42c2cedab66be2d76999795f46470a079cc1ec71
Merged-In: I58821a6cfd6134b3b351657b6edf5f74ead00643
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
50d5c0a5446e51943422c96c05576c9c1b72618a 17-Apr-2018 hughchen <hughchen@google.com> Change the title when in call/media state

* Change the title when in call/media state.
Example: call state show "Available call devices"
media state show "Available media devices"
* Use isAudioModeOngoingCall() utility function for checking if it is in call status
* Add register test to verify when in onStart() and onStop()
the BluetoothCallback can be register and unregister.
* Add title string test to verify when in call or media state,
the title can be changed to corresponding string

Bug: 78150641
Test: make -j40 RunSettingsRoboTests
Change-Id: I6be72cf0cae75525084ac3c5be8524c709f51f7d
Merged-In: I6be72cf0cae75525084ac3c5be8524c709f51f7d
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
458fb2319fff7f0b3266fbbfeb7c4f92550f098a 23-Apr-2018 caxtonchan <caxtonchan@google.com> Hide the audio switcher if it is not relevant

Bug: 78317337
Test: make RunSettingsRoboTests
ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j28
ROBOTEST_FILTER="MediaOutputPreferenceControllerTest" -j28
ROBOTEST_FILTER="HandsFreeProfileOutputPreferenceControllerTest" -j28

Change-Id: I9824941cf410b26ad166aa163d7cccd3bfc31a06
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
dca308e56d33c113f19e70fc718311aa38b8aab6 17-Apr-2018 ryanywlin <ryanywlin@google.com> Replace deprecated APIs in audio switcher.

- Remove isWiredHeadsetOn() and isBluetoothA2dpOn()
in MediaOutputPreferenceController.

- Remove isWiredHeadsetOn() and isBluetoothScoOn()
in HandsFreeProfileOutputPreferenceController.

- Replace with AudioManager.getDevicesForStream().

- Update test cases.

Bug: 78141441
Test: make RunSettingsRoboTests ROBOTEST_FILTER="MediaOutputPreferenceControllerTest" -j40
Test: make RunSettingsRoboTests ROBOTEST_FILTER="HandsFreeProfileOutputPreferenceControllerTest" -j40
Test: make RunSettingsRoboTests ROBOTEST_FILTER="AudioOutputSwitchPreferenceControllerTest" -j40
Change-Id: Ic57c40badf0fd5633f1b7412d63a0b5417d0f47a
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java
63bdfa8998791eb08fb70c21ea37d23c910e5057 23-Mar-2018 ryanywlin <ryanywlin@google.com> Add audio switch UI in sound settings

- 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
/packages/apps/Settings/src/com/android/settings/sound/AudioSwitchPreferenceController.java