Commit Graph

15 Commits

Author SHA1 Message Date
Jason Chiu
2989c50a23 Add highlight menu keys for all toggle pref controllers and custom slices
Bug: 204695404
Test: manual, robotest build pass, unit
Change-Id: Iad2e28ada8ddb766ffa7eff2c8dc581250cbd6f8
2021-11-01 15:00:18 +08:00
Edgar Wang
cdff5c6ceb Revert "Apply SettingsLib SeekBarPreference to Settings"
Revert submission 13422386-seekbar-sc-dev

Reason for revert: build broken in SettingsGoogle
Reverted Changes:
I0c2d0d5fb:Apply SettingsLib SeekBarPreference to SettingsGoo...
I1844bb3b0:Apply SettingsLib SeekBarPreference to a11y vibrat...
Ia3e4adec8:Apply SettingsLib SeekBarPreference to a11y vibrat...
Iadee57e9d:Apply SettingsLib SeekBarPreference to a11y vibrat...
I219878716:Apply SettingsLib SeekBarPreference to Settings
I959f5672c:Create SettingsLibSeekBarPreference
I92545a69c:Apply SettingsLib SeekBarPreference to a11y vibrat...

Change-Id: Ie6c3b0dc072e044796abdb33fca305f9f9d47c4d
Bug: 176818438
2021-06-08 09:47:51 +00:00
Edgar Wang
d6b5bbb5cb Apply SettingsLib SeekBarPreference to Settings
Bug: 176818438
Test: robotest

Change-Id: I219878716457ce4bb7cad251bccf5d50d93030a5
2021-06-07 18:09:19 +00:00
John Li
db2d3347d7 Add haptic feedback for the seekbar in Settings.
- set HAPTIC_FEEDBACK_MODE_ON_TICKS for Gesture Navigation.
- set HAPTIC_FEEDBACK_MODE_ON_TICKS for Battery Saver.
- set HAPTIC_FEEDBACK_MODE_ON_ENDS for Reduce Bright Colors.
- set HAPTIC_FEEDBACK_MODE_ON_ENDS for Night Light.

Bug: 172900709
Test: manual
Change-Id: I070a0f2e4cf690bf611f62c7a4a2bcef17e08571
2020-11-18 08:08:20 +00:00
Yi-Ling Chuang
31719321af Make some display related 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: I2a36da4ac4bb14a4d2ac7b89ab2bb3ebf8e655f7
2019-11-28 14:29:33 +08:00
lindatseng
55f66a9177 Fix regression of wrong min value on night display slice
The min value of NightDisplayIntensityPreferenceController
should always be 0 (which is the old value we used before
ag/7062353). The range is cacluated from the relative value
to MinimumColorTemperature, which means the min value should
always be 0.

Test: atest NightDisplayIntensityPreferenceControllerTest
Fixes:130758028
Change-Id: Ica75672dda6a9ee0c6013f1c903611263b7d133f
2019-04-18 11:11:12 -07:00
lindatseng
fadedb321c Enforce min value on panel slices slider
We did not set the min value on slider slices when converting them
from preference to slices, which makes the slices all have min 0.
However, there are some slider which should have min value greater
than 0, for example, call and alarm.

We should get the min value and apply it to slider slice to make it
consistent with what we have in settings pref.

Test: Manual verification
Test: make -j40 RunSettingRobotests
Test: atest VolumeSeekBarPreferenceControllerTest
Fixes: 130439216
Fixes: 130358208
Change-Id: Ib4399c36c7da3ac41a6d46a6c150f0ec1b9b0b0f
2019-04-16 16:30:08 +00:00
Christine Franks
a21c6edcf6 Use ColorDisplayManager for night display settings
Bug: 123352608
Test: make ROBOTEST_FILTER="(Night*)" RunSettingsRoboTests -j48
Change-Id: Id4ab9ca4a21243be5967d63db72212daefb3dcb9
2019-01-24 12:18:40 -08:00
Christine Franks
5405d71616 Use ColorDisplayManager for night display
Bug: 111215474
Test: make ROBOTEST_FILTER="(Night*)" RunSettingsRoboTests -j48
Change-Id: I8b92407470446ef86e460985fc64cf2467eb3e5c
2019-01-23 13:32:30 -08:00
Christine Franks
26d0595373 Use ColorDisplayManager
Bug: 111215474
Test: make RunSettingsRoboTests -j100
Change-Id: I78bb44a1c4824f2b5223ca0d58ad224b96591d9a
2018-11-06 21:31:28 +00: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
bf1f5b5813 Add isSliceable API to BasePrefController
Only support explicitly approved Settings Slices,
dictated by controllers which return true for the new
method isSliceable.

Updating the supported settings to a whitelist means that
the method to return all available slices must be updated,
and checking slicability when we index slices.

Test: robotests
Bug: 79779103
Change-Id: Ib2b9690cdd0036b5cc4a1cb846c52bce7c824ab9
2018-05-22 11:06:42 -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
Christine Franks
d67ec89c4b Add night display pref controllers and change UX
- Convert NightDisplaySettings to a DashboardFragment
- Add preference controllers for all Night Display settings
- Change UX for activation from a toggle to a button

Bug: 73739388
Bug: 69912911
Test: make -j100 and make RunSettingsRoboTests -j100
Change-Id: Ia173f16207ba59bf57eb7546cbb1e2dbca67b063
2018-05-02 13:12:26 -07:00