Commit Graph

21 Commits

Author SHA1 Message Date
Antony Sargent
e28dfea13b Set advanced battery usage items as non-selectable
The items in the ListView for the Advanced battery usage screen should
not ripple when touched, since these items don't do anything.

Bug: 38019330
Test: make RunSettingsRoboTests
Change-Id: I987a770f0f146b02bbf947238be7490e8a170feb
2017-06-06 17:12:17 -07:00
TreeHugger Robot
3a1d6db0e7 Merge "Update "Phone idle" subtext" into oc-dev 2017-05-04 01:11:24 +00:00
jackqdyulei
995ca362c9 Update "Phone idle" subtext
Bug: 37897135
Test: RunSettingsRoboTests
Change-Id: I38a63ef9fdf574ba277ed889e7e070c36ae14b01
2017-05-03 15:27:50 -07:00
TreeHugger Robot
4b50e58a1d Merge "Hide subtitle for wifi and bluetooth" into oc-dev 2017-05-03 02:18:53 +00:00
jackqdyulei
f68fbce16e Hide subtitle for wifi and bluetooth
Hide it for now because the usage time is not accurate. We may
revisit it in the future.

Bug: 37912143
Test: RunSettingsRoboTests
Change-Id: I37b9dca6a188f2973a7a83641d12b24001d629ae
2017-05-02 15:16:19 -07:00
jackqdyulei
a245188a65 Distribute the misc among all the apps
Distribute it in:
1. Battery main page(PowerUsageSummary)
2. Advanced battery page(PowerUsageAdvanced)

Bug: 37487061
Test: RunSettingsRoboTests
Change-Id: Id1810b81a6b380d908bcdc18421530e938578c37
2017-04-25 11:48:24 -07:00
jackqdyulei
f4c1cef322 Add TtsSpan for formatted time.
Talk back will read "Used for 3m" as "Used for 3 meters", but
it will read "Used for 3h 3m" correctly.

This cl add specific Ttsspan if the time only contains "minute"

Bug: 36379530
Test: Run SettingsRoboTests

Change-Id: I033575938cce24221980dddd9d66be4e18804541
2017-04-21 14:42:42 -07:00
TreeHugger Robot
72ca5b0bb2 Merge "Include type service as type system" into oc-dev 2017-04-21 01:45:28 +00:00
TreeHugger Robot
55a3944dbf Merge "Hide User category if only one user in device" into oc-dev 2017-04-18 03:21:55 +00:00
jackqdyulei
47006d7794 Include type service as type system
Bug: 37293081
Test: RunSettingsRoboTests
Change-Id: Id9259a1a516fdf368d41f1b7205a1515d0989aab
2017-04-17 18:05:05 -07:00
jackqdyulei
cdba2e7266 Hide User category if only one user in device
Fix: 37293124
Test: RunSettingsRoboTests
Change-Id: If50548396614672b05811d37a719f8f08df3165d
2017-04-17 17:58:38 -07:00
jackqdyulei
8648873e91 Don't show Screen as Apps in advanced battery page
Bug: 37293020
Test: RunSettngsRoboTests
Change-Id: I9a6259e1eb3a2d3451b0479bfe20be735825cd64
2017-04-17 12:12:30 -07:00
jackqdyulei
92fceaff22 Hide summary for Cell in PowerUsageAdvanced
1. Add method "shouldHideSummary" to check it
2. Also change method "shouldHide" to "shouldHideCategory",
to distinguish it from shouldHideSummary

Fix: 37293815
Test: RunSettingsRoboTests
Change-Id: I4364d0331f3aac143fad9ebdeab52207f5cb98bf
2017-04-13 16:00:04 -07:00
jackqdyulei
ab5ca9f5cd Remove misc data in battery main page.
The removed types are:
1. DrainType.UNACCOUNTED
2. DrainType.OVERCOUNTED

This cl removes the above types in PowerUsageSummary and
PowerUsageAdvanced

Bug: 36874846
Test: RunSettingsRoboTests
Change-Id: I1807c44a2c0a9c2fa124cdef962a6411ae6830ca
2017-04-06 15:09:57 -07:00
jackqdyulei
f094b87661 Add summary for categories in battery advanced page
If the category only contains one app, show usage time, otherwise
show app with maximum usage.

Also add usage time for apps in battery settings page.

Bug: 35396770
Test: RunSettingsRoboTests
Change-Id: I43fe9c2289535be2c1b95ffded6b52b0ff099589
(cherry picked from commit 3bbaca9c7c)
2017-03-29 20:23:22 +00:00
jackqdyulei
da8d9fc3d0 Make percentage add up to dischargeAmount.
Refine it in PowerUsageAdvanced.

Bug: 35960502
Test: RunSettingsRoboTests
Change-Id: I46b06409102334e5e9eed4e540a27315a503f8b0
2017-03-21 15:18:44 -07:00
jackqdyulei
64af489a6a Add type UNACCOUNTED("miscellaneous") in advanced battery page
This type is equal to DrainType.UNACCOUNTED.

Bug: 35926913
Test: RunSettingsRoboTests
Change-Id: I2be73a5220c6d674593508f2578e7c4f6e111ea9
2017-03-02 15:20:37 -08:00
jackqdyulei
238c1c000b Add batterysipper type check in PowerUsageFeatureProvider
This cl adds isTypeSystem to PowerUsageFeatureProvider and
changes isTypeService. After this cl, the following items will
be moved to advanced battery page:
1. Calendar Storage(Move to System)
2. MediaServer(Move to System)

Create this check in FeatureProvider to make sure this check
is flexible in different cases. Also refactor the PowerUsageSummary
to use same test fragment

Bug: 35629871
Bug: 35628690
Bug: 35317876
Test: RunSettingsRoboTest
Change-Id: I8c083cb2557a7e900aea01e682c13a000bacb7a9
2017-02-27 19:42:22 -08:00
jackqdyulei
acc195fdde Add type service in settings advanced page.
Currently it only includes the gms service

Bug: 35317876
Test: RunSettingsRoboTests
Change-Id: I20a2a9d320efe4aed036552d450f59c89e81584a
2017-02-17 15:17:31 -08:00
jackqdyulei
22dbc106e7 Make the list in advanced battery page sorted by usage.
1. Make the preference dynamically generated in code
2. Make PowerUsageData comparable and add title resource id.

Bug: 34385770
Test: RunSettingsRoboTests
Change-Id: I1b90b4c6cc7107bc146e3554db04cec7641e1cde
2017-02-16 16:22:16 -08:00
jackqdyulei
a224b010b9 Create Advanced battery page
The advanced page shows two major parts, one is the battery usage
graph and the other is battery usage list. In usage list, each item
shows basic info of battery usage of one type(e.g. Apps, System)

Bug: 34385770
Test: RunSettingsRoboTests

Change-Id: I22475a489285787afa775af8d5ae3340eff1eed9
2017-02-06 13:44:59 -08:00