The BS warning only had support for following through when a user
wanted to toggle battery saver. This also makes it so that if
the warning is shown for routines it will finish whatever action
it interrupted once confirmed.
Test: robotests pass, manual verification
Bug: 129696128
Change-Id: I2c34ed678b19d95f3c7d1094ab8f79cc0c23252e
- Refactor battery icons to remove private attributes to allow them to
be overlayed
- Add drawable icon in settings for back arrow
- Update a few GM2 icons
Bug: 128354921
Test: make; open Settings
Change-Id: I84151a4e7d787381b6c51f02bb45ce5f15fa37a2
If a user tries to enable a battery saver schedule we want
to show them the battery saver warning if they haven't seen it.
This CL does that.
Test: robotests pass, manual verification
Bug: 128924009
Change-Id: I683279716ac7700043b1a01f88bdf2ae716eeece
A bunch of icons were using PNGs which didn't allow their color
to change when in dark mode. This CL simply adds vector drawables
for all the PNGs and sets the tint to the correct color where needed.
Test: visual inspection, robotests pass
Bug: 126199274
Change-Id: I372d94e374173ab0572dacb03674a40fa14cffb9
Instead of toggled on being to keep battery saver on, the UX
writers would like to make toggled on be turn battery saver off
automatically. Also turns the controller into a
TogglePreferenceController, because those exist apparently.
Test: visual inspection, tests pass
Fixes: 126938839
Change-Id: Iffac536d0b1956d4534ca1b5fa5c6440c4d3a3ff
The APIs that back these settings got renamed so this CL just
refactors all the calls to use the new names.
Test: robotests still pass
Bug: 126944845
Change-Id: I2975c7c79998823058db2c0ced2e5cf02216a106
It was persisting to settings secure instead of settings global.
Test: robotests pass
Bug: 128929858
Change-Id: I8c5bcc875d71096e70f1a70ec84e85d46c3abe43
This reverts commit 39beb2533f.
Reason for revert: <start to implement>
Fixes: 121042353
Test: adb shell settings put global battery_tip_constants test_low_battery_tip=true
Then go to Settings -> battery to see the text
Change-Id: I83cc187d5bfda5312410e91ee636373f305ef449
This adds the toggle that makes it so that battery saver turns
off automatically at high battery percentages or not.
Test: robotests
Bug: 112232746
Change-Id: I0df879a43e5390bc671c47e780bbbb466a3e9353
Fixes: 121042353
Test: adb shell settings put global battery_tip_constants test_low_battery_tip=true
Then go to Settings -> battery to see the text
Change-Id: Ie3c4a89ccb7c2724840dc886a502ef919e13a856
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
When it is charging, show "5% - charging"(not only "5%")
Bug: 112013485
Test: RunSettingsRoboTests
Change-Id: If2299cc4929d8fc40d63669b74590fafe39122dc
- check whether an app is system hidden module and do not show them in
recent apps list and battery usage list.
Bug: 120546598
Test: make RunSettingsRoboTests
Change-Id: I9080c9d39095890f3a3ebc7fce839dcf984a92d6
Use CardPreference directly here instead of preference category
Also clean up code and test a little bit.
Bug: 119618813
Test: RunSettingsRoboTests
Change-Id: I3ee2313c10e6e2e34609137f3dcb0391104377d5
This is MatrialCardView styled preference that only support
icon, title and summary.
Bug: 119618813
Test: RunSettingsRoboTests
Change-Id: Ibbf9eb2a01c8ee0579e1553ead6e43e96531c92a
This CL removes the line that was showing between the radio
buttons and the seek bar. Additionally it makes it so the seekbar
updates continuously as a user moves it and fixes a visual bug
where it would show 5% regardless of what the user had set it to
when exiting then re-entering the screen.
Test: visual
Change-Id: Icdb9cafe2bdda03d94230d1c8538f4c322b050e9
Fixes: 121388626
Fixes: 121211075
When enhanced estimation is enabled, it may still have malfunction
when getting data from it. This CL handles this case and fall back
to default estimation.
Change-Id: Id8d75b07316afa8a73a302b49dc7f8e8b77d4fa4
Fixes: 121213171
Test: RunSettingsRoboTests
This CL creates the controllers for the screen and makes it so that
the appropriate APIs are called when the user makes selections.
Test: battery saver comes on when state changed via adb, robotests
Bug: 111450127
Change-Id: I1dbcadd4b91276b700947df5a9444aabfec63aa3
This CL creates the new screen WITHOUT any of the behaviors
(changing the global settings/calling power manager apis) and
hooks it up to the preference in BatterySaverSettings for
navigation. The logic for the preference in BatterySaver Settings
is also added so that it shows the correct summary when the
schedule settings are modified. Additionally, a small tweak is
made to the radio preference widget to make it possible to hide
the appendix view. It didn't seem to do anything except get in
the way and potentially ruin your day, much like its biological
counterpart.
Test: Overriding power mode via adb, robotests
Bug: 111450127
Change-Id: Ic681aaf565ce1caf7d00d314e14ae6c4779fe8f6