FragmentManager can help manage the state of the dialog and automatically restore the dialog when a configuration change occurs
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Bug: 362858921
Change-Id: If63c7891cfb92e06c457e37eb5556f3eaf3f6121
Currently when there is one active LEA headset and users toggle on the audio sharing, a dialog will pop up to ask users to pair new headset and share audio with it. After user click pair new device button on the dialog:
1. Route users to pair new device page.
2. If users pair an LEA headset, finish the pair new device page and
auto add source to the headset with loading indicators on audio
sharing page.
3. If users pair a classic headset, wait for timeout, pop up dialog
saying the paired headset is not compatible for audio sharing and
finish the pair new device page.
Test: atest
Flag: com.android.settingslib.flags.enable_le_audio_sharing
Bug: 331892035
Change-Id: Ifb9579db0ef57d3a379cb5d17c66a604d1396bb4
With UX flow change, clicking "View more devices" button will redirect to connected devices page rather than connected device pairing page.
Bug: 321840161
Test: atest ViewAllBluetoothDevicesPreferenceControllerTest
Change-Id: Icfc03a463e2aaaf3db3c75524c112028b1fd6655
There is heavy work to do when add device to list in the
DeviceListPreferenceFragment, off load these work from main thread
to solve the issue.
Make devicePreferenceMap a ConcurrentHashMap to avoid potential race
condition.
Also no longer use getCachedPreference(key) since we not put anything
into the cache, the fallback flow is always used.
Also in BluetoothDevicePreference.onPreferenceAttributesChanged(), move
more heavy work to background thread.
Using System.currentTimeMillis() to sort devices could cause flaky
because System.currentTimeMillis() could be same for different device,
use AtomicInteger instead.
Fix: 286628533
Test: Following the step in bug
Change-Id: Ia9750adb6b4c1424d084381e9d7c2ca8e7912391
Solution: Finish the page immediately to back to previous page when already BONDED the device in
all bluetooth device page.
Bug: 270096758
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ViewAllBluetoothDevicesPreferenceControllerTest
Change-Id: I13a88c3fbe0c6851f9446a9f574a1c18f934cd2e
* Before adding new hearing device feature, we will extract the common part into Base class first. They will share most of the UI component.
Bug: 237625815
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDevicePairingDetailBaseTest
Test: make RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDevicePairingDetailTest
Change-Id: I3a44c4c464d630fdcafa151afc82d3000fd728a3