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.backup;
18 
19 import android.compat.annotation.UnsupportedAppUsage;
20 import android.provider.Settings;
21 
22 /** Information relating to the Secure settings which should be backed up */
23 public class SecureSettings {
24 
25     /**
26      * NOTE: Settings are backed up and restored in the order they appear
27      *       in this array. If you have one setting depending on another,
28      *       make sure that they are ordered appropriately.
29      */
30     @UnsupportedAppUsage
31     public static final String[] SETTINGS_TO_BACKUP = {
32         Settings.Secure.BUGREPORT_IN_POWER_MENU,
33         Settings.Secure.ALLOW_MOCK_LOCATION,
34         Settings.Secure.USB_MASS_STORAGE_ENABLED,                           // moved to global
35         Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED,
36         Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER,
37         Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED,
38         Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
39         Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED,
40         Settings.Secure.ADAPTIVE_CHARGING_ENABLED,
41         Settings.Secure.ADAPTIVE_SLEEP,
42         Settings.Secure.CAMERA_AUTOROTATE,
43         Settings.Secure.AUTOFILL_SERVICE,
44         Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
45         Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
46         Settings.Secure.ENABLED_ACCESSIBILITY_AUDIO_DESCRIPTION_BY_DEFAULT,
47         Settings.Secure.ENABLED_VR_LISTENERS,
48         Settings.Secure.TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES,
49         Settings.Secure.TOUCH_EXPLORATION_ENABLED,
50         Settings.Secure.ACCESSIBILITY_ENABLED,
51         Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE,
52         Settings.Secure.ACCESSIBILITY_BUTTON_TARGET_COMPONENT,
53         Settings.Secure.ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN,
54         Settings.Secure.ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN,
55         Settings.Secure.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED,
56         Settings.Secure.CONTRAST_LEVEL,
57         Settings.Secure.ACCESSIBILITY_CAPTIONING_PRESET,
58         Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED,
59         Settings.Secure.ACCESSIBILITY_CAPTIONING_LOCALE,
60         Settings.Secure.ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR,
61         Settings.Secure.ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR,
62         Settings.Secure.ACCESSIBILITY_CAPTIONING_EDGE_TYPE,
63         Settings.Secure.ACCESSIBILITY_CAPTIONING_EDGE_COLOR,
64         Settings.Secure.ACCESSIBILITY_CAPTIONING_TYPEFACE,
65         Settings.Secure.ACCESSIBILITY_CAPTIONING_FONT_SCALE,
66         Settings.Secure.ACCESSIBILITY_CAPTIONING_WINDOW_COLOR,
67         Settings.Secure.FONT_WEIGHT_ADJUSTMENT,
68         Settings.Secure.REDUCE_BRIGHT_COLORS_LEVEL,
69         Settings.Secure.REDUCE_BRIGHT_COLORS_PERSIST_ACROSS_REBOOTS,
70         Settings.Secure.TTS_DEFAULT_RATE,
71         Settings.Secure.TTS_DEFAULT_PITCH,
72         Settings.Secure.TTS_DEFAULT_SYNTH,
73         Settings.Secure.TTS_ENABLED_PLUGINS,
74         Settings.Secure.TTS_DEFAULT_LOCALE,
75         Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD,
76         Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,            // moved to global
77         Settings.Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,               // moved to global
78         Settings.Secure.WIFI_NUM_OPEN_NETWORKS_KEPT,                        // moved to global
79         Settings.Secure.MOUNT_PLAY_NOTIFICATION_SND,
80         Settings.Secure.MOUNT_UMS_AUTOSTART,
81         Settings.Secure.MOUNT_UMS_PROMPT,
82         Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED,
83         Settings.Secure.DOUBLE_TAP_TO_WAKE,
84         Settings.Secure.WAKE_GESTURE_ENABLED,
85         Settings.Secure.LONG_PRESS_TIMEOUT,
86         Settings.Secure.CAMERA_GESTURE_DISABLED,
87         Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED,
88         Settings.Secure.ACCESSIBILITY_AUTOCLICK_DELAY,
89         Settings.Secure.ACCESSIBILITY_LARGE_POINTER_ICON,
90         Settings.Secure.PREFERRED_TTY_MODE,
91         Settings.Secure.ENHANCED_VOICE_PRIVACY_ENABLED,
92         Settings.Secure.TTY_MODE_ENABLED,
93         Settings.Secure.RTT_CALLING_MODE,
94         Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR,
95         Settings.Secure.MINIMAL_POST_PROCESSING_ALLOWED,
96         Settings.Secure.MATCH_CONTENT_FRAME_RATE,
97         Settings.Secure.NIGHT_DISPLAY_CUSTOM_START_TIME,
98         Settings.Secure.NIGHT_DISPLAY_CUSTOM_END_TIME,
99         Settings.Secure.NIGHT_DISPLAY_COLOR_TEMPERATURE,
100         Settings.Secure.NIGHT_DISPLAY_AUTO_MODE,
101         Settings.Secure.DISPLAY_WHITE_BALANCE_ENABLED,
102         Settings.Secure.SYNC_PARENT_SOUNDS,
103         Settings.Secure.CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED,
104         Settings.Secure.CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED,
105         Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED,
106         Settings.Secure.QS_TILES,
107         Settings.Secure.QS_AUTO_ADDED_TILES,
108         Settings.Secure.CONTROLS_ENABLED,
109         Settings.Secure.POWER_MENU_LOCKED_SHOW_CONTENT,
110         Settings.Secure.DOZE_ENABLED,
111         Settings.Secure.DOZE_ALWAYS_ON,
112         Settings.Secure.DOZE_PICK_UP_GESTURE,
113         Settings.Secure.DOZE_DOUBLE_TAP_GESTURE,
114         Settings.Secure.DOZE_TAP_SCREEN_GESTURE,
115         Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT,
116         Settings.Secure.AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN,
117         Settings.Secure.FACE_UNLOCK_KEYGUARD_ENABLED,
118         Settings.Secure.SHOW_MEDIA_WHEN_BYPASSING,
119         Settings.Secure.FACE_UNLOCK_DISMISSES_KEYGUARD,
120         Settings.Secure.FACE_UNLOCK_APP_ENABLED,
121         Settings.Secure.FACE_UNLOCK_ALWAYS_REQUIRE_CONFIRMATION,
122         Settings.Secure.FINGERPRINT_SIDE_FPS_KG_POWER_WINDOW,
123         Settings.Secure.FINGERPRINT_SIDE_FPS_BP_POWER_WINDOW,
124         Settings.Secure.FINGERPRINT_SIDE_FPS_ENROLL_TAP_WINDOW,
125         Settings.Secure.FINGERPRINT_SIDE_FPS_AUTH_DOWNTIME,
126         Settings.Secure.SFPS_PERFORMANT_AUTH_ENABLED,
127         Settings.Secure.ACTIVE_UNLOCK_ON_WAKE,
128         Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT,
129         Settings.Secure.ACTIVE_UNLOCK_ON_BIOMETRIC_FAIL,
130         Settings.Secure.ACTIVE_UNLOCK_ON_FACE_ERRORS,
131         Settings.Secure.ACTIVE_UNLOCK_ON_FACE_ACQUIRE_INFO,
132         Settings.Secure.ACTIVE_UNLOCK_ON_UNLOCK_INTENT_WHEN_BIOMETRIC_ENROLLED,
133         Settings.Secure.ACTIVE_UNLOCK_WAKEUPS_CONSIDERED_UNLOCK_INTENTS,
134         Settings.Secure.ACTIVE_UNLOCK_WAKEUPS_TO_FORCE_DISMISS_KEYGUARD,
135         Settings.Secure.VR_DISPLAY_MODE,
136         Settings.Secure.NOTIFICATION_BADGING,
137         Settings.Secure.NOTIFICATION_DISMISS_RTL,
138         Settings.Secure.SCREENSAVER_ENABLED,
139         Settings.Secure.SCREENSAVER_COMPONENTS,
140         Settings.Secure.SCREENSAVER_ACTIVATE_ON_DOCK,
141         Settings.Secure.SCREENSAVER_ACTIVATE_ON_SLEEP,
142         Settings.Secure.SCREENSAVER_HOME_CONTROLS_ENABLED,
143         Settings.Secure.SHOW_FIRST_CRASH_DIALOG_DEV_OPTION,
144         Settings.Secure.VOLUME_HUSH_GESTURE,
145         Settings.Secure.MANUAL_RINGER_TOGGLE_COUNT,
146         Settings.Secure.LOW_POWER_WARNING_ACKNOWLEDGED,
147         Settings.Secure.EXTRA_LOW_POWER_WARNING_ACKNOWLEDGED,
148         Settings.Secure.HUSH_GESTURE_USED,
149         Settings.Secure.IN_CALL_NOTIFICATION_ENABLED,
150         Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS,
151         Settings.Secure.LOCK_SCREEN_CUSTOM_CLOCK_FACE,
152         Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS,
153         Settings.Secure.LOCK_SCREEN_SHOW_SILENT_NOTIFICATIONS,
154         Settings.Secure.LOCK_SCREEN_SHOW_ONLY_UNSEEN_NOTIFICATIONS,
155         Settings.Secure.SHOW_NOTIFICATION_SNOOZE,
156         Settings.Secure.NOTIFICATION_HISTORY_ENABLED,
157         Settings.Secure.ZEN_DURATION,
158         Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION,
159         Settings.Secure.SHOW_ZEN_SETTINGS_SUGGESTION,
160         Settings.Secure.ZEN_SETTINGS_UPDATED,
161         Settings.Secure.ZEN_SETTINGS_SUGGESTION_VIEWED,
162         Settings.Secure.CHARGING_SOUNDS_ENABLED,
163         Settings.Secure.CHARGING_VIBRATION_ENABLED,
164         Settings.Secure.ACCESSIBILITY_NON_INTERACTIVE_UI_TIMEOUT_MS,
165         Settings.Secure.ACCESSIBILITY_INTERACTIVE_UI_TIMEOUT_MS,
166         Settings.Secure.TRUST_AGENTS_EXTEND_UNLOCK,
167         Settings.Secure.UI_NIGHT_MODE,
168         Settings.Secure.UI_NIGHT_MODE_CUSTOM_TYPE,
169         Settings.Secure.DARK_THEME_CUSTOM_START_TIME,
170         Settings.Secure.DARK_THEME_CUSTOM_END_TIME,
171         Settings.Secure.LOCK_SCREEN_WHEN_TRUST_LOST,
172         Settings.Secure.SKIP_DIRECTION,
173         Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES,
174         Settings.Secure.BACK_GESTURE_INSET_SCALE_LEFT,
175         Settings.Secure.BACK_GESTURE_INSET_SCALE_RIGHT,
176         Settings.Secure.NAVIGATION_MODE,
177         Settings.Secure.TRACKPAD_GESTURE_BACK_ENABLED,
178         Settings.Secure.TRACKPAD_GESTURE_HOME_ENABLED,
179         Settings.Secure.TRACKPAD_GESTURE_OVERVIEW_ENABLED,
180         Settings.Secure.TRACKPAD_GESTURE_NOTIFICATION_ENABLED,
181         Settings.Secure.TRACKPAD_GESTURE_QUICK_SWITCH_ENABLED,
182         Settings.Secure.SKIP_GESTURE_COUNT,
183         Settings.Secure.SKIP_TOUCH_COUNT,
184         Settings.Secure.SILENCE_ALARMS_GESTURE_COUNT,
185         Settings.Secure.SILENCE_CALL_GESTURE_COUNT,
186         Settings.Secure.SILENCE_TIMER_GESTURE_COUNT,
187         Settings.Secure.SILENCE_ALARMS_TOUCH_COUNT,
188         Settings.Secure.SILENCE_CALL_TOUCH_COUNT,
189         Settings.Secure.SILENCE_TIMER_TOUCH_COUNT,
190         Settings.Secure.DARK_MODE_DIALOG_SEEN,
191         Settings.Secure.GLOBAL_ACTIONS_PANEL_ENABLED,
192         Settings.Secure.AWARE_LOCK_ENABLED,
193         Settings.Secure.AWARE_TAP_PAUSE_GESTURE_COUNT,
194         Settings.Secure.AWARE_TAP_PAUSE_TOUCH_COUNT,
195         Settings.Secure.PEOPLE_STRIP,
196         Settings.Secure.MEDIA_CONTROLS_RESUME,
197         Settings.Secure.MEDIA_CONTROLS_RECOMMENDATION,
198         Settings.Secure.MEDIA_CONTROLS_LOCK_SCREEN,
199         Settings.Secure.ACCESSIBILITY_MAGNIFICATION_MODE,
200         Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS,
201         Settings.Secure.ACCESSIBILITY_MAGNIFICATION_CAPABILITY,
202         Settings.Secure.ACCESSIBILITY_MAGNIFICATION_FOLLOW_TYPING_ENABLED,
203         Settings.Secure.ONE_HANDED_MODE_ACTIVATED,
204         Settings.Secure.ONE_HANDED_MODE_ENABLED,
205         Settings.Secure.ONE_HANDED_MODE_TIMEOUT,
206         Settings.Secure.TAPS_APP_TO_EXIT,
207         Settings.Secure.SWIPE_BOTTOM_TO_NOTIFICATION_ENABLED,
208         Settings.Secure.EMERGENCY_GESTURE_ENABLED,
209         Settings.Secure.EMERGENCY_GESTURE_SOUND_ENABLED,
210         Settings.Secure.ADAPTIVE_CONNECTIVITY_ENABLED,
211         Settings.Secure.ASSIST_HANDLES_LEARNING_TIME_ELAPSED_MILLIS,
212         Settings.Secure.ASSIST_HANDLES_LEARNING_EVENT_COUNT,
213         Settings.Secure.ACCESSIBILITY_BUTTON_MODE,
214         Settings.Secure.ACCESSIBILITY_FLOATING_MENU_SIZE,
215         Settings.Secure.ACCESSIBILITY_FLOATING_MENU_ICON_TYPE,
216         Settings.Secure.ACCESSIBILITY_FLOATING_MENU_OPACITY,
217         Settings.Secure.ACCESSIBILITY_FLOATING_MENU_FADE_ENABLED,
218         Settings.Secure.ACCESSIBILITY_MAGNIFICATION_ALWAYS_ON_ENABLED,
219         Settings.Secure.ACCESSIBILITY_MAGNIFICATION_JOYSTICK_ENABLED,
220         Settings.Secure.ODI_CAPTIONS_VOLUME_UI_ENABLED,
221         Settings.Secure.NOTIFICATION_BUBBLES,
222         Settings.Secure.LOCATION_TIME_ZONE_DETECTION_ENABLED,
223         Settings.Secure.LOCKSCREEN_SHOW_CONTROLS,
224         Settings.Secure.LOCKSCREEN_ALLOW_TRIVIAL_CONTROLS,
225         Settings.Secure.LOCKSCREEN_SHOW_WALLET,
226         Settings.Secure.LOCK_SCREEN_SHOW_QR_CODE_SCANNER,
227         Settings.Secure.LOCKSCREEN_USE_DOUBLE_LINE_CLOCK,
228         Settings.Secure.STATUS_BAR_SHOW_VIBRATE_ICON,
229         Settings.Secure.WEAR_TALKBACK_ENABLED,
230         Settings.Secure.HBM_SETTING_KEY,
231         Settings.Secure.ASSIST_TOUCH_GESTURE_ENABLED,
232         Settings.Secure.ASSIST_LONG_PRESS_HOME_ENABLED,
233         Settings.Secure.BLUETOOTH_LE_BROADCAST_PROGRAM_INFO,
234         Settings.Secure.BLUETOOTH_LE_BROADCAST_CODE,
235         Settings.Secure.BLUETOOTH_LE_BROADCAST_APP_SOURCE_NAME,
236         Settings.Secure.CUSTOM_BUGREPORT_HANDLER_APP,
237         Settings.Secure.CUSTOM_BUGREPORT_HANDLER_USER,
238         Settings.Secure.LOCK_SCREEN_WEATHER_ENABLED,
239         Settings.Secure.HEARING_AID_RINGTONE_ROUTING,
240         Settings.Secure.HEARING_AID_CALL_ROUTING,
241         Settings.Secure.HEARING_AID_MEDIA_ROUTING,
242         Settings.Secure.HEARING_AID_SYSTEM_SOUNDS_ROUTING,
243         Settings.Secure.ACCESSIBILITY_FONT_SCALING_HAS_BEEN_CHANGED,
244         Settings.Secure.SEARCH_PRESS_HOLD_NAV_HANDLE_ENABLED,
245         Settings.Secure.SEARCH_LONG_PRESS_HOME_ENABLED
246     };
247 }
248