- Use isAdditionalProfile() to ignore intent from either work or private profile.
Bug: 354828134
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Flag: EXEMPT bug fix
Change-Id: Ic0c91d956e4bfcd53576629efab4be847c94155e
Disable the gc() method explicit invocation due to the new policy in the
android to avoid android.os.strictmode.ExplicitGcViolation
Test: presubmit
Fix: 345577704
Flag: EXEMPT strictmode fix
Change-Id: I6ec7dac6735499c40a7ab6d135108e4c5013a4a4
- Clear database and reset periodic job
- Take a snapshot of current battery usage stats
Bug: 336423923
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Change-Id: I4aade9db950b508e2190605371f246904f131da3
- Ignore time change intent for time format update
- Clear data after current time in DB and refresh periodic job
- Take a snapshot of current battery usage stats if no periodic job in DB
Bug: 336423923
Bug: 314921894
Fix: 314921894
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusagei
Change-Id: Iec0f5e8e97f18c4603de711a5884336ba0af23a9
- 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
Replace the isWorkProfile() in the Settings with the common method
defined in the SettingsLib to avoid duplicate code
Bug: 306329984
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge"
Change-Id: Ic9b18e6b80c23f9d4fc200080224daa27cbf4a4d
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
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
avoid reference from DataProcessor.
This is to fix the Accessibility tests hang issue.
Tested on main branch (https://android-build.googleplex.com/builds/abtd/run/L40400000962473343).
Test: make RunSettingsRoboTests
Bug: 293366011
Bug: 295026588
Bug: 295123907
Change-Id: I345e0c060165e4d06f98ada6b2e1ca3cbb4f911a
Cache usage source into SharedPreferences when phone is booting to avoid
calling it too frequently.
It should be safe because the usage source can only change on reboot.
Bug: 293366011
Test: make RunSettingsRoboTests
Change-Id: I35c07539d294737c5764b03b746cfb39f4ce008d
Use the raw start timestamp instead of the first timestamp in the level
map to query app usage time.
Bug: 273175976
Fix: 273175976
Test: manual
Change-Id: Idb43b2bd5378e2f34ec722354408754f4a439c6d
In the headless system user mode a non-system user can also have
a work profile.
Refactor DatabaseUtils to get the profile parent's context when
the user is a work profile.
Bug: 270039752
Test: make RunSettingsRoboTests
Change-Id: I1fb78c9d91d59d50880a1ea0dd5f83a3d11dd08f
events outside the expected period to make sure the app usage calculation near the boundaries are correct.
Test: make RunSettingsRoboTests + manual
Bug: 264858898
Change-Id: I9f6aa5a09a537f48a26a08b7dff8ae81e8a16e2a
event query to avoid loading the same events repeatedly.
queryEvents API will return the events within [start, end). In the
hourly job, if we query the events from the latest existing time, the
events happening at the latest time will be saved for multiple times
into database. This aims to avoid this issue.
Test: make RunSettingsRoboTests
Bug: 265110147
Fix: 265110147
Change-Id: I408e88b0e15fe22585906261935854cf47707f9c
into background_usage_time_in_ms in the BatteryUsageStats (b/257392992).
Test: make RunSettingsRoboTests + manual
Bug: 258124768
Bug: 253553141
Change-Id: I0967eec0cbe6d0cb7a0535d744a1046dec1d267b
foreground_usage_consume_power, foreground_service_usage_consume_power,
background_usage_consume_power and cached_usage_consume_power into
database and pass them to UI.
Test: make RunSettingsRoboTests + manual
Bug: 256123455
Bug: 258124768
Change-Id: Ic46032f67eff5898f9d4182c517bbebe478eca01