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 whitelist 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.APPLY_RAMPING_RINGER, 42 Settings.Global.BUGREPORT_IN_POWER_MENU, 43 Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 44 Settings.Global.APP_AUTO_RESTRICTION_ENABLED, 45 Settings.Global.AUTO_TIME, 46 Settings.Global.AUTO_TIME_ZONE, 47 Settings.Global.POWER_SOUNDS_ENABLED, 48 Settings.Global.DOCK_SOUNDS_ENABLED, 49 Settings.Global.CHARGING_SOUNDS_ENABLED, 50 Settings.Global.USB_MASS_STORAGE_ENABLED, 51 Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED, 52 Settings.Global.NETWORK_AVOID_BAD_WIFI, 53 Settings.Global.WIFI_WAKEUP_ENABLED, 54 Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON, 55 Settings.Global.USE_OPEN_WIFI_PACKAGE, 56 Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED, 57 Settings.Global.EMERGENCY_TONE, 58 Settings.Global.CALL_AUTO_RETRY, 59 Settings.Global.DOCK_AUDIO_MEDIA_ENABLED, 60 Settings.Global.ENABLE_AUTOMATIC_SYSTEM_SERVER_HEAP_DUMPS, 61 Settings.Global.ENCODED_SURROUND_OUTPUT, 62 Settings.Global.ENCODED_SURROUND_OUTPUT_ENABLED_FORMATS, 63 Settings.Global.LOW_POWER_MODE_TRIGGER_LEVEL, 64 Settings.Global.LOW_POWER_MODE_STICKY_AUTO_DISABLE_ENABLED, 65 Settings.Global.LOW_POWER_MODE_STICKY_AUTO_DISABLE_LEVEL, 66 Settings.Global.BLUETOOTH_ON, 67 Settings.Global.PRIVATE_DNS_MODE, 68 Settings.Global.PRIVATE_DNS_SPECIFIER, 69 Settings.Global.SOFT_AP_TIMEOUT_ENABLED, 70 Settings.Global.ZEN_DURATION, 71 Settings.Global.CHARGING_VIBRATION_ENABLED, 72 Settings.Global.AWARE_ALLOWED, 73 Settings.Global.CUSTOM_BUGREPORT_HANDLER_APP, 74 Settings.Global.CUSTOM_BUGREPORT_HANDLER_USER, 75 Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, 76 Settings.Global.USER_DISABLED_HDR_FORMATS, 77 Settings.Global.ARE_USER_DISABLED_HDR_FORMATS_ALLOWED, 78 Settings.Global.DEVICE_CONFIG_SYNC_DISABLED, 79 Settings.Global.POWER_BUTTON_LONG_PRESS, 80 Settings.Global.AUTOMATIC_POWER_SAVE_MODE, 81 Settings.Global.ADVANCED_BATTERY_USAGE_AMOUNT, 82 Settings.Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED, 83 Settings.Global.POWER_BUTTON_LONG_PRESS_DURATION_MS, 84 Settings.Global.USER_PREFERRED_REFRESH_RATE, 85 Settings.Global.USER_PREFERRED_RESOLUTION_HEIGHT, 86 Settings.Global.USER_PREFERRED_RESOLUTION_WIDTH, 87 Settings.Global.POWER_BUTTON_LONG_PRESS 88 }; 89 } 90