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
Convert GesturesSettingPreferenceController to
TogglePreferenceController,
All of its children need follow the change,
add setter and robotest for them:
AssistGestureSettingsPreferenceController
DoubleTapPowerPreferenceController
DoubleTapScreenPreferenceController
DoubleTwistPreferenceController
PickupGesturePreferenceController
SwipeToNotificationPreferenceController
Change-Id: I792b2d370eea828bf345fb2b1cc3eac260eb66f4
Fixes: 74913806
Fixes: 67998110
Fixes: 67998098
Fixes: 67998048
Fixes: 67998069
Fixes: 67997452
Test: make RunSettingsRoboTests
Some of the AmbientDisplay preference controllers were
crashing when their isAvailable methods were being called
by their fragment's search index providers, which meant that
the entire collection of non-indexable keys failed. Thus,
all search results were showing up. In the case of a secondary
user, they were able to see developer options which crashed
settings when clicked.
There are two issues addressed in this cl.
1. Fix the crashes so the non-indexable keys collection works
2. Contain each fragment's collection, so that if a fragment does
crash, the damage is minimized.
Part 1 is checking that the config in isAvailable is not null,
and creating one if so.
Part 2 is fixed by surrounding the collection of non-indexable
keys in a try-catch, with an option in the catch to re-throw the
error if a system property is set. Thus, in a new pre-submit
instrumentation test, we can and docheck if any of the fragments crash
when collecting non-indexable keys.
Change-Id: I820bd9cb2649aa6faff7f82fcf575a62e41dc4fc
Fixes: 77486668
Test: atest NonIndexableCrashTest, robotests
Makes a few methods static so we can call them from other locations.
Bug: 64256644
Test: robotests
Change-Id: Ie97cda342c3143a21bd273e4d29f64f75e006059
If we try to set an inline result when it has not yet been
accessed in settings, nothing is read from Settings.
Thus, include a default value for a fallback.
Change-Id: I8a593d9ff3308b2d0cd5bc65658d160abf55b07e
Fixes: 63955012
Test: robotests
If we try to set an inline result when it has not yet been
accessed in settings, nothing is read from Settings.
Thus, include a default value for a fallback.
Manual merge for: ag/2588219/
Change-Id: I3b8eea4f82764852cea642db4455ba57f10a7d37
Fixes: 63955012
Test: robotests
The setting has little to no meaning when AOD is on.
Test: make
ROBOTEST_FILTER=AmbientDisplayAlwaysOnPreferenceControllerTest
RunSettingsRoboTests -j
Bug:62391405
Change-Id:If5492227755ca81ec0bcf921a81e2bfd33a85b9c
The setting has little to no meaning when AOD is on.
Test: make
ROBOTEST_FILTER=AmbientDisplayAlwaysOnPreferenceControllerTest
RunSettingsRoboTests -j
Bug:62391405
Change-Id:If5492227755ca81ec0bcf921a81e2bfd33a85b9c