Commit Graph

15 Commits

Author SHA1 Message Date
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