ykhung
2401ec4235
Hide Camera background running time in the battery usage screen
...
hide camera background running time in the battery usage screen to avoid
users confuse about it, since it will standby in the backgound to sspeed
up launching time, not always running in the background
Bug: 196744910
Test: make SettingsRoboTests
Change-Id: Ia391d661bca44435fc5a68b1c86e5ca32dd0fcfe
2021-08-31 07:01:01 +00: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
13bcdba67a
Remove some debugging log to avoid print too much data out
...
Fixes: 194251993
Fixes: 194021631
Test: make SettingsRoboTests
Change-Id: Ibd1c7ce9d664820b2975039582a1ea5fb18b0be1
2021-07-23 02:52:14 +00: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
0caec37161
Resolve localization issue and refine UI for chart view
...
Bug: 189293866
Bug: 189407613
Bug: 189413817
Test: make SettingsgRoboTests
Change-Id: If38d133d88bb940c248ef1887548112ff576e0c4
2021-05-28 22:07:01 +08: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
f49eaf54e6
Fix legacy failed unit test for BatteryInfoLoader
...
fix the legacy failed test since the scale is different, setting the
testing value in ms scale (getBatteryTimeRemainingMs()), but getting
the data in us scale (info.remainingTimeUs)
Bug: 188244142
Test: make SettingsRoboTests
Change-Id: Ib389976985eb3741cc96e0ee4a3a000c7f690b37
2021-05-17 06:19:09 +00:00
ykhung
d8d5335096
Build a bridge to control whether the graph is clickable or not
...
Create a bridge to read phenotype flag from GoogleSettings to control
whether each time slot in the graph is clickable or not.
Bug: 185308803
Test: make SettingsRoboTests
Change-Id: If8b58dcaa50ad5fb6b447ca5b7146639ee31a9df
2021-05-09 04:46:41 +00:00
ykhung
5b27fd923a
Fix UI flashes issue when entering to the app in the cold start
...
1. fix the chart % info will flash issue by deferring the showing time
until the chart content is ready to show (set default as invisible)
2. fix the category title will flash issue by set the default value as
empty to avoid refresh the title twice in the start time
Bug: 177406865
Test: make SettingsRoboTests
Change-Id: If8f247cf5b01c529bc5e4d18fcf409ba296cc2f4
2021-05-09 01:56:09 +00: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
973212adf7
Rename variables and refine the format style from ag/14346184
...
Bug: 14346184
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Ie87f2dba2b87781ed5071adbc6f8a2aa45d1fd53
2021-05-04 11:59:07 +08:00
Dmitri Plotnikov
6417493b29
Replace uses of SystemBatteryConsumer with aggregate BatteryConsumers
...
Bug: 186006876
Test: make RunSettingsRoboTests
Test: make RunSettingsGoogleRoboTests
Change-Id: I2e240aa15c87b4b9dcbe993b4b0b1111285ec3ff
2021-05-03 11:01:36 -07:00
ykhung
0c7e50cb43
Add new field for data interpolation usage
...
reference the decription in cl/371645876
Bug: 184807417
Test: make SettingsRoboTests
Change-Id: I944399dc205cad9b96fe22e82e4c651b4ccc4e37
2021-05-03 18:31:27 +08: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
ef6cea8c84
Add test cases for utcToLocalTime in the ConvertUtils
...
Bug: 177406865
Bug: 185187729
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I22bda2db821e69c40202db692ada52e96af25e16
2021-04-24 13:41:45 +08: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
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
db88c994b4
Load application icon and label from package manager if available
...
Bug: 185187669
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Id612f0f1db51d538abb41fc711b9350d9a147cb8
2021-04-13 23:12:12 +08:00
ykhung
0d54b75b2c
Inserts last 24 hour agrregate data into indexed usage map
...
Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I7771a43baf74b36a816883dd6b6a91128f827cf4
2021-04-13 11:59:28 +08:00
ykhung
aeb5b95705
Add a method to calculate battery usage diff results from history
...
Bug: 184807417
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: If613c5cfd7e00e1883107385d3d8552774378cd7
2021-04-13 00:25:17 +08: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
b350c66d97
Move the battery components from SettingsGoogle to Settings
...
Bug: 183921876
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: I47cbba1cbfd6cb17745e7aaaf56b22e3c9dcd30e
2021-04-07 12:09:54 +08:00