This patch focused on fixing compile errors and some runtime errors.
Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
Move the edit button on Bluetooth device detail,
From action bar menu to header.
Use EntityHeaderController to add and control,
Rename those method because we use them on
more than one place now.
Change-Id: I3afad6baeab80895c109603e2ab13428582a4dd8
Fixes: 76206922
Test: make RunSettingsRoboTests
This CL tries to detect Bluetooth hearing aid devices and tries to
combine the entry of the hearing aids with the same HiSyncIds and
show only 1 entry for each pair in the connected devices list.
This CL also shows 2 battery status in the device details page.
This change shows the combined entry after a user returns to the
settings activity after pressing the back button or somehow
without killing it. It also combines the entries just after pairing.
Test: RunSettingsRoboTests
Bug: 74204427
Change-Id: I47fb0bdd96b1cc972d88a4aef85d0113985d63bb
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936
Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
We were getting the following exception when you rotated the Bluetooth
device details screen:
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.android.settings/com.android.settings.SubSettings}:
java.lang.IllegalStateException: This Activity already has an action bar
supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR
and set android:windowActionBar to false in your theme to use a Toolbar
instead.
It turns out that allowing EntityHeaderController to inflate the
settings_entity_header.xml view seems to cause this - if you instead
manually include a LayoutPreference and hand that to
EntityHeaderController, you don't have the problem.
The rotation failure couldn't be tested with Robolectric because our
version doesn't support using FragmentTestUtil.startFragment for
fragments which use PreferenceScreen's ("sorry, not yet
implemented"). So instead this includes an app test.
Bug: 62447414
Test: runtest --path=BluetoothDeviceDetailsRotationTest.java
Change-Id: I8d052d1f4ab6e2b0ca5c0e513ec366bdcc382d99
This adds an icon to the paired device details page which users can
click on to bring up a dialog for changing the display name for that
device.
We already had a dialog for changing the advertised name of the local
Bluetooth adapter that's used on the main Bluetooth settings page, so
I've made that abstract and created two new subclasses to encapsulate
the slight differences for this use case.
Bug: 62535241
Test: make RunSettingsRoboTests
Change-Id: I1c407f276e12aedf066a336e24b4ccd16d67c4df
Bug: 35877479
Test: make RunSettingsRoboTests
The existing behavior is to bring up a dialog with Bluetooth device
details with checkboxes for each supported profile. This adds a new page
that serves the same purpose with a switch for each profile and a footer
containing the MAC address.
Whether to use the new page or old dialog is controlled by a flag
accessible via BluetoothFeatureProvider.
Change-Id: I026c363d4cd33932a84017a67cbef51c258bad10