Sunny Shao
c725c5ba5a
Split ChangeReason and decouple it from Observer
...
Observer is flexible to be used for other scenarios.
Bug: 325144964
Test: atest SettingsLibDataStoreTest
Test: atest com.android.settings.fuelgauge
Change-Id: I50c0c6267b29460efa3861e609d64a4d92db7b89
2024-05-29 11:39:23 +08:00
Jacky Wang
164dcd0166
Use different TAG name for logging in BatterySettingsStorage
...
Change-Id: I75b0ca751c76ddf29cb583e101eac69a62570233
Bug: 325144964
2024-05-27 07:23:19 +00:00
YK Hung
2d8ea72cec
Merge "Revert^2 "Add a11y focus on battery chart a11y node."" into main
2024-05-24 04:15:05 +00:00
Amith Yamasani
5953a3386c
Merge "Add a source parameter for resrictions logging" into main
2024-05-23 18:54:49 +00:00
YK Hung
faeb033afc
Revert^2 "Add a11y focus on battery chart a11y node."
...
This reverts commit 25ef484675 .
Reason for revert: I don't think the UI update will impact the codec test in b/342336993, which should be the false alarm. The codec test even not relative to the accessibility function.
Change-Id: I4c2e00667f229d8df8664e8cef5bee06f4468fdc
2024-05-23 14:35:06 +00:00
ELIYAZ MOMIN
0105630119
Merge "Revert "Add a11y focus on battery chart a11y node."" into main
2024-05-23 14:08:29 +00:00
ELIYAZ MOMIN
25ef484675
Revert "Add a11y focus on battery chart a11y node."
...
This reverts commit 1d134d6665 .
Reason for revert: <Potential culprit for b/342336993 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.>
Change-Id: Ifa208bbc77fc4f49b6465fd68d9a18e31d1d3254
2024-05-23 13:04:08 +00:00
YK Hung
ef0130c12d
Merge "Add a11y focus on battery chart a11y node." into main
2024-05-23 06:46:25 +00:00
mxyyiyi
1d134d6665
Add a11y focus on battery chart a11y node.
...
- Let Talkback annouce the a11y action `Double-tap to ativate`.
Bug: 317001884
Test: Talkback
Change-Id: Ic383c9639950eb6a69ed7b3e1537a5d95d18ea08
2024-05-23 13:15:37 +08:00
Amith Yamasani
8b37c093b7
Add a source parameter for resrictions logging
...
Modify existing callers to use the new parameter
Bug: 341112680
Test: statsd_testdrive 866
Manually change battery restriction level for an app
Flag: android.app.app_restrictions_api
Change-Id: I66f23341b90f96eb3091b94ab6db512570988643
2024-05-22 16:15:29 +00:00
mxyyiyi
431c14fa18
Update view alpha to improve text color constract in Battery usage
...
- For light themes, first set the text color of title/summary/widget_summary to be consistent, then apply alpha = 0.65
[Before] https://screenshot.googleplex.com/4nVMMFBK7odhQju
A11y Scanner result: https://screenshot.googleplex.com/4nVMMFBK7odhQju
[After] https://screenshot.googleplex.com/B4r79v89HnWr4tw
A11y Scanner result: https://screenshot.googleplex.com/3zQfRMe4HToc8Xm
Dark mode:
[before] https://screenshot.googleplex.com/BfLxR6tqQRgP4mQ
[after] https://screenshot.googleplex.com/8KeG62i7R5hW8Ks
Bug: 317139415
Bug: 265364351
Test: Accessibility Scanner
Change-Id: I65a71525bbce41c37ee364f3f73c0d2d1d9ace38
2024-05-21 11:52:49 +08:00
mxyyiyi
0903173391
Update view alpha to improve text color constract in Battery usage
...
- Update alpha of dark theme from 0.5 to 0.65
[Before] https://screenshot.googleplex.com/3UZicUb7iQa7ovh
A11y Scanner result: https://screenshot.googleplex.com/36wWZDoyJwRy4AK
[After] https://screenshot.googleplex.com/6LRyQMhw2xX6RKk
A11y Scanner result: https://screenshot.googleplex.com/4tWu4RW7VPdJUCP
Bug: 317139415
Bug: 265364351
Test: Accessibility Scanner
Change-Id: I5c1c5c321301da7b148b911a9687a258cc15c87d
2024-05-17 15:24:40 +08:00
Xinyi Mao
31c58bc6db
Merge "Disable Touch & Hold action of the spinner in battery usage page." into main
2024-05-16 06:01:45 +00:00
mxyyiyi
81c42fa72d
Disable Touch & Hold action of the spinner in battery usage page.
...
Bug: 317149732
Test: Manual
Change-Id: I852ec6ecbf2063d95b511e4f0f52ce591d05fda6
2024-05-16 12:14:55 +08:00
Treehugger Robot
302bd5750a
Merge "Update battery settings page loading text" into 24D1-dev am: 47ce042cf3
...
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/27358859
Change-Id: I3d4acd7fcf4fc9bbe2066fd3e2d0880565aa1cfc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com >
2024-05-15 15:22:28 +00:00
Wesley Wang
3ceffc39f9
Update battery settings page loading text
...
- Update the loading text into empty space text to prevent layout flaky before info loaded
Bug: N/A
Test: atest SettingsRoboTests
Change-Id: I272405f5045a682533a4e9405a9fd91f6c507f7e
2024-05-15 10:53:52 +00:00
Treehugger Robot
a71f46ecc6
Merge "Update the flow of charging optimization strings." into main
2024-05-15 09:10:39 +00:00
Yiling Chuang
8bcaab7cc8
Update the flow of charging optimization strings.
...
Bug: 329020954
Test: atest SettingsRoboTests
Change-Id: I73738602036d79568fe4739a63534af1c64bd9d1
2024-05-15 07:47:10 +00:00
mxyyiyi
ee501485b8
Schedule periodic job in next full-hour timestamp under local timezone.
...
Bug:315228870
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage.PeriodicJobManagerTest
Change-Id: I1d2b298ea53c1018b5f94b5ba00692055374eef2
2024-05-11 17:36:32 +08:00
mxyyiyi
d3ce90347b
Update database clear & job refresh mechanism for time zone change intent
...
- 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
2024-05-10 11:22:58 +08:00
mxyyiyi
798340fafd
Update database clear & job refresh mechanism for time change intent
...
- 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
2024-05-10 11:22:47 +08:00
mxyyiyi
658bc03d4f
Update time format for the first timestamp on usage chartview.
...
- If usage data start from the time-change event rather than full-charged event
[Before] https://screenshot.googleplex.com/BokAvKHXmt2Mmwn
[After] https://screenshot.googleplex.com/8thpgVrVt8kqo37
Bug: 336423923
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Change-Id: I66f8b384938f55852e28bd9f50d1a99c7fc9e41b
2024-05-10 10:51:21 +08:00
Yiling Chuang
7b77729db6
Update strings for charging optimization mode.
...
Update the battery settings summary and the charging string on the Battery settings page if charging optimization mode is applied.
Bug: 329020954
Test: atest SettingsRoboTests
Change-Id: Ie906a010d70bcef7fafe235f0287b289ea934705
2024-05-07 06:34:24 +00:00
Yiling Chuang
11e810e7a7
Provide different ways to detect battery defender.
...
Bug: 335567248
Test: robotests
Change-Id: Ie1d3d7da99fa698468ffd124410cfd3b56bc0c34
2024-04-26 03:10:51 +00:00
mxyyiyi
740f348265
Remove redundant battery usage slot in database.
...
Bug: 336423923
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Change-Id: I1b2d172a42a20a8cc8dc734498e37ed92e4624dd
2024-04-23 18:59:24 +08:00
Yiling Chuang
1aa4bcf17d
Clean up on the charging remaining time label for WLC.
...
Bug: 336204618
Test: robotests
Change-Id: Ic2c9d653f8bd9ec25383319766256162d81424c2
2024-04-23 03:36:06 +00:00
Yiling Chuang
ce51f659df
Merge "Customize the remaining time label during wireless charging." into main
2024-04-23 02:40:06 +00:00
Yiling Chuang
901a46c93e
Customize the remaining time label during wireless charging.
...
Bug: 336204618
Test: robotests
Change-Id: Ic7025f219ee09fba0922ac183daa891e7b63b673
2024-04-22 10:14:13 +00:00
YK Hung
491cb8fbe1
Merge "Add content description string for '<1%'." into main
2024-04-19 12:04:41 +00:00
YK Hung
e57842bd40
Merge "Help talkback to read the hyphen of time frame '{day}{time}-{time}'" into main
2024-04-19 11:57:55 +00:00
mxyyiyi
6853021975
Add content description string for '<1%'.
...
Bug: 322855583
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Change-Id: I704a591ab4cba21644e86457c2dd1000ceecc291
2024-04-19 12:21:55 +08:00
mxyyiyi
3950632041
Help talkback to read the hyphen of time frame '{day}{time}-{time}'
...
Talkback Hover: https://screenshot.googleplex.com/6Z5KMhXRPRWrqh9
Talkback Click: https://screenshot.googleplex.com/5iYVWXE95rgH98D
Bug: 322855775
Test: atest SettingsRoboTests:com.android.settings.fuelgauge.batteryusage
Change-Id: I54b78e9e29c67d514c0346ddae8331450bf53f01
2024-04-19 12:18:57 +08:00
mxyyiyi
08d4b7a2ae
Log optimization mode for app usage in BatteryUsageSlot.
...
Bug: 335374932
Test: atest ConvertUtilsTest
Change-Id: Icf86b9bee58b3b70d99e166d9fce0dfd7e30dea3
2024-04-19 10:58:15 +08:00
Amith Yamasani
83da3f0041
Merge "Call noteAppRestrictionChanged when toggling restrictions/exemptions" into main
2024-04-18 01:47:35 +00:00
Amith Yamasani
7676217e4d
Call noteAppRestrictionChanged when toggling restrictions/exemptions
...
This is to log the reasons for restriction level change and force stop
Bug: 333882527
Test: statsd_testdrive 863
Toggle battery restrictions manually for an app and verify logging
of reason
atest BatteryOptimizeUtilsTest
Change-Id: Ifcc99efc1b6acc5a992f7d952967210b07319f2e
2024-04-16 21:58:40 -07:00
YK Hung
84050edcdd
Merge "Update wireless charging string" into main
2024-04-17 04:47:38 +00:00
Yiling Chuang
37a35d5833
Update wireless charging string
...
Add a capability to provide different strings during wireless charging.
Bug: 316239566
Test: robotests
Change-Id: Ic7c70ae33ae951dfe931995e5ab0d478222d57c9
2024-04-17 03:22:38 +00:00
Pajace Chen
30a03c4ee8
Merge "Fix "Free up space" not clickable issue" into main
2024-04-15 13:15:16 +00:00
pajacechen
e5d99fa93d
Fix "Free up space" not clickable issue
...
- Adding CardPreference.java back for "Free up space" item
- Rename CardPreference.kt to TipCardPreference.kt
Bug: 333016642
Test: http://ab/I85800010265092964
Change-Id: I36062703b7ab5c21083459616234e3a86500719b
2024-04-15 19:45:17 +08:00
Zaiyue Xue
1ee693f0ed
Support tips card directly changing settings [step-5]
...
Support clicking tips card directly changing settings.
Bug: 333989261
Test: manual
Change-Id: Idc485ee7430edff7f6d7265caf8d9d5cf97548b6
2024-04-15 17:39:43 +08:00
Zaiyue Xue
cf292a025d
Support tips card directly changing settings [step-4]
...
Add the settings name and settings value to gerrit proto.
Bug: 333989261
Test: presubmit
Change-Id: I169b615bb8a637614dd5b5c3eed52b4862d2e13f
2024-04-15 12:59:42 +08:00
Pajace Chen
d9b44a8b9c
Add charging string V2 for settings
...
Apply charging string V2 for settings
Bug: 328546483
Test: Manual test
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6f3c97f60a966a8ec357ba4d15b19d9d7a04b34d )
Merged-In: Ic68bf4231da81d865faa285bca97a929abe26a42
Change-Id: Ic68bf4231da81d865faa285bca97a929abe26a42
2024-04-12 06:23:55 +00:00
Treehugger Robot
4812ce3732
Merge "Don't log anomaly event_id because it is not a repeated string." into main
2024-04-11 12:06:08 +00:00
Pajace Chen
c55cd9526e
Merge "Add charging string V2 for settings" into main
2024-04-11 10:38:40 +00:00
Zaiyue Xue
71adec6dd5
Don't log anomaly event_id because it is not a repeated string.
...
Bug: 316075226
Test: presubmit
Change-Id: Id0b598b5cbdee15ae11ecf3d8d0dc7b7c67e9f3f
2024-04-11 17:50:54 +08:00
mxyyiyi
749a642be6
Update the usage slot info in database
...
- 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
2024-04-11 16:54:36 +08:00
Pajace Chen
6f3c97f60a
Add charging string V2 for settings
...
Apply charging string V2 for settings
Bug: 328546483
Test: Manual test
Change-Id: Ic68bf4231da81d865faa285bca97a929abe26a42
2024-04-10 18:58:37 +08:00
Zaiyue Xue
6bd25dd1e7
Always load database app usage even recalculating all.
...
Bug: 333387497
Fix: 333387497
Test: manual
Change-Id: I5f21a25076a829f32caa83fadc7cb20f56ed0713
2024-04-10 18:09:16 +08:00
mxyyiyi
4fcab412db
Skip recalculate all data in Periodic Job while multi-users.
...
Bug: 333664242
Test: manual
Change-Id: I7e6ee85121fbafc5fc3426046bd26b4f91e6e48a
2024-04-10 16:13:16 +08:00
mxyyiyi
52672ca34b
Fix summary for system components which 30 sec <= usage time < 1 min.
...
- formatElapsedTimeWithoutComma(withSecords = false,) will round up minutes by adding 30 seconds.
https://screenshot.googleplex.com/8HrDpLi8FX8tjJy
Bug: 321265878
Test: Manual
Change-Id: I779bd7c33bbb3aefa0a88f6ba42d047259bc50cc
2024-04-02 17:00:51 +08:00