Commit Graph

9 Commits

Author SHA1 Message Date
Weien Wang
27e9617c16 Fix the battery icon on the battery page when low battery
Check power-saving state for drawing the battery icon on the battery page.
It will draw red + icon as status-bar did when battery saver is on.

Change-Id: Iee4a17c8e5cb3c8ee5d978eb23e3980597d09a1c
Fixes: 77150820
Test: Manual test, atest BatteryMeterViewTest BatteryHeaderPreferenceControllerTest
2018-05-24 08:05:15 +00:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
jackqdyulei
051fb19dd4 Merge "Add quickUpdate method to BatteryHeaderPrefCtrl" into oc-dr1-dev am: 7ea8ecdae1
am: fc55a3cef1

Change-Id: I7d23a1bab37417064a1ffc358f9856d711426c19
2017-06-28 17:20:04 +00:00
jackqdyulei
19648756cb Add quickUpdate method to BatteryHeaderPrefCtrl
This cl adds a method called quickUpdateHeaderPreference, which will
update the following items immediately without waiting for the
BatteryInfo:
1. Battery level
2. Battery charging status(whether to show lighting bolt)
3. Clear the charging summary

Note: this cl doesn't optimize the BatteryInfo loading time.

This cl also rename "TimeText" to "BatteryPercentText" because in
new UI that textview is used to display battery percentage.

Bug: 63029231
Test: RunSettingsRoboTests
Change-Id: I8cc886b35e937d73b46e47e303ff0994ccdcb61c
2017-06-27 13:35:41 -07:00
Tony Mantler
1d583e125f Make PreferenceController a mixin
Bug: 62912136
Test: Existing tests in BaseSearchIndexProviderTest
Change-Id: Ieda359806c09a019840b2005446c7ec8b61fdb00
2017-06-26 10:58:36 -07:00
Salvador Martinez
f4727ea07f Add ability to see both battery estimates on long press
If the enhanced estimate is being used in battery settings
it is now possible to long press on the text to have it display
both instead of the string that is normally used.

Adds another loader to enable this since it needs both the old
and the new estimates simultaneously.

Feature is hidden behind a feature flag that only googlers will
have enabled.

Test: robotests
Bug: 38399275
Change-Id: I5caf26513baada27efd50ddb0e72d3868da47150
2017-06-05 16:26:32 -07:00
Fan Zhang
fe23da579d Misc layout fixes
- Apply entity header effect to battery summary screen.
- BidiWrap wifi ap name is it's correctly displayed in RLT languages
- Remove footer preference layout - settingslib already has one

Fix: 62039146
Fix: 62138362
Fix: 37920219
Test: make RunSettingsRoboTests

Change-Id: Idf1385ee40772c63075e5f81eb039c6da56256ab
2017-06-05 11:25:49 -07:00
Salvador Martinez
0e8c88376c Move BatteryInfo to settings from settingslib
This CL simply moves BatteryInfo from settingslib to settings and
makes sure the tests still pass. No other changes are made other than
imports or minor changes needed to make sure existing code does not
break.

Test: Robotests still pass
Bug: 38399275
Bug: 38398949
Bug: 38399654
Change-Id: I59803348e2780b7676ccc6c43234a586c184d71f
2017-06-01 11:34:08 -07:00
jackqdyulei
605dbc66be Split loading process for battery header
This cl creates BatteryHeaderPreferenceController, which will first
load the battery level in ui thread(in displayPreference()), then
display the remaining time once we get the battery stats.

This is the best we can do to avoid ui flashing while removing the
animation

Bug: 38349587
Test: RunSettingsRoboTests

Change-Id: Ic3622bb73562ba42e69b37e5674a724c03c45f12
2017-05-23 13:22:42 -07:00