Commit Graph

23 Commits

Author SHA1 Message Date
Wei Wang
fcd3c608bf Ignore all failing tests in Settings for now in order to unblock ATP V2
migration

Test: m RunSettingsRoboTests passed on desktop
Change-Id: I2450aaa083aabdf224e070f588441bb01206972b
Bug: 252671269
2022-10-13 17:29:36 +08:00
Hugh Chen
827910d3c3 Show prediction time when both value are ready
Bug: 215767460
Test: make -j64 RunSettingsRoboTests
Change-Id: I07947b3eca1f656e0dc603f9b9839825dd3149fd
2022-02-22 05:38:33 +00:00
Chienyuan
84a9b23ba8 Show identity address in the bluetooth details page
Bug: 197044261
Test: build pass
Change-Id: Ic1ef1d575f35c4b37d6f9195ec10dd31ed5bdd5b
2022-02-08 11:29:03 +00:00
Tim Peng
4150049498 Remove flake error for AdvancedBluetoothDetailsHeaderControllerTest
Bug: 188871826
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedBluetoothDetailsHeaderControllerTest
Change-Id: If61140213d37b03188cba0c8f49baf3bb9b7f00e
2021-06-02 14:11:34 +08:00
Tim Peng
4d41945d77 [Rohan] fix test failing for AdvancedBluetoothDetailsHeaderControllerTest
-design changes and no battery icon

Bug: 188727945
bug: 188498118
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedBluetoothDetailsHeaderControllerTest
Change-Id: Ic5ebb3b5c06180090d54cd436c88c0bebe0d79f5
2021-05-22 13:39:25 +00:00
Wesley.CW Wang
50f314e45d Update StringUtil#formatElapsedTime method (2/3)
- Update the usage and the test case
 - Update discharging string to follow new string doc

Bug: 183689347
Test: make RunSettingsRoboTests
Change-Id: I1e14e7da8cb02755d8cf6e12626a0d94fad87121
2021-04-07 10:19:10 +00:00
Tim Peng
7246a4f842 [Rohan]The battery level show up "-1%", not sync with Rohan.
-Hide battery information when it is unknown

Bug: 184017556
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedBluetoothDetailsHeaderControllerTest
Change-Id: I5f94ccae364f1420e04af21ba425c29ac6a11dd2
2021-04-01 15:40:54 +08:00
Tim Peng
7e6762de8a Get low battery level through metadata
Bug: 183469297
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedBluetoothDetailsHeaderControllerTest
Change-Id: Iae8971a5c1f183fe141d4246e23d8feb6d68d0ff
2021-03-24 09:32:26 +08:00
Tim Peng
90df1c9de1 Show advanced Bluetooth information in device detail page
-Apply new metadata on aosp/1596412

Bug: 182338346
Test: make -j50 RunSettingsRoboTests ROBOTEST_FILTER=BluetoothDetailsHeaderControllerTest
make -j50 RunSettingsRoboTests ROBOTEST_FILTER=AdvancedBluetoothDetailsHeaderControllerTest

Change-Id: Ic48ed9213111d0c6ec19b317d4c22e1400261706
2021-03-15 10:16:14 +08:00
Hugh Chen
fa75a469da Implement advanced device battery prediction
This CL implements prediction of advanced device to
let users know what time their advanced device will
be out of battery.

Bug: 153706138
Test: make -j42 SettingsGoogle
Change-Id: Iadf2f1fa425ff5f0fa1abed681d82d13c392db62
2020-10-06 17:38:08 +08:00
hughchen
6060bc66e5 Add low battery level for case
- Add low battery level for case, because case and headset have
  different low battery level.
- Update test case

Bug: 154569936
Test: make -j42 RunSettingsRoboTests
Change-Id: Icf045b62992dde8d789e66343764849e43df1933
2020-05-08 15:15:15 +08:00
alictsai
6b76eb0ab6 Device details LCR should be show up " ! " with low battery.
screenshot:
https://screenshot.googleplex.com/f72YS3THutW.png
https://screenshot.googleplex.com/v6uw7XsOs9x.png

Bug: 151187813
Test: make -j42 RunSettingsRoboTests
Change-Id: Iabb4ac54e6f827f54cd7c5512995f185875e4a06
2020-03-27 13:14:01 +08:00
hughchen
58a99c6dab Use flag to confirm whether callback should unregister
This CL before, this class use isAvailable() to check whether
should register/unregister callback.
UI will be updated when this callback called.
But in one case, the isAvailable() state will not consistent
on onStart() and onStop().
The isAvailable() state will not consistent when user disconnect
device then forgot the device.
It's will cause callback not unregister when meet this case.
Then callback will duplicate call many times cause UI update not smoth.

This CL use flag to confirm the callback will unreigser on onStop().

Bug: 146617530
Bug: 145647143
Test: make -j42 RunSettingsRoboTests
Change-Id: I2b503ca9a7040b94ccc64ae196dad5a228fcbc6a
2019-12-26 14:43:56 +08: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
jackqdyulei
a2208c008b Fix broken bluetooth robo tests
Bug: 129159331
Test: RunSettingsRoboTests
Change-Id: I3e64659e59fd9b2ac58bf697116e1ee34928a3cd
2019-03-25 13:15:30 -07: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