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
TreeHugger Robot
fec083b2cd
Merge "[Battery usage U] Remove 'Phone Idle' to avoid confusion"
2022-12-26 02:42:50 +00:00
Wesley Wang
934700b559
Refactor battery saver schedule method
...
- Move schedule method and definition into BatterySaverUtils and reuse
them from utils
Bug: 260302999
Test: make SettingsRoboTests
Change-Id: I402c57629d1a6f3317f0a7c14529508ce81f999c
2022-12-22 11:45:09 +00:00
Zaiyue Xue
daeafc8fc6
[Battery usage U] Remove 'Phone Idle' to avoid confusion
...
Bug: 252938706
Fix: 252938706
Test: manual
Change-Id: I0ad973718f77640839dbdf4ac5ca4241f01bdb79
2022-12-22 08:36:59 +08:00
Kuan Wang
2c7f06e9b3
Use taskRootPackageName instead of packageName to load uid when usage
...
resource is USAGE_SOURCE_TASK_ROOT_ACTIVITY and taskRootPackageName is
not empty.
This logic is consistent with digital wellbeing: assign the screen-on
time onto task root activity when usage resource is
USAGE_SOURCE_TASK_ROOT_ACTIVITY.
Bug: 260964679
Test: make RunSettingsRoboTests + manual
Change-Id: I4c7ed342d8c00951879f5826bf79575f330ce86e
2022-12-21 02:39:23 +00:00
Kuan Wang
a1a7cba6a6
Move the getBatteryLevelData function from DataProcessor to
...
DataProcessManager and start the async task in DataProcessManager when
there is no battery level data.
Test: make RunSettingsRoboTests + manually
Bug: 260964903
Change-Id: Ie36ab6d121a5596a3abc16e7f570dd0d9b32e11c
2022-12-21 02:39:11 +00:00
Kuan Wang
1e7181cfcc
Remove "Other Users" entry in app usage list.
...
Don't show the aggregated other user entry in the app usage list to keep
consistent with screen-on time data.
Bug: 260964903
Test: make RunSettingsRoboTests
Change-Id: Id611e7222602f5ad2ea0fe27fb3f9f62fed31ff9
2022-12-20 03:00:05 +00:00
Kuan Wang
97924455ff
Implement the app usage data loading from database function.
...
Bug: 260964903
Test: make RunSettingsRoboTests + manual
Change-Id: I459dbdebe53e6b7421642955f36976b3e7c95fcb
2022-12-20 02:31:50 +00:00
Kuan Wang
8d2a26caed
Add DataProcessManager to manage the async tasks of battery usage data
...
processing.
Test: make RunSettingsRoboTests + manually
Bug: 260964903
Change-Id: Id3b2772a98ec2ab3b03910c8a5e81adf7ccd5646
2022-12-19 03:40:48 +00:00
Kuan Wang
cf7e1141df
Cancel data loading when hourly job happens in the first 40 minutes
...
after booting in AOSP.
Test: make RunSettingsRoboTests + manual
Bug: 257384343
Change-Id: I437b68719ff5ece73fa33b74cb144f4262528e8c
2022-12-19 02:36:07 +00:00
TreeHugger Robot
e0f3a47577
Merge "Add RECEIVER_EXPORTED for internal intent based on the PSA"
2022-12-19 00:02:44 +00:00
ykhung
b41b50c3dc
Add RECEIVER_EXPORTED for internal intent based on the PSA
...
Test: presubmit
Change-Id: I699f1e93cf8c44b046f131014d6200346798336e
2022-12-19 00:07:27 +08:00
Zaiyue Xue
b9b3dcc0fb
Purging battery diff data before calculating perctage and sort.
...
Bug: 261820602
Test: manual
Change-Id: I958995721238f32d0360861559ca5e1938ce6d3a
2022-12-16 16:24:12 +08:00
YK Hung
0b826de287
Merge "Update dock defender helper URL" into tm-qpr-dev am: c89f78c68f
am: e7ec6ee025
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20742827
Change-Id: I9db48b168b17dc7d7de50f9af15b9bf27f9419c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2022-12-16 06:06:08 +00:00
YK Hung
a8e2ded389
Merge "Update string for all defenders" into tm-qpr-dev am: d388dc1809
am: cf8ab7eef3
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/20743066
Change-Id: I3ef80837be675684e595f47cfe886a198992d167
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2022-12-16 06:04:43 +00:00
TreeHugger Robot
f8b8835761
Merge "Refactor getting allowlist set from feature provider."
2022-12-16 05:45:52 +00:00
Zaiyue Xue
bce700f1db
Refactor getting allowlist set from feature provider.
...
(1) Use Set<CharSequence> for all the allowlists.
(2) The contains() method of Set<CharSequence> also works for String. No
need an extra contains() util function.
Bug: 262802531
Fix: 262802531
Test: presubmit
Change-Id: Ib2aaf9a3b8db4618a8c46f138e8d35f15b77c104
2022-12-16 10:39:26 +08:00
YK Hung
e047b4f400
Merge "Move setup optimization mode to main thread"
2022-12-15 10:56:09 +00:00
Zhenwei Chen
35caf2ffb7
Update dock defender helper URL
...
Bug: 261206713
Test: Unit test passed
Change-Id: I6a8489b7e1a54d2c1d88cf6b04c8d1a4c9c6c235
2022-12-15 10:09:55 +00:00
TreeHugger Robot
87498a19e6
Merge "Add a new field elapsed_time_millis into Settings' atom"
2022-12-15 09:17:47 +00:00
Kuan Wang
6c4f83f33d
Load app usage events data in the hourly job.
...
Test: make RunSettingsRoboTests + manual
Bug: 260964679
Change-Id: Iaccaa77bd52fb7356cdcb786c64523f21040b128
2022-12-15 06:32:54 +00:00
Kuan Wang
52ad3ba925
add OWNER for protos directory
...
Test: NA
Bug: NA
Change-Id: I985a4918d7bac938dc843c8cdce1f139b5449609
2022-12-15 06:31:25 +00:00
Zhenwei Chen
1eea27ae82
Update string for all defenders
...
Test: Unit test passed
Bug: 262508668
Change-Id: Ia0126f9761caa43d0746962a9bb77173e9f45ad1
2022-12-15 05:31:18 +00:00
Zaiyue Xue
a944ee2a02
Fix b/262378515: NullPointerException in TabPreference.onDetached()
...
Bug: 262378515
Fix: 262378515
Test: presubmit
Change-Id: I9c0629d570538a664c361eae74e8f7818f4210df
2022-12-14 15:33:34 +08:00
Sunny Shao
d21c97e9a7
Add a new field elapsed_time_millis into Settings' atom
...
- Add a new field elapsed_time_millis to keep the elapsed time
since setup wizard finished.
Fixes: 260660970
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
Change-Id: I28d13c4987ae1e4ef12eaff27e26a5121cf8093b
2022-12-14 12:53:54 +08:00
TreeHugger Robot
a464ca0e47
Merge "Make BatteryStatsHistoryIterator API compatible with Iterator"
2022-12-14 01:49:18 +00:00
Wesley Wang
7423f4390c
Move setup optimization mode to main thread
...
- 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
2022-12-13 11:12:00 +00:00
Zaiyue Xue
4ee99b0e05
Remove logging for count of shown / hidden apps in Battery Usage page.
...
Bug: 262187603
Fix: 262187603
Test: presubmit
Change-Id: Iff3bcb07f6df424c7498f128739743210d8e7951
2022-12-13 13:17:56 +08:00
Zaiyue Xue
1bf57958d2
Don't hide 1% battery usage apps but show percentage "-" instead.
...
Bug b/242252864 will be fixed at the same time.
screen_record: https://drive.google.com/open?id=1ycEuazqQZzNWGO8E2Fh3GdgyTEd2Z9s0&authuser=0&resourcekey=0-x9BJJE6932jIv9fFoecjeQ&usp=drive_link
Bug: 262187603
Bug: 242252864
Fix: 262187603
Fix: 242252864
Test: manual
Change-Id: Id1a8b5291d66a38fb86f168d3115ae566e6ec079
2022-12-12 14:40:56 +08:00
Dmitri Plotnikov
732ecf7d43
Make BatteryStatsHistoryIterator API compatible with Iterator
...
Bug: 261622968
Test: make RunSettingsRoboTests ROBOTEST_FILTER=com.google.android.settings.fuelgauge.BatteryInfoTest RELAX_USES_LIBRARY_CHECK=true
Change-Id: I4b3cf18e4714017b412485120557eb22d7039118
2022-12-09 16:29:48 -08:00
Zaiyue Xue
fa90a4b311
[Battery usage U] Create a flag to guard battery usage features
...
Bug: 261800937
Fix: 261800937
Test: manual
Change-Id: I891c235228c9ca0709471b496e6f75167fd0a126
2022-12-09 15:15:34 +08:00
Zaiyue Xue
691c39b862
Merge "[Battery usage U] Calculate each item pertage for App tab and System tab separately."
2022-12-09 02:40:33 +00:00
TreeHugger Robot
fe3250007b
Merge "[Battery usage U] For system comsumed power, use device comsumed power directly instead of removing app comsumed power from it."
2022-12-09 02:32:55 +00:00
Zaiyue Xue
5474c1849b
[Battery usage U] For system comsumed power, use device comsumed power directly instead of removing app comsumed power from it.
...
Bug: 261826748
Fix: 261826748
Test: manual
Change-Id: Iab6eed4339fabe342835a020cadae11e6256be20
2022-12-08 19:03:27 +08:00
Zaiyue Xue
131958c8bc
[Battery usage U] Calculate each item pertage for App tab and System tab separately.
...
Bug: 261820602
Fix: 261820602
Test: manual
Change-Id: Iaab63bd5c6459486645987524d61b69dfca20fd6
2022-12-08 18:07:47 +08:00
TreeHugger Robot
2825910515
Merge "Clear unused field mPowerUsageFeatureProvider in PowerUsageAdvanced."
2022-12-08 02:18:15 +00:00
Zaiyue Xue
4b14c49dfb
Clear unused field mPowerUsageFeatureProvider in PowerUsageAdvanced.
...
Bug: 256123455
Test: presubmit
Change-Id: Ia22eb8d11836b9b0d8ab74f4760e81966040a947
2022-12-07 20:47:44 +08:00
Zaiyue Xue
76f19809c1
Fix b/261390301: NullPointerException at BatteryChartPreferenceController.addAllPreferences()
...
Bug: 261390301
Fix: 261390301
Test: manual
Change-Id: I23a2f0e73c5840b87577e734a4760423e0d62516
2022-12-07 17:09:05 +08:00
Zhenwei Chen
36c1e7dc20
Fix incorrect dock defender banner icon.
...
Screenshots:
https://screenshot.googleplex.com/32YV7V6A6wxBPxc.png
https://screenshot.googleplex.com/77iMZ8CeuE5W8wE.png
Bug: 261156455
Test: Unit tests passed and manual test on the device
Merged-In: I084c9cd52a408efa3b9aeee96a0af0cae481ec79
Change-Id: I084c9cd52a408efa3b9aeee96a0af0cae481ec79
Signed-off-by: Zhenwei Chen <zhenwec@google.com >
(cherry picked from commit 52323128dc
)
2022-12-07 05:46:57 +00:00
TreeHugger Robot
ccc77bf359
Merge "[Battery usage U] Show battery usage info immediately up till as close to the current moment as possible."
2022-12-06 14:56:29 +00:00