Commit Graph

31 Commits

Author SHA1 Message Date
Wesley Wang
ffcce1e7cf Add AOSP smart battery entries
- Revert "Cleanup smart battery entries (1/3)" patch only instead whole topic, updated part of codes to resolve the conflicts

This reverts commit 742e506d13.

Reason for revert: b/315401539

Bug: 315401539

Change-Id: I75a4e4f75b624c90aae18288c77214c0238e43eb
2024-02-07 07:29:48 +00:00
Jun Lan
358a85ecfe Format battery java test code
context:go/pixel-energizer-java-format

Test: manual
Bug: 304439460
Fix: 304439460
Change-Id: I5be0ee41afb3a7018bc7e25cceccc25669924d6c
2023-11-07 12:27:43 +08:00
mxyyiyi
2c0242bed3 Refactor flags of Power Anomaly Tips in Settings Intelligence.(1/2)
- Remove unused flag is_battery_tips_feedback_enabled
- Update logic about is_battery_tips_enabled

Bug: 284893240
Test: Manual
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:24e269dd0a63b5cb98fec791708cfe294b5aa47c)
Change-Id: I826f517aa61e0c970048164706c4512ac3e0472d
2023-09-05 17:48:18 +00:00
mxyyiyi
14d0a1c102 Improve battery tips cards.
Test: manual
Change-Id: I356648d0fcec5dd1ea724297187ecafb5be55fd8
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:13fec0dbdb2c809f20a1e3b711e2491745f6d506)
Bug: 291689623
2023-08-10 07:44:07 +00:00
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
Wesley Wang
742e506d13 Cleanup smart battery entries (1/3)
- Remove smart battery entry from battery settings page since
   restriction app info already move to app list page and smart battery
   feature will keep as enabled, smart battery page will be empty
 - Enable battery usage list page for AOSP

Bug: 277175992
Test: make SettingsRoboTests
Change-Id: I9221cecbfc8445b8f470975551f600e94e3128d5
2023-04-17 16:50:21 +08:00
Zaiyue Xue
4ecf42f1bb [Battery usage U] [UI] Add a threshold to filter out very small battery usage items in the app list
Bug: 264840285
Fix: 264840285
Test: manual
Change-Id: I36a6c0dc284d09efcf82316db1541d289c37b16f
2023-01-12 15:44:26 +08:00
Zaiyue Xue
7f3ff17bcf Refactor PowerUsageFeatureProvider: Cache the config set to avoid generating the set again.
Bug: 262802531
Test: manual
Change-Id: I61b36e4e057c432d814aa104a37f0e0d552720cb
2023-01-10 19:42:09 +08:00
ykhung
b875752307 Add isBatteryManagerSupported() to control adaptive preferences page
Add isBatteryManagerSupported() in the PowerUsageFeatureProvider to
support controlling the adaptive preferences page dynamically

Bug: 229558366
Test: presubmit
Change-Id: Iffb552feb9e08ca72f2970eb778cd3fcd18f0b7e
2022-12-27 15:31:11 +08:00
Zaiyue Xue
fa90a4b311 [Battery usage U] Create a flag to guard battery usage features
Bug: 261800937
Fix: 261800937
Test: manual
Change-Id: I891c235228c9ca0709471b496e6f75167fd0a126
2022-12-09 15:15:34 +08:00
Zhenwei Chen
8d11d9ceea Add dock defender battery tips
1. Remove the dock defender v1 code
2. Add dock defender battery tips and update
   corresponding list item string

Bug:256523472
Test: Unit test passed and manual test on device
Change-Id: Ib6c09df056744142f42f5e2a13252b58e54c7534
Signed-off-by: Zhenwei Chen <zhenwec@google.com>
2022-11-28 17:45:51 +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
TreeHugger Robot
bf19d369a0 Merge "Update adaptive preference summary" into sc-v2-dev am: 6ff60d7771 am: e6a10f3487
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15981706

Change-Id: If760aaa0006cadb1f5cbb999b977ffe719dfb6d7
2021-10-06 10:19:36 +00:00
Wesley.CW Wang
4137253658 Update adaptive preference summary
Bug: 195627250
Test: make RunSettingsRoboTests
Change-Id: I50ed736bbba7ac8d3d6fcf026e9e17e2116f86a7
2021-10-05 17:52:43 +08:00
Bonian Chen
d7ab87342c [Settings] Ignore failed test case
Ignore failed test case.

Bug: 201021069
Test: build pass
Change-Id: Ie3f127abcad6b7979d358412e1a53520de8028be
2021-09-24 12:46:42 +08:00
Wesley.CW Wang
083ace54d5 Enhance battery settings limit charge tip
- Add dialog for limit charge tips
 - Add action button to make limit charge tips can bypass charge limited
 - Fix layout typo
 Screenshot: https://screenshot.googleplex.com/5ngtD2sJAKSQZD3.png

Bug: 196315151
Bug: 197769934
Test: make SettingsRoboTests
Change-Id: I0901c56ae93691c984376852da78cde9078caaf0
Merged-In: I0901c56ae93691c984376852da78cde9078caaf0
2021-09-09 22:13:33 +08:00
Wesley.CW Wang
0849672890 Enhance battery settings limit charge tip
- Add dialog for limit charge tips
 - Add action button to make limit charge tips can bypass charge limited
 - Fix layout typo
 Screenshot: https://screenshot.googleplex.com/5ngtD2sJAKSQZD3.png

Bug: 196315151
Bug: 197769934
Test: make SettingsRoboTests
Change-Id: I0901c56ae93691c984376852da78cde9078caaf0
2021-09-08 04:31:59 +00:00
Dmitri Plotnikov
ad0bb5b7fe Remove uses of deprecated class BatterySipper
also, remove the obsolete class FakeUid

Test: make RunSettingsRoboTests
Test: make RunSettingsGoogleRoboTests
Change-Id: I2f235a18dcca3b5b3a2839408b76553bbc4f655a
2021-08-27 18:19:36 -07:00
James Lemieux
f1dade40d2 Use binary resource support in robolectric
The resources available to tests are now exactly the merged resources
located in the APK under test.

Bug: 74359828
Test: make -j56 RunSettingsRoboTests
Change-Id: I050db81a92decefea23314b5ec7a62f77ff4bb2b
2018-12-12 19:53:49 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Lei Yu
1254049038 Update method isSmartBatteryEnabled()
Check the config value from framework.

Bug: 79698191
Test: RunSettingsRoboTests
Change-Id: I14424e2a96fb3ef3bb7d0f10218266d53e86370d
2018-05-15 18:24:13 -07:00
jackqdyulei
155c1785e1 Add auto restriction preference
1. Add method in feature provider to check whether smart battery
is supported
2. Hook up above method to controllers
3. Add auto restriction preference
4. Add tests

Bug: 73002171
Test: RunSettingsRoboTests
Change-Id: Ic314f61ad52e9bedb629b308731cb968bb4b1773
Merged-In: Ic314f61ad52e9bedb629b308731cb968bb4b1773
(cherry picked from commit ab0b0add0a)
2018-03-06 21:32:56 +00:00
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
jeffreyhuang
cbfb099a40 Rename SDK_VERSION_O to SDK_VERSION
Test: make RunSettingsRoboTests -j40
Change-Id: I6715062d8addadda441e32809db1af55f15e3a90
2017-12-05 16:43:54 -08:00
jeffreyhuang
a79417487c Move fuelgauge test package to sdk 26
Test: make RunSettingsRoboTests -j40
Change-Id: I8122a41132821a42c4ec8c5995a1a11833b686cd
2017-11-29 10:57:54 -08:00
Andrew Sapperstein
9f1e911759 Refactor test runner to use static list of resource paths
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.

Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
2017-06-09 09:21:26 -07:00
jackqdyulei
1d51b3cc15 Turn on power accounting in AOSP
Bug: 38328724
Test: RunSettingsRoboTests
Change-Id: Ibb2691ffdf8581549a1e99f94a8dbaa849453742
2017-05-23 16:05:12 -07:00
jackqdyulei
c577ef0a75 Hide Wifi and Systemui in settings main page
Also move the systemui to category system

Fix: 36644740
Fix: 36645264
Test: RunSettingsRoboTests

Change-Id: I6b64a7dca58091f3a1d8b7d99c8bae7ddf9169f9
(cherry picked from commit 1e95b74f77)
2017-03-29 20:23:50 +00:00
jackqdyulei
44e8968662 Hide bluetooth and media in battery settings page.
Media is a bundled process which contains the following packages:

com.android.providers.downloads
com.android.mtp
com.android.providers.media
com.android.providers.downloads.ui

This cl moves them to advanced battery page.
1. Bluetooth lives in category bluetooth
2. Media lives in category system

Bug: 35811926
Test: RunSettingsRoboTests
Change-Id: Ie229fa15e2e62b67d571988f7f4e7788a665bcdd
2017-03-01 13:22:12 -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