The AsyncTasks started in DataProcessManager are not cancelled when
fragment is closed. Introduce helper class LifecycleAwareAsyncTask to
cancel AsyncTask automatically when lifecycle is stopped.
Bug: 384473507
Flag: EXEMPT bug fix
Test: Unit test & open/close battery usage screen 1000 times
Change-Id: I060f559fa85cc5feb9a42cb8dcc0581782a91d09
Keep the current thread for period job flow; only call handler back to
the main thread in UI flow.
Bug: 374570240
Fix: 374570240
Test: manual
Flag: EXEMPT bug fix
Change-Id: Ie923dbbd858c0c7000fa16a6c639f56624b2ece5
- For personal/work profile, always send data to db
- For private profile, skip load data in period job
Bug: 331720433
Bug: 324191159
Test: manual
Change-Id: I77526dfdc837a6edaa9184bf3c751a7455b839a8
Since the detectSettingsAnomaly method does not only detect settings but
also other power related anomalies. Change the method name to
detectPowerAnomaly to make it more reflects what it really does.
Bug: 320404576
Test: make SettingsGoogleRoboTests
Change-Id: I4b5bec3aba81cd0dc6fef2c976eae3d64da3ede5
- Use database cache for single-user single-profile
- Reload battery usage info in other cases
Bug: 299032923
Test: manual
Change-Id: I5e524a094422639eedbf6e07eda498f3f72fccae
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
- Use SharedPreferences to record and filter the already dimissed anomaly.
Bug: 291689623
Test: manual
Change-Id: I4fd4a39066591a4a201857f9586b6595b7d5c43b
- Use SharedPreferences to record and filter the already dimissed anomaly.
Bug: 291689623
Test: manual
Change-Id: I4fd4a39066591a4a201857f9586b6595b7d5c43b
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
SettingsGoogle to Settings and rename them to BatteryUsageDataLoader and
BatteryUsageBroadcastReceiver.
Bug: 253395332
Test: make RunSettingsRoboTests
Change-Id: Ide7c572a7df826ca576223c297b8ec78c45cc94e