Before the setup flow completion, don't allow the app info page in App battery usage to be launched.
Bug: 327748846
Test: atest SettingsRoboTests + manual test
- factory reset + launch app battery usage app info via ADB during Setup -> verify app closes
Flag : EXEMPT bugfix
Change-Id: I486820ca2afecc02729a56a3c531fb931c1907d0
- Fetch foreground service info through new api from UidBatteryConsumer.
- Record fgs & bg usage time separately, combine them till ui display.
Bug: 315255868
Test: make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge.*"
Change-Id: Ic19844db7908a6ae6522c7a72972f44f94dcfca4
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
Save battery slot diff data into database in hourly job. Then read the
saved diff data and only calculate the remaining data. This could speed
up the battery usage loading.
Bug: 261163071
Fix: 261163071
Test: manual
Change-Id: Icd4868ca9326b64b17ddbccdb0311e755dc68026
This is to meet the Guidelines for Logging Package Names: go/package-name-logging-guidance
Bug: 267430574
Fix: 267430574
Test: presubmit
Change-Id: Icf10000f5dcf87e45175d4005af8365191ad444d
So the next cl (new summary for battery detail page) doesn't need to
deal with isValidToShowSummary=true case.
Bug: 262802531
Test: presubmit
Change-Id: I88528caedb29d61a05b40d3ca435fc007bf3f54c
- Due to unclear root cause of optimization mode being reset after
reboot, update the setup logic from deferred background thread to
main thread, to avoid any possible background task unexecuted case.
Bug: 241735485
Test: make SettingsRoboTests
Change-Id: I2de2181321712f89fadc04bf5000aea91a01485a
- Impl optimize mode log mechanism to record optimize setup flow
- Log optimize action with MANUAL, APPLY, RESET and RESTORE
- Use proto file to serialize logs
sample result: https://screenshot.googleplex.com/5KPrHVGb4pMvS7V.png
Bug: 241735485
Test: make SettingsRoboTests
Change-Id: I879663de4cf45d0cfb9cd7eee957eeb65addfbe1
- App usage page only use package name to launch the page, it can not
identify the different userId between normal app and work profile
app, add extra userId info into launch args
- Remove no battery usage state/string if usage time is empty
Bug: 251471047
Test: make SettingsRoboTests
Change-Id: Id06ebb0f0fcd863e423acd7839f89bc0ae2444c1
This is used in new App Info page.
To try:
1. adb shell am start -n com.android.settings/.spa.SpaActivity
2. Go to Apps -> All apps -> [One App] -> App battery usage
Bug: 236346018
Test: Unit test & Manual with Settings App
Change-Id: I4784e42f230534d8d843ec00de51032baffcb7e2
Moving the old restricted page to the new optimization page will happen
in a follow-up CL.
Test: Unit, manual
Bug: 238026672
Change-Id: I5fee9ebe03284a013da6bfca9ada8b166c6af91c
We have two different "Optimization mode" page design in the android R to support bi-state for AOSP and tri-state for Pixel device. From android T, we always show tri-state for both AOSP and Pixel. So it's time to clean up the legacy design for bi-state.
This change doesn't include string resources cleanup, which will be
included in a separated cl.
Bug: 232037602
Test: make RunSettingsRoboTests
Change-Id: I5194201d0b11e2dcea958d49bf07ed837a386465
Replace FooterPreference#SetLearnMoreContentDescription() with
FooterPreference#SetLearnMoreText().
This is a requirement: All links, controls, and buttons should
also have comprehensible text or tooltip text, so users can identify its
purpose, independent of context, such as when using the URL list from
TalkBack’s local context menu.
Bug: 215045903
Test: manual & robotest
Change-Id: Ib657ba336c5688c1434a58611dea3891001afe14
Hide the running time information for "Android System" entry, since this
entry will combine multiple system components together. It will provide
incorrect running time information. The getRealUid() method maps many
UIDs to Process.SYSTEM_UID(1000), which results in combining all of
those UIDs into one "Android System" entry. This is the expected behavior.
Bug: 220717612
Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER="com.android.settings.fuelgauge"
Change-Id: I9d44fe8490ad5c684419b8ebf8d7d5576a42788a
Fix incorrect usage for the logging method to cause the schedule type
and percentage data is not logged into the WW, since
MetricsFeatureProvider doesn't support log Pair.of() data into the
WestWorld or Clearcut directly, it is used for EventLogWriter only
Bug: 202906853
Test: make SettingsRoboTests
Change-Id: I9f1d157c77df9bd74f441105318790a2505a9c01
- Move to onPause to avoid some corner case (like kill apps from recent
app won't trigger onDestroy)
Bug: 195306545
Test: make SettingsRoboTests
Change-Id: I89445a7138c30e6c869ce1c5c9a3f818997d99a7
- Log the optimize mode only when leave this page and mode changed
- Update mOptimizationMode at onResume to make sure the state is sync
with framework
Bug: 195306545
Test: make SettingsRoboTests
Change-Id: Iab116220cd7d2b1bdb1c170c4b47016c763bf4fe
root cause: some OEMs can not provide valid intent for help & feedback
solution: check the intent is vaild or not before show up the help content
Bug: 204844010
Test: make RunSettingsRoboTests
Change-Id: I4e7a7c926205be1179d55d33ada345024c8a44ab
- Post the setup logic into background and setup once only when leaving
this page, this can improve the performance since we won't setup
every time when switching preference
Bug: 195306545
Bug: 199892006
Test: make SettingsRoboTests
Change-Id: I1c3ee4673cf5cdba0abe39f208dfb1412082c579