After this CL, we can follow Guideline:go/hc-mainline-dev#format-code to keep java format consistent.
Test: manual
Bug: 304439460
Change-Id: I5bb77f81b0bd9be618e34942eaaee8296bc42796
the old PorterDuff color filter didn't allow us to pass through the
drawable's alpha.
Test: manual
Bug: 162901879
Change-Id: I1ad7d9a0177c7a25d1c6a5a8437c27f60390f45e
ThemedBatteryDrawable will no longer need it due to drawing more
betterer
Test: battery should look the same
Bug: 129014647
Change-Id: I6706cec2b3c3bfbdc0e0456c58191bc7152783e7
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
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
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
Update Utils.getColorAttr and similar methods in Utils to return a ColorStateList instead of a color
Bug: 74872054
Test: Force to display different color items then manually test
Change-Id: If002f9a578558e6254220c36ef556e8378d4522a
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
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
This changes the donut background color to a lighter blue and changes
the overall background to be a grey. Both of these colors match the
Battery implementation.
Bug: 35245772
Test: Manual
Change-Id: I8e12afe4434a0e2428384fc496cab5c05dc998ee
When battery asyncLoader is loading batterystats, show a battery
placeholder(critical level) and animate to real status once data is
loaded.
Bug: 35917699
Test: RunSettingsRoboTests
Change-Id: Ie4ff73ff2cc0b9e17b4541e3284bf2ac34da42c4
Merged-In: Ie4ff73ff2cc0b9e17b4541e3284bf2ac34da42c4
This cl refine battery icon ui in low battery mode:
1. Should show indicator(fixed in ag/2035178)
2. Show bolt icon when charging
3. When battery is low, set battery background as red and indicator
as white.
This cl also includes the field updates for battery.
Bug: 36862496
Test: RunSettingsRoboTests
Change-Id: Ifb2ed339742119bbff78712df09288b895756b1f
1. Refine the battery header view
2. Move stats section to the place above power management
3. Add last full charge battery stat
4. Add the disclaimer as a footer
Also update the method name in test file, and this ui changes
also fix the header flash problem.
Bug: 36576021
Bug: 36494178
Test: RunSettingsRoboTests
Change-Id: I9784dbbbe16e61da7287f300183347dd4eee6a2b
(cherry picked from commit edfd09d590)
1. Show gauge icon at the top of battery main page instead of
battery usage graph.
2. Move the click action from battery usage graph to gauge icon.
Bug: 34387464
Test: RunSettingsRoboTest
Change-Id: Ib182619d6805b401cde03a50e2ae907cf4df7b94