Commit Graph

18 Commits

Author SHA1 Message Date
mxyyiyi
c4ac74872b Implement the battery tips cards.(1/2)
Bug: 291689623
Test: Manual
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3ff665bd3292986030fdd8a3689b35bbf6f5a615)
Change-Id: I4443cdb21b3ba30900fc2f6fcc21c4c56dc1293f
2023-08-01 10:49:01 +00:00
Zaiyue Xue
e04ffdea58 Fix b/265746746: Announce "Battery usage for [slot_timestamp]" instead of changing focus when Talk Back on.
https://drive.google.com/file/d/173RPKsnIE7ZhBAJLrivqkbiWg9Ay41bC/view?usp=sharing&resourcekey=0-jHJ7vZ9BEhzxdWncqCQVQg

Bug: 265746746
Fix: 265746746
Test: manual
Change-Id: Iad92eff50d73853793daa9d6d3551768678c2eb2
2023-02-06 17:38:29 +08:00
Zaiyue Xue
a52da7b599 Support accessibility for battery usage in U (1)
Fix b/265746746: TalkBack doesn't have any feedback after the actual double-tap of day bar and bi-hourly bar.

When users double clicked a time slot in battery usage chart with TalkBack on, jump the accessibility focus to the app list category title to let users know what happened after click.

screen record: https://drive.google.com/file/d/1ZuKQDBiTA2F8hHZDFvNx5nJEP-rMA0eZ/view?usp=sharing&resourcekey=0-2Q552VNxN4QwI2b5sdnvqg

Bug: 265746746
Fix: 265746746
Test: manual
Change-Id: I5485e714149014a96318fd88e8f8c854dde6cb67
2023-01-17 17:36:19 +08:00
Zaiyue Xue
4221504e43 [Battery usage U] [UI] Update the text in footer
Bug: 265088249
Fix: 265088249
Test: manual
Change-Id: If112f7a0b3509cdf11f1ffcea233ab3ace2bf6d7
2023-01-11 11:10:54 +08:00
Zaiyue Xue
833e47d851 [Battery usage U] [UI] Show total "Screen On Time" in the battery usage page
Screen record: https://drive.google.com/open?id=16ZOp1E2YBzWQXbnXl786FaLFPel-S9CF&authuser=0&resourcekey=0-oRqCrdTc9FZjVgsq9orhEw&usp=drive_link
For Arabic: https://drive.google.com/open?id=1zh_4jcUnqLC6CDgwju1qQkWJ0QCtm19c&authuser=0&resourcekey=0-kuKfDdOTWxqOUmD0RfPNLQ&usp=drive_link

Next step: show screen on time for each app

Bug: 258120710
Test: manual
Change-Id: I2085a2a85ebd50b2ac876972f6a8ebbf6f20246c
2023-01-06 19:09:52 +08:00
Zaiyue Xue
778a4b42e3 Replace battery usage breakdown list from tabs to dropdown list.
screen records:
https://drive.google.com/file/d/15VJGQ_G2KIpyFcvZsyE0iRno0WZhfjGb/view?usp=sharing&resourcekey=0-bg48BsC2b-BT_80CGlzpWg
https://drive.google.com/file/d/1RaoysytQ5oZQu8CNPhYgxqBahk3UfVbr/view?usp=sharing&resourcekey=0-Xk2J36fjYWBo6KpFTrMr4Q

Bug: 264338267
Fix: 264338267
Test: manual
Change-Id: Ic020cce711b5232adfc80272836d7c2d0250d94a
2023-01-04 16:20:47 +08:00
Zaiyue Xue
00fb008e9c Support App and System tabs for battery usage breakdown.
design_doc: go/usage-frontend-dd

screen_record: https://drive.google.com/file/d/1I8dnoMf7y9KUg0eVeqLJpHqGGOtaX6_0/view?usp=share_link&resourcekey=0-Mte0-LKN1LULRssg9t7zGg

Bug b/260786962 is also fixed in this cl.

Bug: 258123381
Bug: 260786962
Fix: 258123381
Fix: 260786962
Test: manual
Change-Id: Ifd337331d02dc10c3234c594b2e142bcd459c00f
2022-12-06 11:23:27 +08:00
xuezaiyue
ac7318419a Move battery usage files to a separate folder.
Bug: 202118250
Test: presubmit
Change-Id: I21aa58ebc02327849ed2161dbbafcdc806c007f2
2022-06-19 05:59:35 +00: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
4645fef6ca Add searchable keywords for new usage and adaptive preferences screen
Bug: 185432878
Bug: 185433678
Bug: 185855057
Test: make SettingsRoboTests
Change-Id: Ibca47e7732f72cba03fbfae10075ac83f1938b43
2021-05-10 15:40:14 +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
1415cbc49a Add footer for battery usage page
Bug: 177406865
Test: make SettingsRoboTests
Test: make SettingsGoogleRoboTests
Change-Id: Ic61c32f22fe962e4afa3db23b867d1acd2702f65
2021-04-20 14:41:12 +00:00
jackqdyulei
319d534975 Create new PowerUsageAdvanced page
This page contains the graph at the top and app list at the bottom

In this cl, we reused some part of the code in PowerUsageAdvancedLegacy
to construct the graph, and also used controller to construct the app
list(So glad that we extracted it to controller before..)

Bug: 73300636
Test: RunSettingsRoboTests
Change-Id: I30afbc0327a5186f8280f5e3678330b363e2dc0d
2018-03-06 10:45:44 -08:00
jackqdyulei
5dd5a0424f Change current PowerUsageAdvanced to legacy code
In future cl, we will create new PowerUsageAdvanced page.

Bug: 73300636
Test: Build
Change-Id: I608f6b1fb9bf29a6ef5d7f9d67bcb6eea9e7aec7
2018-03-06 10:42:53 -08:00
Fan Zhang
74c61d1fef Use res-auto as app xml namespace instead of settings.
This is necessary for SettingsIntelligence to parse settings:keywords
when indexing search stuff.

Bug: 64938328
Test: rerun tests
Change-Id: I0d8885c854852020dfa0b9faa3044d4a1b82f8f2
2017-11-17 16:49:54 -08:00
Fan Zhang
823dde54c7 Misc clean up in search
- Remove updateFromClassNameResource() because it's just a no-op method.
- Simplify SearchIndexResources
- Update some pref pages to have unique keys.

Change-Id: I51e542d9947aafd046861ce7be0b4c7213fcd01d
Fixes: 64951285
Test: UniquePreferenceKeyTest
Test: robotest
Bug: 67852637
2017-10-26 17:54:45 -07: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