OSDN Git Service

Establish permanently unavailable settings
authorMatthew Fritze <mfritze@google.com>
Thu, 3 May 2018 23:46:51 +0000 (16:46 -0700)
committerMatthew Fritze <mfritze@google.com>
Wed, 9 May 2018 15:36:59 +0000 (08:36 -0700)
commitf87a1f3f41b52bd3b64a259fcfc457164aad67b5
treeb2bbd17405b2d9233e36a5fc7be49f6df660893b
parent1220c364c4e6da3587fc356bb30d3cba99ab7946
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
113 files changed:
src/com/android/settings/accessibility/AccessibilitySlicePreferenceController.java
src/com/android/settings/accessibility/MagnificationNavbarPreferenceController.java
src/com/android/settings/accounts/EnterpriseDisclosurePreferenceController.java
src/com/android/settings/applications/DataSaverController.java
src/com/android/settings/applications/DeviceAdministratorsController.java
src/com/android/settings/applications/EnabledVrListenersController.java
src/com/android/settings/applications/HighPowerAppsController.java
src/com/android/settings/applications/PremiumSmsController.java
src/com/android/settings/applications/appinfo/AppBatteryPreferenceController.java
src/com/android/settings/applications/appinfo/AppDataUsagePreferenceController.java
src/com/android/settings/applications/appinfo/AppMemoryPreferenceController.java
src/com/android/settings/applications/appinfo/DefaultAppShortcutPreferenceControllerBase.java
src/com/android/settings/applications/appinfo/TimeSpentInAppPreferenceController.java
src/com/android/settings/backup/AutoRestorePreferenceController.java
src/com/android/settings/backup/BackupDataPreferenceController.java
src/com/android/settings/backup/BackupInactivePreferenceController.java
src/com/android/settings/backup/BackupSettingsActivityPreferenceController.java
src/com/android/settings/backup/ConfigureAccountPreferenceController.java
src/com/android/settings/backup/DataManagementPreferenceController.java
src/com/android/settings/bluetooth/BluetoothDeviceNamePreferenceController.java
src/com/android/settings/bluetooth/BluetoothFilesPreferenceController.java
src/com/android/settings/connecteddevice/AddDevicePreferenceController.java
src/com/android/settings/connecteddevice/AvailableMediaDeviceGroupController.java
src/com/android/settings/connecteddevice/BluetoothDashboardFragment.java
src/com/android/settings/connecteddevice/BluetoothOnWhileDrivingPreferenceController.java
src/com/android/settings/connecteddevice/ConnectedDeviceGroupController.java
src/com/android/settings/connecteddevice/SavedDeviceGroupController.java
src/com/android/settings/core/BasePreferenceController.java
src/com/android/settings/datausage/DataUsageSummaryPreferenceController.java
src/com/android/settings/deviceinfo/legal/LegalPreferenceController.java
src/com/android/settings/deviceinfo/legal/WallpaperAttributionsPreferenceController.java
src/com/android/settings/display/AmbientDisplayAlwaysOnPreferenceController.java
src/com/android/settings/display/AmbientDisplayNotificationsPreferenceController.java
src/com/android/settings/display/AutoBrightnessPreferenceController.java
src/com/android/settings/display/AutoRotatePreferenceController.java
src/com/android/settings/display/NightDisplayActivationPreferenceController.java
src/com/android/settings/display/NightDisplayAutoModePreferenceController.java
src/com/android/settings/display/NightDisplayCustomEndTimePreferenceController.java
src/com/android/settings/display/NightDisplayCustomStartTimePreferenceController.java
src/com/android/settings/display/NightDisplayFooterPreferenceController.java
src/com/android/settings/display/NightDisplayIntensityPreferenceController.java
src/com/android/settings/fingerprint/FingerprintStatusPreferenceController.java
src/com/android/settings/fuelgauge/AutoRestrictionPreferenceController.java
src/com/android/settings/fuelgauge/SmartBatteryPreferenceController.java
src/com/android/settings/gestures/AssistGestureSettingsPreferenceController.java
src/com/android/settings/gestures/DoubleTapPowerPreferenceController.java
src/com/android/settings/gestures/DoubleTapScreenPreferenceController.java
src/com/android/settings/gestures/DoubleTwistPreferenceController.java
src/com/android/settings/gestures/GesturesSettingPreferenceController.java
src/com/android/settings/gestures/PickupGesturePreferenceController.java
src/com/android/settings/gestures/PreventRingingPreferenceController.java
src/com/android/settings/gestures/SwipeToNotificationPreferenceController.java
src/com/android/settings/gestures/SwipeUpPreferenceController.java
src/com/android/settings/inputmethod/GameControllerPreferenceController.java
src/com/android/settings/language/PointerSpeedController.java
src/com/android/settings/location/LocationScanningPreferenceController.java
src/com/android/settings/network/AirplaneModePreferenceController.java
src/com/android/settings/nfc/NfcForegroundPreferenceController.java
src/com/android/settings/nfc/NfcPaymentPreferenceController.java
src/com/android/settings/notification/AlarmVolumePreferenceController.java
src/com/android/settings/notification/BadgingNotificationPreferenceController.java
src/com/android/settings/notification/MediaVolumePreferenceController.java
src/com/android/settings/notification/NotificationVolumePreferenceController.java
src/com/android/settings/notification/PulseNotificationPreferenceController.java
src/com/android/settings/notification/RingVolumePreferenceController.java
src/com/android/settings/print/PrintSettingPreferenceController.java
src/com/android/settings/security/EncryptionStatusPreferenceController.java
src/com/android/settings/security/ScreenPinningPreferenceController.java
src/com/android/settings/security/ShowPasswordPreferenceController.java
src/com/android/settings/security/trustagent/ManageTrustAgentsPreferenceController.java
src/com/android/settings/slices/SliceBuilderUtils.java
src/com/android/settings/sound/AudioSwitchPreferenceController.java
src/com/android/settings/system/AdditionalSystemUpdatePreferenceController.java
src/com/android/settings/system/ResetPreferenceController.java
src/com/android/settings/system/SystemUpdatePreferenceController.java
src/com/android/settings/widget/PreferenceCategoryController.java
tests/robotests/src/com/android/settings/accessibility/AccessibilitySlicePreferenceControllerTest.java
tests/robotests/src/com/android/settings/accounts/EnterpriseDisclosurePreferenceControllerTest.java
tests/robotests/src/com/android/settings/applications/appinfo/AppDataUsagePreferenceControllerTest.java
tests/robotests/src/com/android/settings/applications/appinfo/AppMemoryPreferenceControllerTest.java
tests/robotests/src/com/android/settings/applications/appinfo/DefaultAppShortcutPreferenceControllerBaseTest.java
tests/robotests/src/com/android/settings/applications/appinfo/TimeSpentInAppPreferenceControllerTest.java
tests/robotests/src/com/android/settings/backup/AutoRestorePreferenceControllerTest.java
tests/robotests/src/com/android/settings/backup/BackupDataPreferenceControllerTest.java
tests/robotests/src/com/android/settings/backup/BackupInactivePreferenceControllerTest.java
tests/robotests/src/com/android/settings/backup/ConfigureAccountPreferenceControllerTest.java
tests/robotests/src/com/android/settings/backup/DataManagementPreferenceControllerTest.java
tests/robotests/src/com/android/settings/connecteddevice/AddDevicePreferenceControllerTest.java
tests/robotests/src/com/android/settings/connecteddevice/AvailableMediaDeviceGroupControllerTest.java
tests/robotests/src/com/android/settings/connecteddevice/BluetoothOnWhileDrivingPreferenceControllerTest.java
tests/robotests/src/com/android/settings/connecteddevice/ConnectedDeviceGroupControllerTest.java
tests/robotests/src/com/android/settings/connecteddevice/SavedDeviceGroupControllerTest.java
tests/robotests/src/com/android/settings/core/BasePreferenceControllerTest.java
tests/robotests/src/com/android/settings/datausage/DataUsageSummaryPreferenceControllerTest.java
tests/robotests/src/com/android/settings/deviceinfo/legal/CopyrightPreferenceControllerTest.java
tests/robotests/src/com/android/settings/deviceinfo/legal/LicensePreferenceControllerTest.java
tests/robotests/src/com/android/settings/deviceinfo/legal/TermsPreferenceControllerTest.java
tests/robotests/src/com/android/settings/deviceinfo/legal/WallpaperAttributionsPreferenceControllerTest.java
tests/robotests/src/com/android/settings/deviceinfo/legal/WebViewLicensePreferenceControllerTest.java
tests/robotests/src/com/android/settings/display/AmbientDisplayAlwaysOnPreferenceControllerTest.java
tests/robotests/src/com/android/settings/display/AutoRotatePreferenceControllerTest.java
tests/robotests/src/com/android/settings/fingerprint/FingerprintStatusPreferenceControllerTest.java
tests/robotests/src/com/android/settings/fuelgauge/AutoRestrictionPreferenceControllerTest.java
tests/robotests/src/com/android/settings/fuelgauge/SmartBatteryPreferenceControllerTest.java
tests/robotests/src/com/android/settings/gestures/GesturePreferenceControllerTest.java
tests/robotests/src/com/android/settings/inputmethod/GameControllerPreferenceControllerTest.java
tests/robotests/src/com/android/settings/notification/BadgingNotificationPreferenceControllerTest.java
tests/robotests/src/com/android/settings/notification/PulseNotificationPreferenceControllerTest.java
tests/robotests/src/com/android/settings/notification/VolumeSeekBarPreferenceControllerTest.java
tests/robotests/src/com/android/settings/slices/SliceBroadcastReceiverTest.java
tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
tests/robotests/src/com/android/settings/sound/AudioOutputSwitchPreferenceControllerTest.java
tests/robotests/src/com/android/settings/testutils/SliceTester.java