Commit Graph

14 Commits

Author SHA1 Message Date
Wesley.CW Wang
5c8caa3154 Reset smart battery page switch component
- Reset the switch to default design

Bug: 178199757
Test: make RunSettingsRoboTests -j40
Change-Id: I698493a946d7c8daaac73bfd3aaab807244997b0
2021-03-29 10:55:50 +00:00
Stanley Wang
10b7a7d483 Use MainSwitchPreference to replace the button style switches.
Fix: 177967926
Fix: 177968295
Fix: 177967925
Fix: 177968078

Test: Run robotest and apply the widget in Settings and see the ui
Change-Id: Ie854de96e5495fa564fb8a097ed4547bbd2b10c5
2021-02-02 08:39:37 +00:00
Yi-Ling Chuang
430c16c012 Make some existing slices public.
Only PreferenceControllers with isPublicSlice() set to true are exposed
to other apps. Others will be Settings only.

Bug: 141088937
Test: robotests
Change-Id: I5934e89bc1b268fdd44acd630621fa46987728ff
2019-11-28 14:32:15 +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
Matthew Fritze
0cb62643d6 Add remaining whitelisted controllers
Because I missed them in the long whitelist the first time...

Bug: 79779103
Test: robotests
Change-Id: I01c8c80fe306667c1d3ac007b16fad546c5a5f40
2018-05-24 10:27:29 -07:00
Matthew Fritze
f87a1f3f41 Establish permanently unavailable settings
Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.

The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.

Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.

Bug: 78910582
Bug: 79245656
Test: robotests
Change-Id: I58821a6cfd6134b3b351657b6edf5f74ead00643
2018-05-09 08:36:59 -07:00
Lei Yu
aff80459f2 Merge "Hook up Adaptive Battery to new flag." into pi-dev am: d2e9b56996
am: 59ba07c2da

Change-Id: I875f0264133f8358b4f85ccba18b672c0a05015f
2018-04-26 15:39:01 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Lei Yu
df5beee68b Hook up Adaptive Battery to new flag.
APP_STANDBY_ENABLED is controlled by server side to do experiment.
Before this CL, Adaptive Battery is hooked up to this flag, so
even though if user turns it off, it may be turned on by server.

Add a high level ADAPTIVE_BATTERY_MANAGEMENT_ENABLED to control
the feature in settings UI side.

Bug: 78153913
Test: RunSettingsRoboTests
Change-Id: I1a18d622ddc31ec4d45db918bf981516fbb926c1
2018-04-19 10:46:37 -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
jackqdyulei
ab0b0add0a 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
2018-03-06 10:31:37 -08:00
jackqdyulei
713fa6bee0 Hook up smart battery to Settings value.
Bug: 71502850
Test: RunSettingsRoboTests
Change-Id: Icbc99af8f681e67af54e3509b3eec40ac9d9668e
2018-01-09 13:15:03 -08:00
jackqdyulei
131d3b3c2f Add smart battery page for battery settings
This page contains prefs for smart battery and app restriction.

Bug: 71502850
Test: RunSettingsRoboTests

Change-Id: I194af30cbc7b2496b10098fcb67f1116e0722310
2018-01-09 12:05:36 -08:00