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.provider.Settings; 20 21 /** Information related to the backup of Global settings */ 22 public class GlobalSettings { 23 24 /** 25 * These keys may be mentioned in the SETTINGS_TO_BACKUP arrays in SystemSettings 26 * and SecureSettings as well. This is because those tables drive both backup and 27 * restore, and restore needs to properly allowlist keys that used to live 28 * in those namespaces. 29 * 30 * NOTE: Settings are backed up and restored in the order they appear 31 * in this array. If you have one setting depending on another, 32 * make sure that they are ordered appropriately. 33 * 34 * NOTE: This table should only be used for settings which should be restored 35 * between different types of devices 36 * {@see #Settings.Secure.DEVICE_SPECIFIC_SETTINGS_TO_BACKUP} 37 * 38 * NOTE: All settings which are backed up should have a corresponding validator. 39 */ 40 public static final String[] SETTINGS_TO_BACKUP = { 41 Settings.Global.CONNECTED_APPS_ALLOWED_PACKAGES, 42 Settings.Global.CONNECTED_APPS_DISALLOWED_PACKAGES, 43 Settings.Global.APPLY_RAMPING_RINGER, 44 Settings.Global.BUGREPORT_IN_POWER_MENU, // moved to secure 45 Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 46 Settings.Global.APP_AUTO_RESTRICTION_ENABLED, 47 Settings.Global.AUTO_TIME, 48 Settings.Global.AUTO_TIME_ZONE, 49 Settings.Global.POWER_SOUNDS_ENABLED, 50 Settings.Global.DOCK_SOUNDS_ENABLED, 51 Settings.Global.CHARGING_SOUNDS_ENABLED, 52 Settings.Global.USB_MASS_STORAGE_ENABLED, 53 Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED, 54 Settings.Global.NETWORK_AVOID_BAD_WIFI, 55 Settings.Global.WIFI_WAKEUP_ENABLED, 56 Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, 57 Settings.Global.USE_OPEN_WIFI_PACKAGE, 58 Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, 59 Settings.Global.EMERGENCY_TONE, 60 Settings.Global.CALL_AUTO_RETRY, 61 Settings.Global.DOCK_AUDIO_MEDIA_ENABLED, 62 Settings.Global.ENABLE_AUTOMATIC_SYSTEM_SERVER_HEAP_DUMPS, 63 Settings.Global.ENCODED_SURROUND_OUTPUT, 64 Settings.Global.ENCODED_SURROUND_OUTPUT_ENABLED_FORMATS, 65 Settings.Global.LOW_POWER_MODE_REMINDER_ENABLED, 66 Settings.Global.LOW_POWER_MODE_TRIGGER_LEVEL, 67 Settings.Global.LOW_POWER_MODE_STICKY_AUTO_DISABLE_ENABLED, 68 Settings.Global.LOW_POWER_MODE_STICKY_AUTO_DISABLE_LEVEL, 69 Settings.Global.BLUETOOTH_ON, 70 Settings.Global.PRIVATE_DNS_MODE, 71 Settings.Global.PRIVATE_DNS_SPECIFIER, 72 Settings.Global.SOFT_AP_TIMEOUT_ENABLED, 73 Settings.Global.ZEN_DURATION, 74 Settings.Global.MUTE_ALARM_STREAM_WITH_RINGER_MODE_USER_PREFERENCE, 75 Settings.Global.REVERSE_CHARGING_AUTO_ON, 76 Settings.Global.CHARGING_VIBRATION_ENABLED, 77 Settings.Global.AWARE_ALLOWED, 78 Settings.Global.CUSTOM_BUGREPORT_HANDLER_APP, // moved to secure 79 Settings.Global.CUSTOM_BUGREPORT_HANDLER_USER, // moved to secure 80 Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 81 Settings.Global.USER_DISABLED_HDR_FORMATS, 82 Settings.Global.ARE_USER_DISABLED_HDR_FORMATS_ALLOWED, 83 Settings.Global.DEVICE_CONFIG_SYNC_DISABLED, 84 Settings.Global.POWER_BUTTON_LONG_PRESS, 85 Settings.Global.AUTOMATIC_POWER_SAVE_MODE, 86 Settings.Global.ADVANCED_BATTERY_USAGE_AMOUNT, 87 Settings.Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED, 88 Settings.Global.POWER_BUTTON_LONG_PRESS_DURATION_MS, 89 Settings.Global.USER_PREFERRED_REFRESH_RATE, 90 Settings.Global.USER_PREFERRED_RESOLUTION_HEIGHT, 91 Settings.Global.USER_PREFERRED_RESOLUTION_WIDTH, 92 Settings.Global.POWER_BUTTON_LONG_PRESS, 93 Settings.Global.RECEIVE_EXPLICIT_USER_INTERACTION_AUDIO_ENABLED, 94 Settings.Global.Wearable.SMART_REPLIES_ENABLED, 95 Settings.Global.Wearable.CLOCKWORK_AUTO_TIME, 96 Settings.Global.Wearable.CLOCKWORK_AUTO_TIME_ZONE, 97 Settings.Global.Wearable.CLOCKWORK_24HR_TIME, 98 Settings.Global.Wearable.CONSISTENT_NOTIFICATION_BLOCKING_ENABLED, 99 Settings.Global.Wearable.MUTE_WHEN_OFF_BODY_ENABLED, 100 Settings.Global.Wearable.AMBIENT_ENABLED, 101 Settings.Global.Wearable.AMBIENT_TILT_TO_WAKE, 102 Settings.Global.Wearable.AMBIENT_TOUCH_TO_WAKE, 103 Settings.Global.Wearable.GESTURE_TOUCH_AND_HOLD_WATCH_FACE_ENABLED, 104 Settings.Global.Wearable.WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_MS, 105 Settings.Global.Wearable.WEAR_ACTIVITY_AUTO_RESUME_TIMEOUT_SET_BY_USER, 106 Settings.Global.Wearable.DYNAMIC_COLOR_THEME_ENABLED, 107 Settings.Global.Wearable.UPGRADE_DATA_MIGRATION_STATUS, 108 Settings.Global.HDR_CONVERSION_MODE, 109 Settings.Global.HDR_FORCE_CONVERSION_TYPE, 110 Settings.Global.Wearable.RTL_SWIPE_TO_DISMISS_ENABLED_DEV, 111 Settings.Global.Wearable.REDUCE_MOTION, 112 Settings.Global.Wearable.WEAR_LAUNCHER_UI_MODE, 113 Settings.Global.Wearable.USER_HFP_CLIENT_SETTING, 114 Settings.Global.Wearable.RSB_WAKE_ENABLED, 115 Settings.Global.Wearable.SCREENSHOT_ENABLED, 116 Settings.Global.Wearable.SCREEN_UNLOCK_SOUND_ENABLED, 117 Settings.Global.Wearable.CHARGING_SOUNDS_ENABLED, 118 Settings.Global.Wearable.WRIST_DETECTION_AUTO_LOCKING_ENABLED, 119 Settings.Global.Wearable.AUTO_BEDTIME_MODE, 120 Settings.Global.FORCE_ENABLE_PSS_PROFILING, 121 Settings.Global.Wearable.ACCESSIBILITY_VIBRATION_WATCH_ENABLED, 122 Settings.Global.Wearable.ACCESSIBILITY_VIBRATION_WATCH_TYPE, 123 Settings.Global.Wearable.ACCESSIBILITY_VIBRATION_WATCH_SPEED, 124 Settings.Global.ADD_USERS_WHEN_LOCKED, 125 Settings.Global.REMOVE_GUEST_ON_EXIT, 126 Settings.Global.USER_SWITCHER_ENABLED, 127 }; 128 } 129