Commit Graph

13 Commits

Author SHA1 Message Date
hughchen
cf15f47ac7 Make battery icon as red when battery level < 20%
Bug: 139457284
Test: manually
Change-Id: I235dd86975b3c867183ff845893c3ed95c847356
2019-10-03 15:40:58 +08:00
Lei Yu
7b1e40813f Use short summary in advanced BT header
So it only shows "Active" without battery level

Bug: 132640667
Test: Manual
Change-Id: Ib8ef2b6bec23c178f76925e89d447e5ac496313a
2019-05-13 16:04:09 -07:00
Lei Yu
15899e8b0e Add SettingsPolicy to control BT feature
Fixes: 130302238
Test: RunSettingsRoboTests
Change-Id: I7e1bf55c476f8e4d3dec7a7dfc0e8d44e5bd53ae
2019-04-18 11:31:05 -07:00
Ugo Yu
9f11ccf319 Align with Bluetooth metadata API changes
* Align with the changes of Bluetooth metadata APIs.
* Move metadata utils from Settings to SettingsLib.

Bug: 124448651
Test: make RunSettingsRoboTests
Change-Id: Ic9ad91536ef3ff6807a08bbffa3dd796ef1ad523
2019-04-10 14:23:54 +08:00
Lei Yu
4350317580 Move bitmap recycle to onDestroy()
If we recycle it in OnStop() and this page isn't destoried,
it will crash when we revisit it.

Fixes: 130185099
Test: RunSettingsRoboTests
Change-Id: I4d3c1c12debcccb1ee7d676a1c5accece0b42e09
2019-04-08 16:25:47 -07:00
jackqdyulei
281cf17d89 Skip lifecycle if controller is not available
Fixes: 129076378
Test: RunSettingsRoboTests
Change-Id: If1e49785c2378ec2cf0f7d2837bc7d4c0ff915a0
2019-03-26 17:00:36 -07:00
TreeHugger Robot
3776476764 Merge "Use ThemedBatteryDrawable in settings" 2019-02-27 06:02:49 +00:00
Evan Laird
35e35622d9 Use ThemedBatteryDrawable in settings
Changed out BatteryMeterDrawable to inherit from ThemedBatteryDrawable
instead of BatteryMeterDrawableBase. Also removed warning text paint
because it seemed unused and simplified the interface.

Bug: 123705805
Test: visual
Change-Id: I30496e3d8881803d9d3d8a316c10387482a8f610
2019-02-26 14:11:58 -05:00
jackqdyulei
344d761e60 Add Bluetooth metadata listenr
If it is updated, we need to refresh UI to display latest information

Fixes: 124455912
Test: RunSettingsRoboTests
Change-Id: I73b03f4931e3c2b0d367bbd2d3b2057b26c84b59
2019-02-25 15:02:10 -08:00
jackqdyulei
5e5dd25b8f Fix issues in BT detail header
1. Update isAvailable() in controller
2. Update method to get fast pair icon

Bug: 124455912
Test: RunSettingsRoboTests
Change-Id: I24a04c8c91d74e9b8b7e8746ad6279fafa37f0a9
2019-02-22 14:46:10 -08:00
jackqdyulei
5cb4d251ee Update advanced bt header
1. Add callback to listen to device update
2. Add charging support for bt battery icon
3. When disconnected, only show main icon

Follow CL will update battery icon to show exclamation when it is
low.

Bug: 124455912
Test: RunSettingsRoboTests
Change-Id: I03fb3bf4c4b77711e14b1f2f53733771b525fe4b
2019-02-21 12:43:29 -08:00
jackqdyulei
47123c8224 Update BT header using BT metadata
As for unthethered headset, get BT data from BT metadata, rather than
CachedBluetoothDevice

Bug: 122460277
Test: RunSettingsRoboTests
Change-Id: Ifb5507cbbce9602726ba272c12d1bf95eff91001
2019-01-28 17:12:17 +08:00
jackqdyulei
1fc7629dda Add layout for advanced BT detail header
If device supports metadata, then we display advanced UI in Bluetooth
details header. This CL adds layout for this header.

In advanced layout, it will show:
1. Device name
2. Left, right and case icon
3. Left, right and case battery level

Once API is ready, following CL will get metadata from it and set it
to UI.
Bug: 122460277
Test: RunSettingsRoboTests
Change-Id: Ide044cf9705f350b431b2cb3a9ad82cc4425a17e
2019-01-28 14:12:49 +08:00