Kuan Wang
c28daecbc5
Use battery unplugging event to compute the full charge start time on
...
Pixel devices.
Test: make RunSettingsRoboTests + manual
Bug: 256124406
Change-Id: I80b33db6e25ac0c693c50ddf93b6343c0fea942f
2023-01-17 17:38:35 +08:00
Kuan Wang
b427e8f02a
Merge "Not show time information in battery optimization page when opened from Settings -> Apps"
2023-01-16 07:02:38 +00:00
Kuan Wang
1d58de3395
Merge "Add latest battery usage data when exporting battery usage data to EBS and Settings -> Apps"
2023-01-16 07:02:27 +00:00
Kuan Wang
96aee4896b
Not show time information in battery optimization page when opened from
...
Settings -> Apps
Test: make RunSettingsRoboTests + manual
Bug: 265130434
Change-Id: Ie7ae6a97041f490e81adbe8e0c530799e09a7c66
2023-01-16 12:07:07 +08:00
Kuan Wang
54d7cd8a7a
Add latest battery usage data when exporting battery usage data to EBS
...
and Settings -> Apps
Test: manual
Bug: 265130434
Change-Id: I1c6c1a831416d596b5bd71c6499f4c4672dbcdea
2023-01-16 11:44:53 +08:00
Zaiyue Xue
7627a0e575
Fix b/265409044: The battery usage page auto goes up when coming back from app details page.
...
screen record after fix: https://drive.google.com/file/d/1a2vvMIYLSalXfM8-004drKBWK2LcK_F9/view?resourcekey=0-A586Sk0yx-OnErHkd5EgjQ
Bug: 265409044
Fix: 265409044
Test: manual
Change-Id: I7a58c9081250936de27a4970d0a9708168138fb9
2023-01-13 20:41:26 +08:00
Kuan Wang
4a6b26558d
Query usage event for a longer time period and then trim the usage
...
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
2023-01-13 15:17:27 +08:00
TreeHugger Robot
b8a4577914
Merge "Fix b/265054711: Settings crash on changing device orientation from battery usage page."
2023-01-12 10:34:05 +00:00
Zaiyue Xue
9e9886997f
Merge "[Battery usage U] [UI] Show screen time in the battery detail usage page"
2023-01-12 09:18:25 +00:00
Zaiyue Xue
6676e1758b
Fix b/265054711: Settings crash on changing device orientation from battery usage page.
...
Bug: 265054711
Fix: 265054711
Test: presubmit
Change-Id: I585fb054980d4536bb05d4778cb439031f34232f
2023-01-12 17:10:47 +08:00
Zaiyue Xue
0639abfcca
[Battery usage U] [UI] Show screen time in the battery detail usage page
...
screen record: https://drive.google.com/file/d/1TUbcysrVoj10iUhoMIT0wuCDJY8EMpy7/view?resourcekey=0-lS9d0aIQqrgJ7CpOlsOlYw
Bug: 258125117
Fix: 258125117
Test: manual
Change-Id: I31fbc7c45473ded254ebf1b1e82e09dbc88480cf
2023-01-12 15:45:51 +08:00
Zaiyue Xue
4ecf42f1bb
[Battery usage U] [UI] Add a threshold to filter out very small battery usage items in the app list
...
Bug: 264840285
Fix: 264840285
Test: manual
Change-Id: I36a6c0dc284d09efcf82316db1541d289c37b16f
2023-01-12 15:44:26 +08:00
TreeHugger Robot
6b47dd97dd
Merge "Clean up always false parameter isValidToShowSummary."
2023-01-12 06:54:32 +00:00
Zaiyue Xue
e8f2631f25
Fix b/264582296: Incorrect app battery usage after switching between 'restricted/unrestricted/optimized'.
...
This bug is due to the instance fields state is not refreshed after setAppUsageState(). When setting back to the original mode in the same page, getAppOptimizationMode(mMode, mAllowListed) still returns the original mode. So the setting back action is ignored.
Bug: 264582296
Fix: 264582296
Test: manual
Change-Id: I4da5dd7f1ca2660661f842a67b7d799aabd1ba05
2023-01-12 12:13:48 +08:00
Zaiyue Xue
a500e4f739
Clean up always false parameter isValidToShowSummary.
...
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
2023-01-11 21:03:42 +08:00
TreeHugger Robot
569becdb7f
Merge "Use (the last existing timestamp in DB + 1) as the start time of usage event query to avoid loading the same events repeatedly."
2023-01-11 10:51:40 +00:00
Zaiyue Xue
43ace6ed33
Merge changes from topic "feature0"
...
* changes:
Refactor processBatteryDiffData() from DataProcessor to BatteryDiffData class.
Refactor PowerUsageFeatureProvider: Cache the config set to avoid generating the set again.
2023-01-11 08:57:29 +00:00
TreeHugger Robot
24dbaeba1e
Merge "Clean up unused code in AdvancedPowerUsageDetail class"
2023-01-11 08:54:30 +00:00
Kuan Wang
6da66f9a5c
Use (the last existing timestamp in DB + 1) as the start time of usage
...
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
2023-01-11 16:18:55 +08:00
Zaiyue Xue
cad4c069bd
Clean up unused code in AdvancedPowerUsageDetail class
...
Bug: 262802531
Test: presubmit
Change-Id: Ide91bd5312296945effb5a54422bda2c9623341d
2023-01-11 14:27:53 +08:00
TreeHugger Robot
89e5b837b9
Merge "Adjust background time to avoid background + screen time larger than time slot duration."
2023-01-11 05:54:55 +00:00
Kuan Wang
a396885f5e
Adjust background time to avoid background + screen time larger than
...
time slot duration.
Test: make RunSettingsRoboTests
Bug: 265089855
Fix: 265089855
Change-Id: Idf3fee13eccd5b1f699feb5f79bd2aa474e444b8
2023-01-11 11:44:36 +08:00
Zaiyue Xue
4221504e43
[Battery usage U] [UI] Update the text in footer
...
Bug: 265088249
Fix: 265088249
Test: manual
Change-Id: If112f7a0b3509cdf11f1ffcea233ab3ace2bf6d7
2023-01-11 11:10:54 +08:00
Zaiyue Xue
f080429ddb
Refactor processBatteryDiffData() from DataProcessor to BatteryDiffData class.
...
So that only hourly battery diff data needs purgeFakeAndHiddenPackages()
and combineBatteryDiffEntry(). This is also easy to set hourly threshold
in the next cl.
Bug: 264840285
Test: manual
Change-Id: Ie0bc6d53f96285285019dd83c1f39305eca79c71
2023-01-10 20:40:13 +08:00
Zaiyue Xue
7f3ff17bcf
Refactor PowerUsageFeatureProvider: Cache the config set to avoid generating the set again.
...
Bug: 262802531
Test: manual
Change-Id: I61b36e4e057c432d814aa104a37f0e0d552720cb
2023-01-10 19:42:09 +08:00
Kuan Wang
a708592e0a
Add logging for total screen-on time and foreground usage time.
...
Test: manual
Bug: 260965322
Change-Id: Ia1711fb73a6390e6a91289331daf3d88675731fe
2023-01-10 14:36:01 +08:00
TreeHugger Robot
1b4428ea3d
Merge "[Battery usage U] [UI] Show screen time in the battery usage app list items"
2023-01-09 11:33:10 +00:00
TreeHugger Robot
95b9ca6573
Merge "Revert "Fix the inverted logic to judge whether an app is system app.""
2023-01-09 09:39:02 +00:00
Zaiyue Xue
48a1dacc39
[Battery usage U] [UI] Show screen time in the battery usage app list items
...
https://drive.google.com/file/d/1N2yrra6cga6CRIXzxTGhctcxwN47lE89/view?resourcekey=0-qlw1a78Ph-gSfXFAHKoumQ
https://drive.google.com/file/d/1joSI3YL8dn0rRW1Ywyte7MUy_CTDFS2p/view?resourcekey=0-VsgaqSi2YUfn6ImZEOBH-g
Bug: 258120710
Test: manual
Change-Id: Id22d2490d0bffeb8b7d2e0941bcdb4e3d352e966
2023-01-09 17:26:56 +08:00
Zaiyue Xue
9a35838436
Revert "Fix the inverted logic to judge whether an app is system app."
...
This reverts commit 814eff1c24
.
Reason for revert: The original logic is right.
Change-Id: I2aee0f9ab13c60d843e91056de9d409a1d84b9d4
2023-01-09 07:30:35 +00:00
TreeHugger Robot
3eabebb730
Merge "Change all the system items unclickable in battery usage list."
2023-01-09 02:47:57 +00:00
TreeHugger Robot
d6905dd6ce
Merge "[Battery usage U] [UI] Show total "Screen On Time" in the battery usage page"
2023-01-07 03:22:46 +00:00
Zaiyue Xue
e853dd3104
Change all the system items unclickable in battery usage list.
...
Bug: 264643763
Fix: 264643763
Test: manual
Change-Id: I5854f9517bfb308142cc5f3c5e5cd8f54a237d59
2023-01-06 19:42:46 +08:00
Zaiyue Xue
833e47d851
[Battery usage U] [UI] Show total "Screen On Time" in the battery usage page
...
Screen record: https://drive.google.com/open?id=16ZOp1E2YBzWQXbnXl786FaLFPel-S9CF&authuser=0&resourcekey=0-oRqCrdTc9FZjVgsq9orhEw&usp=drive_link
For Arabic: https://drive.google.com/open?id=1zh_4jcUnqLC6CDgwju1qQkWJ0QCtm19c&authuser=0&resourcekey=0-kuKfDdOTWxqOUmD0RfPNLQ&usp=drive_link
Next step: show screen on time for each app
Bug: 258120710
Test: manual
Change-Id: I2085a2a85ebd50b2ac876972f6a8ebbf6f20246c
2023-01-06 19:09:52 +08:00
Zaiyue Xue
814eff1c24
Fix the inverted logic to judge whether an app is system app.
...
Bug: 264626206
Fix: 264626206
Test: maunal
Change-Id: I3750e3b11e444add27243c492cf8968373cd57d0
2023-01-06 15:24:44 +08:00
Zaiyue Xue
7c987c9d98
[Battery usage U] Add an item "Others" in the app list to group small usage apps. This will make the total percetage 100%, which is easy to understand for users.
...
Bug: 258124173
Fix: 258124173
Test: manual
Change-Id: I5965eeb73a2071c4a9994655e4ed24ec3adf64e8
2023-01-05 11:22:33 +08:00
Zaiyue Xue
e756675e69
Combine system apps to one item in the battery usage app list.
...
Bug: 262952385
Test: 262952385
Test: maunal
Change-Id: I078677b13a22f5e2f8f194bb5d5259f8c54c6b1e
2023-01-04 20:32:56 +08:00
TreeHugger Robot
949dd58112
Merge "Replace battery usage breakdown list from tabs to dropdown list."
2023-01-04 12:17:41 +00:00
Zaiyue Xue
778a4b42e3
Replace battery usage breakdown list from tabs to dropdown list.
...
screen records:
https://drive.google.com/file/d/15VJGQ_G2KIpyFcvZsyE0iRno0WZhfjGb/view?usp=sharing&resourcekey=0-bg48BsC2b-BT_80CGlzpWg
https://drive.google.com/file/d/1RaoysytQ5oZQu8CNPhYgxqBahk3UfVbr/view?usp=sharing&resourcekey=0-Xk2J36fjYWBo6KpFTrMr4Q
Bug: 264338267
Fix: 264338267
Test: manual
Change-Id: Ic020cce711b5232adfc80272836d7c2d0250d94a
2023-01-04 16:20:47 +08:00
Kuan Wang
b2f8c095ac
Add null check to avoid NullPointerException.
...
Test: make RunSettingsRoboTests
Bug: 264198981
Fix: 264198981
Change-Id: Ida2ff6beed5c0dba6329023b72e55daf1bf573f1
2023-01-04 07:08:37 +00:00
XingHai Lu
df1fc7e0fa
Merge "Cleanup plurals format Change <one> to <1> in string res file Test: Update, existing tests still pass bug: 199230342"
2022-12-30 02:44:25 +00:00
ykhung
553baca4ce
Remove EarlyWarningTip and move the logic into LowBatteryTip
...
Fix: 263835342
Test: presubmit
Change-Id: I256cd6f364979046ee87524751c3fe137a0524c2
2022-12-29 15:53:57 +08:00
YK Hung
ea0b1a99b0
Merge "Remove the legacy EarlyWarning tip mechanism to improve performance"
2022-12-28 16:03:14 +00:00
Kuan Wang
1ce97c8ebe
Generate app and device screen-on time data and return back to UI for
...
rendering.
Test: make RunSettingsRoboTests + manually
Bug: 260964903
Change-Id: I2fd69b4686cc2e1413ad0eb43c07b6164e411411
2022-12-28 07:40:39 +00:00
ykhung
4a470d87dc
Remove the legacy EarlyWarning tip mechanism to improve performance
...
Fix: 263835342
Test: presubmit
Change-Id: I0c3f61a21874c70b49cdeb73bbdc285ef8c4a35f
2022-12-28 15:33:19 +08:00
Kuan Wang
bb57a75f36
Merge "Dump app usage event data in db in BugReportContentProvider."
2022-12-28 03:08:40 +00:00
Kuan Wang
b2b74d8a8b
Dump app usage event data in db in BugReportContentProvider.
...
Test: make RunSettingsRoboTests
Bug: 260965327
Change-Id: I9f7ac74ed53b19d6ce9be3afa3ecf2a602d6309b
2022-12-28 02:56:43 +00:00
Kuan Wang
120c68881c
Generate intermediate app usage data after all usage data has been
...
loaded for further use.
Test: make RunSettingsRoboTests + manually
Bug: 260964903
Change-Id: I52d96151cab112adca68573f3b47a53b7152f2c0
2022-12-28 02:56:35 +00:00
ykhung
b875752307
Add isBatteryManagerSupported() to control adaptive preferences page
...
Add isBatteryManagerSupported() in the PowerUsageFeatureProvider to
support controlling the adaptive preferences page dynamically
Bug: 229558366
Test: presubmit
Change-Id: Iffb552feb9e08ca72f2970eb778cd3fcd18f0b7e
2022-12-27 15:31:11 +08:00
xinghailu
1637a3a10a
Cleanup plurals format
...
Change <one> to <1> in string res file
Test: Update, existing tests still pass
bug: 199230342
Change-Id: Ic3a5259570cb52cd1664638f3b1058c87a631c04
2022-12-27 12:12:11 +08:00