Al Sutton | 91f89d0 | 2019-08-16 12:56:57 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | package android.provider.settings.validators; |
| 18 | |
| 19 | import static android.provider.settings.validators.SettingsValidators.ANY_INTEGER_VALIDATOR; |
| 20 | import static android.provider.settings.validators.SettingsValidators.BOOLEAN_VALIDATOR; |
| 21 | import static android.provider.settings.validators.SettingsValidators.COLON_SEPARATED_COMPONENT_LIST_VALIDATOR; |
| 22 | import static android.provider.settings.validators.SettingsValidators.COLON_SEPARATED_PACKAGE_LIST_VALIDATOR; |
| 23 | import static android.provider.settings.validators.SettingsValidators.COMMA_SEPARATED_COMPONENT_LIST_VALIDATOR; |
| 24 | import static android.provider.settings.validators.SettingsValidators.COMPONENT_NAME_VALIDATOR; |
| 25 | import static android.provider.settings.validators.SettingsValidators.JSON_OBJECT_VALIDATOR; |
| 26 | import static android.provider.settings.validators.SettingsValidators.LOCALE_VALIDATOR; |
| 27 | import static android.provider.settings.validators.SettingsValidators.NON_NEGATIVE_INTEGER_VALIDATOR; |
| 28 | import static android.provider.settings.validators.SettingsValidators.NULLABLE_COMPONENT_NAME_VALIDATOR; |
| 29 | import static android.provider.settings.validators.SettingsValidators.PACKAGE_NAME_VALIDATOR; |
| 30 | import static android.provider.settings.validators.SettingsValidators.TILE_LIST_VALIDATOR; |
| 31 | import static android.provider.settings.validators.SettingsValidators.TTS_LIST_VALIDATOR; |
| 32 | |
| 33 | import android.provider.Settings.Secure; |
| 34 | import android.util.ArrayMap; |
| 35 | |
| 36 | import java.util.Map; |
| 37 | |
| 38 | /** |
| 39 | * Validators for the Secure Settings. |
| 40 | */ |
| 41 | public class SecureSettingsValidators { |
| 42 | /** |
| 43 | * All settings in {@link Secure.SETTINGS_TO_BACKUP} and {@link |
Al Sutton | 66a3e01 | 2019-10-15 15:34:13 +0100 | [diff] [blame] | 44 | * DeviceSpecificSettings.DEVICE_SPECIFIC_SETTINGS_TO_BACKUP} array *must* have a non-null |
| 45 | * validator, otherwise they won't be restored. |
Al Sutton | 91f89d0 | 2019-08-16 12:56:57 +0100 | [diff] [blame] | 46 | */ |
| 47 | public static final Map<String, Validator> VALIDATORS = new ArrayMap<>(); |
| 48 | |
| 49 | static { |
| 50 | VALIDATORS.put(Secure.BUGREPORT_IN_POWER_MENU, BOOLEAN_VALIDATOR); |
| 51 | VALIDATORS.put(Secure.ALLOW_MOCK_LOCATION, BOOLEAN_VALIDATOR); |
| 52 | VALIDATORS.put(Secure.USB_MASS_STORAGE_ENABLED, BOOLEAN_VALIDATOR); |
| 53 | VALIDATORS.put(Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED, BOOLEAN_VALIDATOR); |
| 54 | VALIDATORS.put( |
| 55 | Secure.ACCESSIBILITY_DISPLAY_DALTONIZER, |
| 56 | new DiscreteValueValidator(new String[] {"-1", "0", "11", "12", "13"})); |
| 57 | VALIDATORS.put(Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED, BOOLEAN_VALIDATOR); |
| 58 | VALIDATORS.put(Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED, BOOLEAN_VALIDATOR); |
| 59 | VALIDATORS.put( |
| 60 | Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED, BOOLEAN_VALIDATOR); |
| 61 | VALIDATORS.put(Secure.AUTOFILL_SERVICE, NULLABLE_COMPONENT_NAME_VALIDATOR); |
| 62 | VALIDATORS.put( |
| 63 | Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE, |
| 64 | new InclusiveFloatRangeValidator(1.0f, Float.MAX_VALUE)); |
| 65 | VALIDATORS.put( |
| 66 | Secure.ENABLED_ACCESSIBILITY_SERVICES, COLON_SEPARATED_COMPONENT_LIST_VALIDATOR); |
| 67 | VALIDATORS.put(Secure.ENABLED_VR_LISTENERS, COLON_SEPARATED_COMPONENT_LIST_VALIDATOR); |
| 68 | VALIDATORS.put( |
| 69 | Secure.TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES, |
| 70 | COLON_SEPARATED_COMPONENT_LIST_VALIDATOR); |
| 71 | VALIDATORS.put(Secure.TOUCH_EXPLORATION_ENABLED, BOOLEAN_VALIDATOR); |
| 72 | VALIDATORS.put(Secure.ACCESSIBILITY_ENABLED, BOOLEAN_VALIDATOR); |
| 73 | VALIDATORS.put( |
| 74 | Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE, NULLABLE_COMPONENT_NAME_VALIDATOR); |
| 75 | // technically either ComponentName or class name, but there's proper value |
| 76 | // validation at callsites, so allow any non-null string |
| 77 | VALIDATORS.put(Secure.ACCESSIBILITY_BUTTON_TARGET_COMPONENT, value -> value != null); |
| 78 | VALIDATORS.put(Secure.ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN, BOOLEAN_VALIDATOR); |
| 79 | VALIDATORS.put(Secure.ACCESSIBILITY_SHORTCUT_ENABLED, BOOLEAN_VALIDATOR); |
| 80 | VALIDATORS.put(Secure.ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN, BOOLEAN_VALIDATOR); |
| 81 | VALIDATORS.put(Secure.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED, BOOLEAN_VALIDATOR); |
| 82 | VALIDATORS.put( |
| 83 | Secure.ACCESSIBILITY_CAPTIONING_PRESET, |
| 84 | new DiscreteValueValidator(new String[] {"-1", "0", "1", "2", "3", "4"})); |
| 85 | VALIDATORS.put(Secure.ACCESSIBILITY_CAPTIONING_ENABLED, BOOLEAN_VALIDATOR); |
| 86 | VALIDATORS.put(Secure.ACCESSIBILITY_CAPTIONING_LOCALE, LOCALE_VALIDATOR); |
| 87 | VALIDATORS.put(Secure.ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR, ANY_INTEGER_VALIDATOR); |
| 88 | VALIDATORS.put(Secure.ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR, ANY_INTEGER_VALIDATOR); |
| 89 | VALIDATORS.put( |
| 90 | Secure.ACCESSIBILITY_CAPTIONING_EDGE_TYPE, |
| 91 | new DiscreteValueValidator(new String[] {"0", "1", "2"})); |
| 92 | VALIDATORS.put(Secure.ACCESSIBILITY_CAPTIONING_EDGE_COLOR, ANY_INTEGER_VALIDATOR); |
| 93 | VALIDATORS.put( |
| 94 | Secure.ACCESSIBILITY_CAPTIONING_TYPEFACE, |
| 95 | new DiscreteValueValidator( |
| 96 | new String[] {"DEFAULT", "MONOSPACE", "SANS_SERIF", "SERIF"})); |
| 97 | VALIDATORS.put( |
| 98 | Secure.ACCESSIBILITY_CAPTIONING_FONT_SCALE, |
| 99 | new InclusiveFloatRangeValidator(0.5f, 2.0f)); |
| 100 | VALIDATORS.put(Secure.ACCESSIBILITY_CAPTIONING_WINDOW_COLOR, ANY_INTEGER_VALIDATOR); |
| 101 | VALIDATORS.put(Secure.TTS_DEFAULT_RATE, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 102 | VALIDATORS.put(Secure.TTS_DEFAULT_PITCH, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 103 | VALIDATORS.put(Secure.TTS_DEFAULT_SYNTH, PACKAGE_NAME_VALIDATOR); |
| 104 | VALIDATORS.put(Secure.TTS_ENABLED_PLUGINS, new PackageNameListValidator(" ")); |
| 105 | VALIDATORS.put(Secure.TTS_DEFAULT_LOCALE, TTS_LIST_VALIDATOR); |
| 106 | VALIDATORS.put(Secure.SHOW_IME_WITH_HARD_KEYBOARD, BOOLEAN_VALIDATOR); |
| 107 | VALIDATORS.put(Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, BOOLEAN_VALIDATOR); |
| 108 | VALIDATORS.put(Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 109 | VALIDATORS.put(Secure.WIFI_NUM_OPEN_NETWORKS_KEPT, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 110 | VALIDATORS.put(Secure.MOUNT_PLAY_NOTIFICATION_SND, BOOLEAN_VALIDATOR); |
| 111 | VALIDATORS.put(Secure.MOUNT_UMS_AUTOSTART, BOOLEAN_VALIDATOR); |
| 112 | VALIDATORS.put(Secure.MOUNT_UMS_PROMPT, BOOLEAN_VALIDATOR); |
| 113 | VALIDATORS.put(Secure.MOUNT_UMS_NOTIFY_ENABLED, BOOLEAN_VALIDATOR); |
| 114 | VALIDATORS.put(Secure.DOUBLE_TAP_TO_WAKE, BOOLEAN_VALIDATOR); |
| 115 | VALIDATORS.put(Secure.WAKE_GESTURE_ENABLED, BOOLEAN_VALIDATOR); |
| 116 | VALIDATORS.put(Secure.LONG_PRESS_TIMEOUT, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 117 | VALIDATORS.put(Secure.CAMERA_GESTURE_DISABLED, BOOLEAN_VALIDATOR); |
| 118 | VALIDATORS.put(Secure.ACCESSIBILITY_AUTOCLICK_ENABLED, BOOLEAN_VALIDATOR); |
| 119 | VALIDATORS.put(Secure.ACCESSIBILITY_AUTOCLICK_DELAY, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 120 | VALIDATORS.put(Secure.ACCESSIBILITY_LARGE_POINTER_ICON, BOOLEAN_VALIDATOR); |
| 121 | VALIDATORS.put( |
| 122 | Secure.PREFERRED_TTY_MODE, |
| 123 | new DiscreteValueValidator(new String[] {"0", "1", "2", "3"})); |
| 124 | VALIDATORS.put(Secure.ENHANCED_VOICE_PRIVACY_ENABLED, BOOLEAN_VALIDATOR); |
| 125 | VALIDATORS.put(Secure.TTY_MODE_ENABLED, BOOLEAN_VALIDATOR); |
| 126 | VALIDATORS.put(Secure.RTT_CALLING_MODE, BOOLEAN_VALIDATOR); |
| 127 | VALIDATORS.put( |
| 128 | Secure.INCALL_POWER_BUTTON_BEHAVIOR, |
| 129 | new DiscreteValueValidator(new String[] {"1", "2"})); |
| 130 | VALIDATORS.put(Secure.NIGHT_DISPLAY_CUSTOM_START_TIME, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 131 | VALIDATORS.put(Secure.NIGHT_DISPLAY_CUSTOM_END_TIME, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 132 | VALIDATORS.put(Secure.NIGHT_DISPLAY_COLOR_TEMPERATURE, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 133 | VALIDATORS.put(Secure.NIGHT_DISPLAY_AUTO_MODE, new InclusiveIntegerRangeValidator(0, 2)); |
| 134 | VALIDATORS.put(Secure.DISPLAY_WHITE_BALANCE_ENABLED, BOOLEAN_VALIDATOR); |
| 135 | VALIDATORS.put(Secure.SYNC_PARENT_SOUNDS, BOOLEAN_VALIDATOR); |
| 136 | VALIDATORS.put(Secure.CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED, BOOLEAN_VALIDATOR); |
| 137 | VALIDATORS.put(Secure.CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED, BOOLEAN_VALIDATOR); |
| 138 | VALIDATORS.put(Secure.SYSTEM_NAVIGATION_KEYS_ENABLED, BOOLEAN_VALIDATOR); |
| 139 | VALIDATORS.put(Secure.QS_TILES, TILE_LIST_VALIDATOR); |
| 140 | VALIDATORS.put(Secure.DOZE_ENABLED, BOOLEAN_VALIDATOR); |
| 141 | VALIDATORS.put(Secure.DOZE_ALWAYS_ON, BOOLEAN_VALIDATOR); |
| 142 | VALIDATORS.put(Secure.DOZE_PICK_UP_GESTURE, BOOLEAN_VALIDATOR); |
| 143 | VALIDATORS.put(Secure.DOZE_DOUBLE_TAP_GESTURE, BOOLEAN_VALIDATOR); |
| 144 | VALIDATORS.put(Secure.DOZE_TAP_SCREEN_GESTURE, BOOLEAN_VALIDATOR); |
| 145 | VALIDATORS.put(Secure.DOZE_WAKE_LOCK_SCREEN_GESTURE, BOOLEAN_VALIDATOR); |
| 146 | VALIDATORS.put(Secure.DOZE_WAKE_DISPLAY_GESTURE, BOOLEAN_VALIDATOR); |
| 147 | VALIDATORS.put(Secure.NFC_PAYMENT_DEFAULT_COMPONENT, COMPONENT_NAME_VALIDATOR); |
| 148 | VALIDATORS.put( |
| 149 | Secure.AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 150 | VALIDATORS.put(Secure.FACE_UNLOCK_KEYGUARD_ENABLED, BOOLEAN_VALIDATOR); |
| 151 | VALIDATORS.put(Secure.FACE_UNLOCK_DISMISSES_KEYGUARD, BOOLEAN_VALIDATOR); |
| 152 | VALIDATORS.put(Secure.SHOW_MEDIA_WHEN_BYPASSING, BOOLEAN_VALIDATOR); |
| 153 | VALIDATORS.put(Secure.FACE_UNLOCK_APP_ENABLED, BOOLEAN_VALIDATOR); |
| 154 | VALIDATORS.put(Secure.FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION, BOOLEAN_VALIDATOR); |
| 155 | VALIDATORS.put(Secure.ASSIST_GESTURE_ENABLED, BOOLEAN_VALIDATOR); |
| 156 | VALIDATORS.put(Secure.ASSIST_GESTURE_SILENCE_ALERTS_ENABLED, BOOLEAN_VALIDATOR); |
| 157 | VALIDATORS.put(Secure.ASSIST_GESTURE_WAKE_ENABLED, BOOLEAN_VALIDATOR); |
| 158 | VALIDATORS.put(Secure.VR_DISPLAY_MODE, new DiscreteValueValidator(new String[] {"0", "1"})); |
| 159 | VALIDATORS.put(Secure.NOTIFICATION_BADGING, BOOLEAN_VALIDATOR); |
Al Sutton | 91f89d0 | 2019-08-16 12:56:57 +0100 | [diff] [blame] | 160 | VALIDATORS.put(Secure.NOTIFICATION_DISMISS_RTL, BOOLEAN_VALIDATOR); |
| 161 | VALIDATORS.put(Secure.QS_AUTO_ADDED_TILES, TILE_LIST_VALIDATOR); |
| 162 | VALIDATORS.put(Secure.SCREENSAVER_ENABLED, BOOLEAN_VALIDATOR); |
| 163 | VALIDATORS.put(Secure.SCREENSAVER_COMPONENTS, COMMA_SEPARATED_COMPONENT_LIST_VALIDATOR); |
| 164 | VALIDATORS.put(Secure.SCREENSAVER_ACTIVATE_ON_DOCK, BOOLEAN_VALIDATOR); |
| 165 | VALIDATORS.put(Secure.SCREENSAVER_ACTIVATE_ON_SLEEP, BOOLEAN_VALIDATOR); |
| 166 | VALIDATORS.put(Secure.LOCKDOWN_IN_POWER_MENU, BOOLEAN_VALIDATOR); |
| 167 | VALIDATORS.put(Secure.SHOW_FIRST_CRASH_DIALOG_DEV_OPTION, BOOLEAN_VALIDATOR); |
| 168 | VALIDATORS.put(Secure.VOLUME_HUSH_GESTURE, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 169 | VALIDATORS.put( |
| 170 | Secure.ENABLED_NOTIFICATION_LISTENERS, |
| 171 | COLON_SEPARATED_COMPONENT_LIST_VALIDATOR); // legacy restore setting |
| 172 | VALIDATORS.put( |
| 173 | Secure.ENABLED_NOTIFICATION_ASSISTANT, |
| 174 | COLON_SEPARATED_COMPONENT_LIST_VALIDATOR); // legacy restore setting |
| 175 | VALIDATORS.put( |
| 176 | Secure.ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES, |
| 177 | COLON_SEPARATED_PACKAGE_LIST_VALIDATOR); // legacy restore setting |
| 178 | VALIDATORS.put(Secure.HUSH_GESTURE_USED, BOOLEAN_VALIDATOR); |
| 179 | VALIDATORS.put(Secure.MANUAL_RINGER_TOGGLE_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 180 | VALIDATORS.put(Secure.IN_CALL_NOTIFICATION_ENABLED, BOOLEAN_VALIDATOR); |
| 181 | VALIDATORS.put(Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, BOOLEAN_VALIDATOR); |
| 182 | VALIDATORS.put(Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, BOOLEAN_VALIDATOR); |
| 183 | VALIDATORS.put(Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS, BOOLEAN_VALIDATOR); |
| 184 | VALIDATORS.put(Secure.SHOW_NOTIFICATION_SNOOZE, BOOLEAN_VALIDATOR); |
| 185 | VALIDATORS.put(Secure.ZEN_DURATION, ANY_INTEGER_VALIDATOR); |
| 186 | VALIDATORS.put(Secure.SHOW_ZEN_UPGRADE_NOTIFICATION, BOOLEAN_VALIDATOR); |
| 187 | VALIDATORS.put(Secure.SHOW_ZEN_SETTINGS_SUGGESTION, BOOLEAN_VALIDATOR); |
| 188 | VALIDATORS.put(Secure.ZEN_SETTINGS_UPDATED, BOOLEAN_VALIDATOR); |
| 189 | VALIDATORS.put(Secure.ZEN_SETTINGS_SUGGESTION_VIEWED, BOOLEAN_VALIDATOR); |
| 190 | VALIDATORS.put(Secure.CHARGING_SOUNDS_ENABLED, BOOLEAN_VALIDATOR); |
| 191 | VALIDATORS.put(Secure.CHARGING_VIBRATION_ENABLED, BOOLEAN_VALIDATOR); |
| 192 | VALIDATORS.put( |
| 193 | Secure.ACCESSIBILITY_NON_INTERACTIVE_UI_TIMEOUT_MS, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 194 | VALIDATORS.put( |
| 195 | Secure.ACCESSIBILITY_INTERACTIVE_UI_TIMEOUT_MS, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 196 | VALIDATORS.put(Secure.USER_SETUP_COMPLETE, BOOLEAN_VALIDATOR); |
| 197 | VALIDATORS.put(Secure.ASSIST_GESTURE_SETUP_COMPLETE, BOOLEAN_VALIDATOR); |
| 198 | VALIDATORS.put(Secure.NOTIFICATION_NEW_INTERRUPTION_MODEL, BOOLEAN_VALIDATOR); |
| 199 | VALIDATORS.put(Secure.TRUST_AGENTS_EXTEND_UNLOCK, BOOLEAN_VALIDATOR); |
| 200 | VALIDATORS.put(Secure.LOCK_SCREEN_CUSTOM_CLOCK_FACE, JSON_OBJECT_VALIDATOR); |
| 201 | VALIDATORS.put(Secure.LOCK_SCREEN_WHEN_TRUST_LOST, BOOLEAN_VALIDATOR); |
| 202 | VALIDATORS.put(Secure.SKIP_GESTURE, BOOLEAN_VALIDATOR); |
| 203 | /* |
| 204 | * Only used if FeatureFlag "settings_skip_direction_mutable" is enabled. |
| 205 | * If feature flag is disabled, should assume SKIP_DIRECTION = 0. |
| 206 | * 0 / false = right to left to advance to next |
| 207 | * 1 / true = left to right to advance to next |
| 208 | */ |
| 209 | VALIDATORS.put(Secure.SKIP_DIRECTION, BOOLEAN_VALIDATOR); |
| 210 | VALIDATORS.put(Secure.SILENCE_GESTURE, BOOLEAN_VALIDATOR); |
| 211 | VALIDATORS.put(Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES, JSON_OBJECT_VALIDATOR); |
| 212 | VALIDATORS.put( |
| 213 | Secure.NAVIGATION_MODE, new DiscreteValueValidator(new String[] {"0", "1", "2"})); |
| 214 | VALIDATORS.put(Secure.AWARE_ENABLED, BOOLEAN_VALIDATOR); |
| 215 | VALIDATORS.put(Secure.SKIP_GESTURE_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 216 | VALIDATORS.put(Secure.SKIP_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 217 | VALIDATORS.put(Secure.SILENCE_ALARMS_GESTURE_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 218 | VALIDATORS.put(Secure.SILENCE_TIMER_GESTURE_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 219 | VALIDATORS.put(Secure.SILENCE_CALL_GESTURE_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 220 | VALIDATORS.put(Secure.SILENCE_ALARMS_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 221 | VALIDATORS.put(Secure.SILENCE_TIMER_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 222 | VALIDATORS.put(Secure.SILENCE_CALL_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR); |
Beverly | a6e4688 | 2019-10-09 18:15:27 -0400 | [diff] [blame] | 223 | VALIDATORS.put(Secure.AWARE_TAP_PAUSE_GESTURE_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR); |
| 224 | VALIDATORS.put(Secure.AWARE_TAP_PAUSE_TOUCH_COUNT, NON_NEGATIVE_INTEGER_VALIDATOR); |
Al Sutton | 91f89d0 | 2019-08-16 12:56:57 +0100 | [diff] [blame] | 225 | VALIDATORS.put(Secure.ODI_CAPTIONS_ENABLED, BOOLEAN_VALIDATOR); |
| 226 | VALIDATORS.put(Secure.DARK_MODE_DIALOG_SEEN, BOOLEAN_VALIDATOR); |
| 227 | VALIDATORS.put(Secure.UI_NIGHT_MODE, new InclusiveIntegerRangeValidator(0, 2)); |
| 228 | VALIDATORS.put(Secure.GLOBAL_ACTIONS_PANEL_ENABLED, BOOLEAN_VALIDATOR); |
| 229 | VALIDATORS.put(Secure.AWARE_LOCK_ENABLED, BOOLEAN_VALIDATOR); |
| 230 | VALIDATORS.put(Secure.DISPLAY_DENSITY_FORCED, NON_NEGATIVE_INTEGER_VALIDATOR); |
Edgar Wang | 32af83b | 2019-10-18 12:31:24 +0800 | [diff] [blame^] | 231 | VALIDATORS.put(Secure.TAP_GESTURE, BOOLEAN_VALIDATOR); |
Al Sutton | 91f89d0 | 2019-08-16 12:56:57 +0100 | [diff] [blame] | 232 | } |
| 233 | } |