Sorin Basca
61e0bcd194
Use Mockito 4.6.1 API
...
Bug: 236636175
Test: m RunSettingsRoboTests
Change-Id: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
(cherry picked from commit c1c3a84fdc
)
Merged-In: I2cfda684059520f6ddd1e72c55f1ab1ec9c99e8b
2022-07-15 20:05:37 +00:00
ykhung
101dc6878a
Fix incorrect usage for the logging method to cause no data in WW
...
Fix incorrect usage for the logging method to cause the schedule type
and percentage data is not logged into the WW, since
MetricsFeatureProvider doesn't support log Pair.of() data into the
WestWorld or Clearcut directly, it is used for EventLogWriter only
Bug: 202906853
Test: make SettingsRoboTests
Change-Id: I9f1d157c77df9bd74f441105318790a2505a9c01
2021-11-10 15:39:30 +08:00
ykhung
27efa546cf
Fix failed tests since presubmit is ignored in ag/15802168
...
Bug: 198553245
Test: make SettingsRoboTests
Change-Id: I91e715a6bfb64419b457812423996365a9464a93
2021-09-12 00:36:43 +08:00
ykhung
b62cdecc67
Move allowed list definition in the battery usage to feature provider
...
Bug: 199367609
Test: make SettingsRoboTests
Change-Id: I321426e6ff1b9586ee493792f1d39aed35ecc34d
Signed-off-by: ykhung <ykhung@google.com >
2021-09-10 01:29:32 +08:00
ykhung
fbbcc55fc0
Add time unit into battery usage chart and refine some UI
...
- add time unit into battery chart for 12/24 hours
- refine the radius size for chart bar
- use fixed font size for timestamp and percentage
screenshots:
24-hour format: https://screenshot.googleplex.com/3VNedE2nAx6LrXu
12-hour format: https://screenshot.googleplex.com/3tpTXjYfrasrenW
fixed-size: https://screenshot.googleplex.com/nPRKm7XCkmFzW6K
Bug: 194836607
Test: make SettingsRoboTests
Change-Id: I5b35b0fa808eb8a5f607962ee973c2896529b078
2021-08-12 03:59:39 +00:00
ykhung
b6d95d1c4f
Remove items from not allowed show summary list (legacy rule)
...
Bug: 191991503
Test: make SettingsRoboTests
Change-Id: Ieadc97eddcbd149e04ec85477859a9b3ffd8f06b
2021-07-09 11:13:26 +08:00
ykhung
2a75186e4b
Resolve locale not update issues in the chart view
...
- read locale from configuration rather than Locale.getDefault
- refine 12-24 format to align the current status bar short style
- resolve locale change not update chart percentage label
- extend timestamp label in the chart graph from 4 to 5 labels
Bug: 190150515
Bug: 190422902
Bug: 190226837
Test: make SettingsRoboTests
Change-Id: I5347964900123a6d112dbc37c2af87eb7d73f1d2
2021-06-09 16:11:15 +08:00
ykhung
6ba22a3b9a
Remove missed added testing locale to cause flaky
...
Bug: 189998237
Test: make SettingsRoboTests
Change-Id: Id36c72ff8eee02c1e64f29a0dbefa0eb9804845a
2021-06-03 14:24:18 +08:00
ykhung
7a6bd1e4a4
Set default locale in the testing environment to avoid flaky test
...
from the error message, looks like some testing environment cannot get the default locale settings to cause it crash. we will et the default locale before testing to avoid such condition.
Bug: 188947451
Test: make SettingsgRoboTests
Change-Id: I6ec9abba41d72c205426df8710eae5b83a841f46
2021-06-01 07:51:15 +00:00
ykhung
46bcdda9b9
Disable app usage item if this item is not clickable
...
some items are not clickable to launch the restriction page in the
battery usage list, we will apply the disabled visual in the
preferrence item to improve the UX (avoid users click the item without
any action)
Bug: 188751551
Bug: 188663505
Test: make SettingsgRoboTests
Change-Id: Ib8925b8e191117543bb1c74d6d01191e3043fc73
2021-05-26 07:27:01 +00:00
ykhung
646c1a2e5a
Add usage percentage and battery level into app relative metric
...
Reference the table from PM requested:
https://docs.google.com/spreadsheets/d/1TC_6MLVMvOS0p1ic0wPfQ-19AOuY8Kc8FUJdqaQSM4I/edit?ts=6098b296#gid=0
Bug: 188505537
Test: make SettingsRoboTests
Change-Id: Ia31ada9438f120fe6f29b59b67dc4de6636c11e1
2021-05-20 20:03:22 +08:00
ykhung
1ea5208fa8
Align system time 12-24 hour format in the time slot information
...
align the time format configuration in the Settings -> System ->
Date/Time to show 12- or 24- hour format in the usage time slot
screenshot: https://screenshot.googleplex.com/3w2SFvBLpC5oHBs
screenshot: https://screenshot.googleplex.com/86uCq6R4PKEg9RD
screenshot: https://screenshot.googleplex.com/3easrEFMQdZEjGP
screenshot: https://screenshot.googleplex.com/7dPWVJNTbSShFPa
Bug: 187783891
Test: make SettingsRoboTests
Change-Id: I9af0a69bd7c67562526bd5ee74a657635068ef44
2021-05-18 13:46:43 +00:00
ykhung
6590b368f2
Add metric for battery defender
...
Bug: 188384887
Test: make SettingsRoboTests
Change-Id: Ida96deb6efe94a98cf6837b9f82758467a4d1300
2021-05-18 05:19:45 +00:00
ykhung
1ec8f04feb
Add battery usage metric
...
Bug: 188046672
Test: make SettingsRoboTests
Change-Id: I1716913eee7c93cafd622052dcbca940c9726a17
2021-05-14 14:18:55 +00:00
ykhung
2102059e2d
Fix GAR issue for battery chart description and the contrast ratio
...
Bug: 187813918
Bug: 187811403
Test: make SettingsRoboTests
Change-Id: I4fae623a305fd1ee022336bcae35d9dd9995146d
2021-05-12 15:38:33 +00:00
ykhung
5a783d0815
Clear static icon and label cache if ui mode is changed
...
we should clear icon cache if theme is changed between light and dark
theme, otherwise we may show incorrect styled icon for applications
Bug: 185187729
Test: make SettingsRoboTests
Change-Id: Ib06abe5a5345b2ea363a04ecaec886a4765fd8ab
2021-05-12 06:53:56 +00:00
ykhung
28605dcf16
Should not show internal package entry in the usage list
...
Bug: 187770266
Test: make SettingsRoboTests
Change-Id: I56897c8f91295ba2139b7fda8c59a863130ecd86
2021-05-12 05:17:22 +00:00
ykhung
9ef9e1ee0c
Keep selected time slot and expand state when device is rotate
...
Bug: 187772493
Test: make SettingsRoboTests
Change-Id: If70abf06825a88f0ad0add37ef8d4f46a0aad1e9
2021-05-12 03:28:59 +00:00
ykhung
f76ba1189a
Adopt new battery history map with interpolation method
...
Bug: 184807417
Test: make SettingsRoboTests
Change-Id: I5c45a443d0a72df352d4bb707412328ad009f6d4
2021-05-07 00:25:33 +08:00
ykhung
5407d1b16d
Refine the app/system section divider content show/hide rule
...
Bug: 177406865
Bug: 185187729
Test: make SettingsRoboTests
Change-Id: I5440a93078417df20ca61687f6c464dbad80a419
2021-04-29 07:42:27 +00:00
ykhung
10000eb254
Draw timestamp information into BatteryChartView manually (2/2)
...
screenshot: https://screenshot.googleplex.com/8zJcMJeMDovfhdD
Bug: 183921876
Test: make SettingsRoboTests
Change-Id: I276f70c3cf8ebd2316f987ace0d6537ed2cf8a45
2021-04-27 16:55:13 +00:00
ykhung
5e578ddd13
Fix incorrect battery history merging logic to cause data losing
...
Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Ic26799f4d95b9f990e873ee26a42d6cc0c404659
2021-04-25 08:35:55 +00:00
ykhung
41fd8a7494
Refresh category title by different time slot condition
...
Bug: 177406865
Bug: 185187729
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Ib124e1cfb9549f838540ff547bc616049f65180d
2021-04-25 07:47:31 +00:00
ykhung
5c23d65901
Avoid add preferenc again if it already in the PreferenceGroup
...
Bug: 177406865
Bug: 185187729
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I69f5033c0a07d846c340b9871e69a2cdbe0bb2aa
2021-04-23 10:35:05 +08:00
ykhung
e1cec0e08d
Implement expandable item for system component usage data
...
Bug: 177406865
Bug: 185187729
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Id488ab23039ff12480da5e02b6a96ff70e879007
2021-04-22 06:50:39 +00:00
ykhung
70bef1049f
Add data validator to verify and log abnormal queried history data
...
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I331922cf0b0e946066a72eb0bfcf9885dde9a7ce
2021-04-21 02:52:20 +00:00
ykhung
7cc616e90f
Add battery usage time summary to usage list item
...
Insert app foregound and background usage time information into the
preference item summary based on the different scenarios.
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I13ba357666adfb7b57f52ffae18d09aed8dd0773
2021-04-20 14:35:27 +00:00
ykhung
4752ea17b9
Refine startBatteryDetailPage method to support history data
...
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Iee3b6b353c4f92bdad37fac55adad58b4f205bf6
2021-04-19 14:06:55 +00:00
ykhung
bcf0a411a1
Add app usage preferencee item into the history preference
...
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I7d9a14eca0b8d3b054e040cb13135ef15390e512
2021-04-19 04:45:11 +00:00
ykhung
ab5e180139
Refine logic and add simple test for BatteryChartPreferenceController
...
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Ie218cf967c6f30c6eadcdfe6bfd3f37ccdc2276e
2021-04-16 07:02:04 +00:00