mxyyiyi
077158e2a6
Fix purge condition for system component in BatteryDiffData.
...
- System component do not have screen-on-time, use foreground usage time (also the mUsageDurationMs in BatteryEntry).
Bug: 321265878
Test: Manual
Change-Id: I8e9d60b1953fe4b0aaf42380b0fdadb75b191479
2024-04-02 14:15:03 +08:00
YK Hung
6d02ca945f
Merge "Update logs of BatteryEntry & BatteryHistEntry" into main
2024-04-01 05:50:04 +00:00
mxyyiyi
7cea50775d
Update logs of BatteryEntry & BatteryHistEntry
...
Bug: 331426391
Test: manual
Change-Id: I2825cecbaab35b3ef4a645a9e2d57f579d88ef19
2024-04-01 11:28:31 +08:00
YK Hung
e78fd23820
NPE protection for invokeJobRecheck() in the fragment
...
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
2024-03-29 02:48:11 +00:00
Treehugger Robot
54504f1282
Merge "Fix ImpossibleNullComparison errorprone warning" into main am: 1614fc4180 am: 131f4b8d94
...
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/3011721
Change-Id: I3b48d4419eb1648591eb2d83c2411633258d305a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2024-03-26 05:38:48 +00:00
Cole Faust
448c18e5ff
Fix ImpossibleNullComparison errorprone warning
...
Protobuf fields cannot be null.
Bug: 253827323
Test: m RUN_ERROR_PRONE=true javac-check
Change-Id: Ied830dbf9ddde4c43281feb38a01f01d0750fea7
2024-03-25 11:56:24 -07:00
YK Hung
85cc4cd821
Merge "Update detectSettingsAnomaly API to detectPowerAnomaly(1/2)" into main
2024-03-25 16:14:04 +00:00
Shun Lung Chen
265fe257c2
Update detectSettingsAnomaly API to detectPowerAnomaly(1/2)
...
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
2024-03-25 07:34:33 +00:00
Yiling Chuang
38337dc8b8
Merge "Revert "Add a new tip type for wireless charging."" into main
2024-03-22 06:39:08 +00:00
Yiling Chuang
21b1efa944
Revert "Add a new tip type for wireless charging."
...
This reverts commit f709de6d27 .
Reason for revert: feature no longer needed
Change-Id: Ie5aab651406d1085c363c73559197eee2b178da4
2024-03-22 03:08:03 +00:00
Edgar Wang
1a683a1007
Merge "Listen Developer option enable state" into main
2024-03-22 01:13:17 +00:00
Xinyi Mao
4e56242991
Merge "Update percentage symbol from western sign to arabic sign" into main
2024-03-21 06:41:15 +00:00
mxyyiyi
8ce68baa24
Update percentage symbol from western sign to arabic sign
...
(https://screenshot.googleplex.com/ALgEzpDKG4BMBB4 )
Fix: 322855881
Test: manual
Change-Id: I1335996814a1b80006481f52201a107144497859
2024-03-21 12:09:55 +08:00
Edgar Wang
26a5c73dc7
Listen Developer option enable state
...
- When developer option disabled, any page in Developer option
should be closed.
Bug: 293894425
Test: manual
Change-Id: I392b122e885118770be1af2b51c0c7ef92279e1b
2024-03-21 04:08:08 +00:00
mxyyiyi
c9e8b8a011
Support Private Space in battery usage.
...
- Use database cache for single-user single-profile
- Reload battery usage info in other cases
Bug: 299032923
Test: manual
Change-Id: I5e524a094422639eedbf6e07eda498f3f72fccae
2024-03-15 11:13:34 +08:00
Jacky Wang
081dbac72e
Reset app preferences does not trigger backup for App battery usages
...
Bug: 328712606
Fix: 328712606
Test: UT && Verify logcat when change/reset App battery usages
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ef8a51fac85eedee8f9509b9f7c002281c1ae093 )
Merged-In: Ia3917c8dc2654185f5f048c048362fd47379b7d1
Change-Id: Ia3917c8dc2654185f5f048c048362fd47379b7d1
2024-03-13 03:23:50 +00:00
Jacky Wang
b03de69d79
Sort applications to avoid backup data change
...
Bug: 328698829
Fix: 328698829
Test: Manual test
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ea8ed47d070be8b74297f1ca330dfdf9b196ec29 )
Merged-In: I0e5bf1145d972db136bbd85571f015b4ab6fb171
Change-Id: I0e5bf1145d972db136bbd85571f015b4ab6fb171
2024-03-13 03:23:34 +00:00
Jacky Wang
85e130ad7a
[DataStore] Support backup data state computation
...
Bug: 325144964
Test: Manual tests
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5847d50e7bcab7d45d03351df802fb1228226aa5 )
Merged-In: I8ad4f2788f9f364eceb1bca841830e1f3a68fe77
Change-Id: I8ad4f2788f9f364eceb1bca841830e1f3a68fe77
2024-03-13 03:23:27 +00:00
Jacky Wang
a76aade27e
[DataStore] Support backup data with compression
...
Bug: 325144964
Test: Manual tests
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:23821a69f31c5712cb369bfdd7776a66926dc5ac )
Merged-In: Id73a30c2b58fafa6d9d1cbe247a6d9c38397394b
Change-Id: Id73a30c2b58fafa6d9d1cbe247a6d9c38397394b
2024-03-13 03:23:19 +00:00
Jacky Wang
ef8a51fac8
Reset app preferences does not trigger backup for App battery usages
...
Bug: 328712606
Fix: 328712606
Test: UT && Verify logcat when change/reset App battery usages
Change-Id: Ia3917c8dc2654185f5f048c048362fd47379b7d1
2024-03-11 13:41:03 +08:00
Jacky Wang
ea8ed47d07
Sort applications to avoid backup data change
...
Bug: 328698829
Fix: 328698829
Test: Manual test
Change-Id: I0e5bf1145d972db136bbd85571f015b4ab6fb171
2024-03-08 15:28:12 +08:00
Jacky Wang
5847d50e7b
[DataStore] Support backup data state computation
...
Bug: 325144964
Test: Manual tests
Change-Id: I8ad4f2788f9f364eceb1bca841830e1f3a68fe77
2024-03-07 10:03:19 +08:00
Jacky Wang
23821a69f3
[DataStore] Support backup data with compression
...
Bug: 325144964
Test: Manual tests
Change-Id: Id73a30c2b58fafa6d9d1cbe247a6d9c38397394b
2024-03-06 19:51:55 +08:00
Zaiyue Xue
62132fffb2
Merge "Update the logic for logging anomaly information to WW." into main
2024-03-04 08:00:08 +00:00
Zaiyue Xue
a399c73ba0
Merge "Fix anomaly is not logged in non-debug mode." into main
2024-03-04 07:55:18 +00:00
Zaiyue Xue
87ecb92e6e
Fix anomaly is not logged in non-debug mode.
...
Proto is not supported to fully toString() in non-debug mode.
Bug: 327978756
Fix: 327978756
Test: manual
Change-Id: I1231c40769fd345b500ec120cf9c6fca3eb7c54a
2024-03-04 13:24:13 +08:00
Zaiyue Xue
51740f6540
Update the logic for logging anomaly information to WW.
...
Bug: 316075226
Test: manual
Change-Id: I22198ee1ae3cedee6ee9d2e8191423000ba32af2
2024-03-04 10:47:29 +08:00
Jacky Wang
006bf17c4f
[DataStore] Migrate BatteryBackupHelper to BackupRestoreStorage
...
Bug: 325144964
Test: Manual tests
Change-Id: I19f7c78969d70648d1e45f1627827d98b1fdd1e0
2024-03-03 22:42:00 +08:00
Yiling Chuang
93c0dbf98d
Make SmartBatterySettings unsearchable when it's not available.
...
Bug: 323915905
Test: robotest
Change-Id: I5adc9d19b482b8e07237f5c7d62d315556095c38
2024-03-01 16:28:12 +00:00
YK Hung
3f52a6c47d
Merge "Update log metrics in battery usage." into main
2024-02-19 10:51:01 +00:00
pajacechen
1abc13fe29
[Shadow] Update the string and the dismiss button
...
- Disable the dismiss button for incompatible charging
- Update the button string for battery defender tips
- Update settings banner icon for defender
Test: Manual Test
Bug: 315748218
Change-Id: I0cfe03e7984be02eff4fb6dce68cc22fe7edf8e2
2024-02-19 08:06:44 +00:00
mxyyiyi
f33597b41d
Update log metrics in battery usage.
...
- Remove redundant logs
- Update action id
Bug: 323495266
Test: manual
Change-Id: I3146405912f3df152c7a0d525ba06ba76e2e02df
2024-02-18 16:00:43 +08:00
ykhung
15e853a1b9
Add a protection for the null UID corner case
...
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.datasaver
Fix: 324571889
Change-Id: Ia5a63dc360d4b518f2b86315b40bc2db12f007ed
2024-02-15 12:43:17 +00:00
Aditya Choudhary
4f5c1ac5bc
[DON'T BLOCK] Test ownership migration rules
...
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.
For more details please refer to the link below,
go/new-android-ownership-model
Bug: 304529413
Test: N/A
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3f65505208d57fa18be353f815c44fdd6f004f4b )
Merged-In: I7fbd55a92f4302a6e03bcff0283737fd9295165d
Change-Id: I7fbd55a92f4302a6e03bcff0283737fd9295165d
2024-02-09 16:54:41 +00:00
Aditya Choudhary
3f65505208
[DON'T BLOCK] Test ownership migration rules
...
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.
For more details please refer to the link below,
go/new-android-ownership-model
Bug: 304529413
Test: N/A
Change-Id: I7fbd55a92f4302a6e03bcff0283737fd9295165d
2024-02-09 16:14:48 +00:00
Yiling Chuang
cb33907736
Merge "Add a new tip type for wireless charging." into main
2024-02-09 03:44:37 +00:00
Yiling Chuang
f709de6d27
Add a new tip type for wireless charging.
...
Bug: 316239566
Test: rebuild
Change-Id: Ib1a27375896a9ecd64f82f5a3744a0559e7fe2bd
2024-02-07 08:06:28 +00:00
Wesley Wang
ffcce1e7cf
Add AOSP smart battery entries
...
- Revert "Cleanup smart battery entries (1/3)" patch only instead whole topic, updated part of codes to resolve the conflicts
This reverts commit 742e506d13 .
Reason for revert: b/315401539
Bug: 315401539
Change-Id: I75a4e4f75b624c90aae18288c77214c0238e43eb
2024-02-07 07:29:48 +00:00
ykhung
b0fe225a17
Update the battery saver scheduler minimum level
...
Fix: 317069349
Test: make -j64 RunSettingsRoboTests
ROBOTEST_FILTER="com.android.settings.fuelgauge"
Change-Id: I398cd192609914841a55f110290915df8cd0e9eb
2024-02-05 17:58:37 +08:00
pajacechen
d171a8b946
[BatteryTip] Implement new CardPreference to apply new style
...
- Implement a new CardPreference to apply SettingsCard
- Apply CardPreference on battery tips
Bug: 315748218
Test: atest SettingsSpaUnitTests:com.android.settings.widget.CardPreferenceTest
Test: atest SettingsRoboTest:com.android.settings.fuelgauge
Change-Id: I9a57e7739275854278b2c586793af718b0680d23
2024-02-02 22:27:16 +08:00
pajacechen
5dd8460c3e
[BatteryTips] Separate the low battery tips
...
Bug: 315748218
Test: atest SettingsRoboTestStub:com.android.settings.fuelgauge.batterytip.detectors.LowBatteryDetectorTest
Change-Id: Id973be37012da414d6125a4dd29ec4522ab80e95
2024-02-02 22:16:58 +08:00
Pajace Chen
c10be7c186
Merge "Update string for incompatible charging" into main
2024-01-23 14:14:18 +00:00
Pajace Chen
b42074b6ae
Merge "Delete DockDefenderTip and Detector" into main
2024-01-23 11:26:11 +00:00
Treehugger Robot
b35f828bfa
Merge "Try to fix event_id missing by changing battery anomaly tips card metrics log method." into main
2024-01-23 08:02:33 +00:00
pajacechen
98a522c45c
Delete DockDefenderTip and Detector
...
- remove dock defender
- remove unused string
Test: atest SettingsRoboTests
Bug: 315748218
Flag: NA
Change-Id: Ida4bb1d36a653d1787595212aac167d2f4dd3438
2024-01-23 15:26:53 +08:00
Zaiyue Xue
dbe4a08c51
Try to fix event_id missing by changing battery anomaly tips card metrics log method.
...
Bug: 321866714
Fix: 321866714
Test: presubmit
Change-Id: I56073913227af120033bec7f3ef983432459ba9a
2024-01-23 15:01:51 +08:00
mxyyiyi
8dccd6947f
Migrate battery optimization mode app list to SPA.
...
Bug: 284033422
Bug: 304923046
Test: manual
Change-Id: I7549b8a95508500bce098b42da04036869431060
2024-01-23 14:54:20 +08:00
pajacechen
846be63c9c
Update string for incompatible charging
...
Update string and icon for incompatibe charger settings banner tip
Dark theme: https://screenshot.googleplex.com/6fpK5z6PQ6yGnNU.png
Light theme: https://screenshot.googleplex.com/ASWf6CzF2f9Qfg8.png
Figma design: https://screenshot.googleplex.com/7yBoAW7jHxhHsEg.png
Bug: 315748218
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batterytip.tips.IncompatibleChargerTipTest
Change-Id: I10498aaf820ab1c2123d80051f09b2f11560f33a
2024-01-23 01:40:47 +00:00
mxyyiyi
ac1aa99591
Set Switch Preference disabled when app battery optmization mode is immutabled.
...
Bug: 320600016
Test: manual
Change-Id: I7ebd604c64a0618f94c0b5e6fcf398a661657125
2024-01-17 14:32:40 +08:00
YK Hung
a8fa24ccd5
Merge "[Reskin] Update string of incompatible charging on settings" into main
2024-01-16 16:29:10 +00:00