Fix the blinking while tapping chart to select time intervals.
- setHasStableIds(true) to avoid BatteryChartView create viewHolder again when SettingsPreferenceGroupAdapter invoke notifyDataSetChanged()
Recover the fade-in animation when display the hourly chart for the first time.
- set the default alpha of hourly chart in xml to 0.
Bug: 378997970
Bug: 349652542
Flag: EXEMPT bug fix
Test: visual
Change-Id: Ia6c131452fca65db7149664c7e18ca68e9703def
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
Ensure getContext() is not null before invokeJobRecheck() in the
background, since the main fragment may be detached to return null
context (in the corner case)
Test: atest
Fix: 331719252
Change-Id: Ia7ba757d2e6ebaf3fd371af51270c0eb0ad0a9f7
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
Proto is not supported to fully toString() in non-debug mode.
Bug: 327978756
Fix: 327978756
Test: manual
Change-Id: I1231c40769fd345b500ec120cf9c6fca3eb7c54a
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
When slotUsageData is null, the UI should update screen time to 0
instead of skipping update.
Bug: 304432148
Bug: 299801782
Bug: 301943900
Fix: 304432148
Fix: 299801782
Fix: 301943900
Test: manual
Change-Id: I25da1abf8ea79305ebf5468977b2a57ce917609f
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
When two loaders started almost at the same time,
it is possible onLoadFinished is never called.
Bug: 256523472
Test: Unit tests passed and manual test on device
Change-Id: I41a041d5878f9930db44775408380d0d4588faba
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
BatteryAppListPreferenceController is totally replaced by
BatteryChartPreferenceController now. Update the search index returns.
Bug: 256123455
Test: manual
Change-Id: I2340f1be0cee74771aab293a5df8551325c014be
with the new functions in DatabaseUtils.
Bug: 253395332
Test: make RunSettingsRoboTests + manually
Change-Id: I5f60cef80d1e9ba3f87ab6f84492463152a40276