Wesley Wang
a967b88ee4
Merge "Add new battery entry into AppInfo page launch variable" into sc-dev
2021-05-26 06:59:13 +00:00
Wesley.CW Wang
92feb9e8fc
Add new battery entry into AppInfo page launch variable
...
- Insert uid as launch variable
- Add new launch type into AppInfo page
Bug: 178197718
Test: make RunSettingsRoboTests
Change-Id: I8c68bebd02491dbbc1516bbebc14254ed06940f6
2021-05-25 23:13:03 +08:00
ykhung
3ad391b0de
Move load battery consumer icon and label into the background
...
move high latency icon and label loading into the background thread to
improve the performance and first frame response time, which is also the
pre-work for checking whether a item is tappable or not feature (will
work this on the next patch)
Bug: 188751551
Test: make SettingsgRoboTests
Change-Id: I4e5712e995fce055d2735135c28be60fb70e5796
2021-05-24 13:57:14 +08:00
ykhung
e030d8613a
Fix footer preference may flash one time when entering
...
new solution > We will not show the footer preference in the beginning when users entering the app, it will wait until the data is loaded to show the footer and app item in the same time. We also enhance the footer message as "Battery usage data will be available after you use your phone for a few hours" when there are not content in the begining.
Bug: 187766862
Bug: 188871770
Test: make SettingsRoboTests
Change-Id: I8d19173b4402722797b1ae3c4cfe6dcdf2d3fe3f
2021-05-21 09:50:43 +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
e8d1374ea2
Export a method for app info page to get last 24 battery history data
...
Bug: 188123855
Test: make SettingsRoboTests
Change-Id: I1953461c47a33c5951b94726e6eade21033a1403
2021-05-14 08:36:52 +00:00
ykhung
637d34ed71
Wrap generating battery history keys into another method
...
Bug: 188123855
Test: make SettingsRoboTests
Change-Id: I82a48e66ec4f7b4c0d9a6756799aa8d7a3a96848
2021-05-14 07:21:09 +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
bf5dd80d4f
Fix corner case IndexOutOfBound exception for null content
...
Bug: 184807417
Test: make SettingsRoboTests
Change-Id: Icf35b4084bcea62c2879a100d1b35b5448d8276d
2021-05-08 01:15:21 +08:00
ykhung
4280a7f897
Refine the interpolation rule and clip the usage time data
...
Bug: 184807417
Test: make SettingsRoboTests
Change-Id: I6c115beed34abd393e5c615cc59d3c4c323dfa0b
2021-05-07 16:36:56 +08: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
75c5fc5906
Wrap and carry clicked slot information data for restriction page
...
Refresh category title by different time slot condition
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I006f6825fdb471f863c0355c65bfc4ca9d980191
2021-04-25 11:05:03 +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
3cdf60c016
Purge low percentage BatteryDiffEntry from indexed usage map
...
Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I943e224147ccbfa80578511d6cb0d6adf6f8da0f
2021-04-17 10:22: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
ykhung
bdaee1431f
Send fake data if there is no battey consumption entry list
...
Sends fake data into SettingsIntelligence if there is no data in the
battery consumption list, otherwise we don't have battery level data to
draw into the chart graph. We should draw the battery levels if it is
full-charged without any BatteryEntry data.
Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I759e769256f4aa0ec152afff5c265ee3d04c03da
2021-04-11 22:54:27 +08:00
ykhung
740ac9a047
Display the chart levels data into BatteryHistoryPreference
...
Bug: 184807417
Bug: 180607918
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I78718a59671ca6775abc725432fbfbec6c0993fe
2021-04-10 10:48:09 +00:00
ykhung
cdd73e7fec
Add kill-switch to distinguish chart or non-chart design
...
Bug: 184807417
Bug: 180607918
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Iacbb012209d552b58b774f90f5b0aeb60ce6d33d
2021-04-09 07:21:06 +00:00