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
This cl contains the moving about:
1. Several methods in Bluetooth/Utils.java
2. Bluetooth icon drawables
3. Bluetooth strings
4. Tests
Bug: 65488978
Test: RunSettingslibRoboTests
Change-Id: I682daa3eeb5022beb90a95763c70d19d32d54915
In ag/2863892, we add a new parameter to tune the size of battery icon.
This cl use this parameter and update the icon in bluetooth detail page.
Bug: 65397557
Test: RunSettingsLibRoboTests & Screenshots
Change-Id: I6dd26f14b3209101dd39320b3720fbd4f79acf54
This cl change util method in bluetooth package to return
drawable instead of resId.
If the bt device has battery level, then method return customized
layerDrawable, otherwise return a simple drawable created from
resId.
Bug: 63393322
Test: RunSettingsRoboTests
Change-Id: Ib21822eafda0e8570212ce5cb070478e4f4876a2
Merged-In: Ib21822eafda0e8570212ce5cb070478e4f4876a2
The problem is that we were calling done() on the EntityHeaderController
and passing false for whether to rebind the action buttons, which means
we were getting the default behavior including a visible gear
icon. Passing true to request rebinding causes that icon to be hidden.
Bug: 63405635
Test: make RunSettingsRoboTests
Change-Id: I031f4a2d176ff3be025cc2675d7026a679936b03
* Use String in connected device summary instead of resource id
* This allows dynamic strings to be built by CachedBluetoothDevice
such as ones involve battery level percentages
Bug: 35874078
Test: make, unit test, test with Bluetooth devices
Change-Id: I583eac73280ca17387b215a4e7095e27de399998
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
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