Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 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; |
| 18 | |
| 19 | import static com.google.android.collect.Sets.newHashSet; |
Ajay Dudani | bcfcd6c | 2018-02-05 10:44:27 -0800 | [diff] [blame] | 20 | |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 21 | import static org.hamcrest.MatcherAssert.assertThat; |
| 22 | import static org.hamcrest.Matchers.empty; |
| 23 | import static org.hamcrest.Matchers.is; |
Ajay Dudani | bcfcd6c | 2018-02-05 10:44:27 -0800 | [diff] [blame] | 24 | |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 25 | import static java.lang.reflect.Modifier.isFinal; |
| 26 | import static java.lang.reflect.Modifier.isPublic; |
| 27 | import static java.lang.reflect.Modifier.isStatic; |
| 28 | |
Bryan Mawhinney | bdee0d4 | 2017-11-24 16:12:08 +0000 | [diff] [blame] | 29 | import android.platform.test.annotations.Presubmit; |
Bryan Mawhinney | 24a2ae5 | 2017-01-31 11:18:50 +0000 | [diff] [blame] | 30 | import android.support.test.filters.SmallTest; |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 31 | import android.support.test.runner.AndroidJUnit4; |
| 32 | |
Julia Reynolds | b852e56 | 2017-06-06 16:14:18 -0400 | [diff] [blame] | 33 | import org.junit.Test; |
| 34 | import org.junit.runner.RunWith; |
| 35 | |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 36 | import java.lang.reflect.Field; |
| 37 | import java.util.HashSet; |
| 38 | import java.util.Set; |
| 39 | |
Bryan Mawhinney | 2c5f95a | 2017-02-21 10:58:23 +0000 | [diff] [blame] | 40 | /** Tests that ensure appropriate settings are backed up. */ |
Bryan Mawhinney | bdee0d4 | 2017-11-24 16:12:08 +0000 | [diff] [blame] | 41 | @Presubmit |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 42 | @RunWith(AndroidJUnit4.class) |
Bryan Mawhinney | 24a2ae5 | 2017-01-31 11:18:50 +0000 | [diff] [blame] | 43 | @SmallTest |
Bryan Mawhinney | 2c5f95a | 2017-02-21 10:58:23 +0000 | [diff] [blame] | 44 | public class SettingsBackupTest { |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 45 | |
| 46 | /** |
Salvador Martinez | bb902fc | 2018-01-22 19:46:55 -0800 | [diff] [blame] | 47 | * see {@link com.google.android.systemui.power.EnhancedEstimatesGoogleImpl} for more details |
| 48 | */ |
| 49 | public static final String HYBRID_SYSUI_BATTERY_WARNING_FLAGS = |
| 50 | "hybrid_sysui_battery_warning_flags"; |
| 51 | |
| 52 | /** |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 53 | * The following blacklists contain settings that should *not* be backed up and restored to |
| 54 | * another device. As a general rule, anything that is not user configurable should be |
| 55 | * blacklisted (and conversely, things that *are* user configurable *should* be backed up) |
| 56 | */ |
| 57 | private static final Set<String> BACKUP_BLACKLISTED_SYSTEM_SETTINGS = |
| 58 | newHashSet( |
| 59 | Settings.System.ADVANCED_SETTINGS, // candidate for backup? |
| 60 | Settings.System.ALARM_ALERT, // backup candidate? |
| 61 | Settings.System.ALARM_ALERT_CACHE, // internal cache |
| 62 | Settings.System.APPEND_FOR_LAST_AUDIBLE, // suffix deprecated since API 2 |
| 63 | Settings.System.EGG_MODE, // I am the lolrus |
| 64 | Settings.System.END_BUTTON_BEHAVIOR, // bug? |
| 65 | Settings.System |
| 66 | .HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY, // candidate for backup? |
| 67 | Settings.System.LOCKSCREEN_DISABLED, // ? |
| 68 | Settings.System.MEDIA_BUTTON_RECEIVER, // candidate for backup? |
| 69 | Settings.System.MUTE_STREAMS_AFFECTED, // candidate for backup? |
| 70 | Settings.System.NOTIFICATION_LIGHT_PULSE, // candidate for backup? |
| 71 | Settings.System.NOTIFICATION_SOUND_CACHE, // internal cache |
| 72 | Settings.System.POINTER_LOCATION, // backup candidate? |
Tyler Gunn | 37ce669 | 2018-03-12 14:31:45 -0700 | [diff] [blame] | 73 | Settings.System.DEBUG_ENABLE_ENHANCED_CALL_BLOCKING, // used for testing only |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 74 | Settings.System.RINGTONE_CACHE, // internal cache |
Annie Meng | aeeb24e | 2018-04-05 18:49:52 +0100 | [diff] [blame] | 75 | Settings.System.SCREEN_BRIGHTNESS, // removed in P |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 76 | Settings.System.SETUP_WIZARD_HAS_RUN, // Only used by SuW |
| 77 | Settings.System.SHOW_GTALK_SERVICE_STATUS, // candidate for backup? |
| 78 | Settings.System.SHOW_TOUCHES, // bug? |
| 79 | Settings.System.SIP_ADDRESS_ONLY, // value, not a setting |
| 80 | Settings.System.SIP_ALWAYS, // value, not a setting |
| 81 | Settings.System.SYSTEM_LOCALES, // bug? |
| 82 | Settings.System.USER_ROTATION, // backup candidate? |
| 83 | Settings.System.VIBRATE_IN_SILENT, // deprecated? |
| 84 | Settings.System.VIBRATE_ON, // candidate for backup? |
Michal Karpinski | 034a83f | 2017-04-26 19:25:25 +0100 | [diff] [blame] | 85 | Settings.System.VOLUME_ACCESSIBILITY, // used internally, changing value will |
| 86 | // not change volume |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 87 | Settings.System.VOLUME_ALARM, // deprecated since API 2? |
| 88 | Settings.System.VOLUME_BLUETOOTH_SCO, // deprecated since API 2? |
| 89 | Settings.System.VOLUME_MASTER, // candidate for backup? |
| 90 | Settings.System.VOLUME_MUSIC, // deprecated since API 2? |
| 91 | Settings.System.VOLUME_NOTIFICATION, // deprecated since API 2? |
| 92 | Settings.System.VOLUME_RING, // deprecated since API 2? |
| 93 | Settings.System.VOLUME_SYSTEM, // deprecated since API 2? |
| 94 | Settings.System.VOLUME_VOICE, // deprecated since API 2? |
| 95 | Settings.System.WHEN_TO_MAKE_WIFI_CALLS, // bug? |
| 96 | Settings.System.WINDOW_ORIENTATION_LISTENER_LOG // used for debugging only |
| 97 | ); |
| 98 | |
| 99 | private static final Set<String> BACKUP_BLACKLISTED_GLOBAL_SETTINGS = |
| 100 | newHashSet( |
Bryan Mawhinney | 24a2ae5 | 2017-01-31 11:18:50 +0000 | [diff] [blame] | 101 | Settings.Global.ACTIVITY_MANAGER_CONSTANTS, |
Michal Karpinski | 3eab951 | 2018-07-20 15:32:00 +0100 | [diff] [blame] | 102 | Settings.Global.ACTIVITY_STARTS_LOGGING_ENABLED, |
Lei Yu | 4b976ad | 2018-04-19 10:38:58 -0700 | [diff] [blame] | 103 | Settings.Global.ADAPTIVE_BATTERY_MANAGEMENT_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 104 | Settings.Global.ADB_ENABLED, |
| 105 | Settings.Global.ADD_USERS_WHEN_LOCKED, |
| 106 | Settings.Global.AIRPLANE_MODE_ON, |
| 107 | Settings.Global.AIRPLANE_MODE_RADIOS, |
| 108 | Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS, |
| 109 | Settings.Global.ALARM_MANAGER_CONSTANTS, |
| 110 | Settings.Global.ALLOW_USER_SWITCHING_WHEN_SYSTEM_USER_LOCKED, |
| 111 | Settings.Global.ALWAYS_FINISH_ACTIVITIES, |
jackqdyulei | 8443dd0 | 2017-08-24 16:14:34 -0700 | [diff] [blame] | 112 | Settings.Global.ALWAYS_ON_DISPLAY_CONSTANTS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 113 | Settings.Global.ANIMATOR_DURATION_SCALE, |
Bryan Mawhinney | 99d8980 | 2017-06-28 16:22:39 +0100 | [diff] [blame] | 114 | Settings.Global.ANOMALY_DETECTION_CONSTANTS, |
jackqdyulei | fa81bee | 2018-02-01 11:16:23 -0800 | [diff] [blame] | 115 | Settings.Global.ANOMALY_CONFIG, |
| 116 | Settings.Global.ANOMALY_CONFIG_VERSION, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 117 | Settings.Global.APN_DB_UPDATE_CONTENT_URL, |
| 118 | Settings.Global.APN_DB_UPDATE_METADATA_URL, |
| 119 | Settings.Global.APP_IDLE_CONSTANTS, |
Dianne Hackborn | 65a4f25 | 2018-05-08 17:30:48 -0700 | [diff] [blame] | 120 | Settings.Global.APP_OPS_CONSTANTS, |
Amith Yamasani | 172612c | 2017-12-15 10:51:53 -0800 | [diff] [blame] | 121 | Settings.Global.APP_STANDBY_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 122 | Settings.Global.ASSISTED_GPS_ENABLED, |
| 123 | Settings.Global.AUDIO_SAFE_VOLUME_STATE, |
Felipe Leme | fd4003b | 2018-03-20 17:12:17 -0700 | [diff] [blame] | 124 | Settings.Global.AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 125 | Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD, |
| 126 | Settings.Global.BATTERY_DISCHARGE_THRESHOLD, |
Bryan Mawhinney | c41f2a4 | 2017-11-24 13:44:48 +0000 | [diff] [blame] | 127 | Settings.Global.BATTERY_SAVER_DEVICE_SPECIFIC_CONSTANTS, |
Sudheer Shanka | 5c19b89 | 2018-01-05 17:25:46 -0800 | [diff] [blame] | 128 | Settings.Global.BATTERY_STATS_CONSTANTS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 129 | Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE, |
Jeremy Klein | 45a9b5d | 2018-01-10 18:01:46 -0800 | [diff] [blame] | 130 | Settings.Global.BLE_SCAN_LOW_POWER_WINDOW_MS, |
| 131 | Settings.Global.BLE_SCAN_LOW_POWER_INTERVAL_MS, |
| 132 | Settings.Global.BLE_SCAN_BALANCED_WINDOW_MS, |
| 133 | Settings.Global.BLE_SCAN_BALANCED_INTERVAL_MS, |
| 134 | Settings.Global.BLE_SCAN_LOW_LATENCY_WINDOW_MS, |
| 135 | Settings.Global.BLE_SCAN_LOW_LATENCY_INTERVAL_MS, |
Anthony Stange | c97870a | 2018-03-14 01:09:45 +0000 | [diff] [blame] | 136 | Settings.Global.BLE_SCAN_BACKGROUND_MODE, |
Matthew Fritze | 640821b | 2018-05-21 14:42:36 -0700 | [diff] [blame] | 137 | Settings.Global.BLOCKED_SLICES, |
Rohan Shah | 0350dab | 2018-05-04 13:42:18 -0700 | [diff] [blame] | 138 | Settings.Global.BLOCKING_HELPER_DISMISS_TO_VIEW_RATIO_LIMIT, |
| 139 | Settings.Global.BLOCKING_HELPER_STREAK_LIMIT, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 140 | Settings.Global.BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX, |
| 141 | Settings.Global.BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX, |
Antony Sargent | f5772c6 | 2017-04-26 16:37:53 -0700 | [diff] [blame] | 142 | Settings.Global.BLUETOOTH_A2DP_SUPPORTS_OPTIONAL_CODECS_PREFIX, |
| 143 | Settings.Global.BLUETOOTH_A2DP_OPTIONAL_CODECS_ENABLED_PREFIX, |
Bryan Mawhinney | c41f2a4 | 2017-11-24 13:44:48 +0000 | [diff] [blame] | 144 | Settings.Global.BLUETOOTH_CLASS_OF_DEVICE, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 145 | Settings.Global.BLUETOOTH_DISABLED_PROFILES, |
| 146 | Settings.Global.BLUETOOTH_HEADSET_PRIORITY_PREFIX, |
| 147 | Settings.Global.BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX, |
| 148 | Settings.Global.BLUETOOTH_INTEROPERABILITY_LIST, |
| 149 | Settings.Global.BLUETOOTH_MAP_CLIENT_PRIORITY_PREFIX, |
| 150 | Settings.Global.BLUETOOTH_MAP_PRIORITY_PREFIX, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 151 | Settings.Global.BLUETOOTH_PAN_PRIORITY_PREFIX, |
| 152 | Settings.Global.BLUETOOTH_PBAP_CLIENT_PRIORITY_PREFIX, |
| 153 | Settings.Global.BLUETOOTH_SAP_PRIORITY_PREFIX, |
Jakub Pawlowski | c2d7be6 | 2017-11-22 10:57:42 -0800 | [diff] [blame] | 154 | Settings.Global.BLUETOOTH_HEARING_AID_PRIORITY_PREFIX, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 155 | Settings.Global.BOOT_COUNT, |
| 156 | Settings.Global.CAPTIVE_PORTAL_FALLBACK_URL, |
| 157 | Settings.Global.CAPTIVE_PORTAL_HTTPS_URL, |
| 158 | Settings.Global.CAPTIVE_PORTAL_HTTP_URL, |
| 159 | Settings.Global.CAPTIVE_PORTAL_MODE, |
Michal Karpinski | 034a83f | 2017-04-26 19:25:25 +0100 | [diff] [blame] | 160 | Settings.Global.CAPTIVE_PORTAL_OTHER_FALLBACK_URLS, |
Remi NGUYEN VAN | 8255c2d | 2018-05-22 10:01:53 +0900 | [diff] [blame] | 161 | Settings.Global.CAPTIVE_PORTAL_FALLBACK_PROBE_SPECS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 162 | Settings.Global.CAPTIVE_PORTAL_SERVER, |
| 163 | Settings.Global.CAPTIVE_PORTAL_USE_HTTPS, |
| 164 | Settings.Global.CAPTIVE_PORTAL_USER_AGENT, |
| 165 | Settings.Global.CAR_DOCK_SOUND, |
| 166 | Settings.Global.CARRIER_APP_WHITELIST, |
goneil | 15f5a7e | 2018-02-16 17:33:56 -0800 | [diff] [blame] | 167 | Settings.Global.CARRIER_APP_NAMES, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 168 | Settings.Global.CAR_UNDOCK_SOUND, |
| 169 | Settings.Global.CDMA_CELL_BROADCAST_SMS, |
| 170 | Settings.Global.CDMA_ROAMING_MODE, |
| 171 | Settings.Global.CDMA_SUBSCRIPTION_MODE, |
| 172 | Settings.Global.CELL_ON, |
| 173 | Settings.Global.CERT_PIN_UPDATE_CONTENT_URL, |
| 174 | Settings.Global.CERT_PIN_UPDATE_METADATA_URL, |
| 175 | Settings.Global.COMPATIBILITY_MODE, |
| 176 | Settings.Global.CONNECTIVITY_CHANGE_DELAY, |
| 177 | Settings.Global.CONNECTIVITY_METRICS_BUFFER_SIZE, |
| 178 | Settings.Global.CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS, |
| 179 | Settings.Global.CONTACT_METADATA_SYNC_ENABLED, |
| 180 | Settings.Global.CONTACTS_DATABASE_WAL_ENABLED, |
Alice Sheng | 59a9488 | 2018-03-19 23:46:56 +0000 | [diff] [blame] | 181 | Settings.Global.CPU_SCALING_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 182 | Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE, |
| 183 | Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI, |
Amith Yamasani | 3945202 | 2017-03-21 15:23:47 -0700 | [diff] [blame] | 184 | Settings.Global.DATABASE_CREATION_BUILDID, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 185 | Settings.Global.DATABASE_DOWNGRADE_REASON, |
| 186 | Settings.Global.DATA_ROAMING, |
| 187 | Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS, |
| 188 | Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS, |
Chiachang Wang | 7a70a7e | 2018-11-27 18:00:05 +0800 | [diff] [blame] | 189 | Settings.Global.DATA_STALL_CONSECUTIVE_DNS_TIMEOUT_THRESHOLD, |
| 190 | Settings.Global.DATA_STALL_EVALUATION_TYPE, |
| 191 | Settings.Global.DATA_STALL_MIN_EVALUATE_INTERVAL, |
Jayachandran C | 8ef41bf | 2018-12-06 11:12:07 -0800 | [diff] [blame] | 192 | Settings.Global.DATA_STALL_RECOVERY_ON_BAD_NETWORK, |
Chiachang Wang | 7a70a7e | 2018-11-27 18:00:05 +0800 | [diff] [blame] | 193 | Settings.Global.DATA_STALL_VALID_DNS_TIME_THRESHOLD, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 194 | Settings.Global.DEBUG_APP, |
| 195 | Settings.Global.DEBUG_VIEW_ATTRIBUTES, |
| 196 | Settings.Global.DEFAULT_DNS_SERVER, |
| 197 | Settings.Global.DEFAULT_INSTALL_LOCATION, |
Narayan Kamath | 94bcdbc | 2017-07-17 15:32:53 +0100 | [diff] [blame] | 198 | Settings.Global.DEFAULT_RESTRICT_BACKGROUND_DATA, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 199 | Settings.Global.DESK_DOCK_SOUND, |
| 200 | Settings.Global.DESK_UNDOCK_SOUND, |
| 201 | Settings.Global.DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT, |
| 202 | Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES, |
| 203 | Settings.Global.DEVELOPMENT_FORCE_RTL, |
| 204 | Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, |
| 205 | Settings.Global.DEVICE_DEMO_MODE, |
| 206 | Settings.Global.DEVICE_IDLE_CONSTANTS, |
jackqdyulei | 455e90a | 2017-02-09 15:29:16 -0800 | [diff] [blame] | 207 | Settings.Global.BATTERY_SAVER_CONSTANTS, |
jackqdyulei | 29f91ea | 2017-12-13 15:01:43 -0800 | [diff] [blame] | 208 | Settings.Global.BATTERY_TIP_CONSTANTS, |
Bryan Mawhinney | 99d8980 | 2017-06-28 16:22:39 +0100 | [diff] [blame] | 209 | Settings.Global.DEFAULT_SM_DP_PLUS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 210 | Settings.Global.DEVICE_NAME, |
Bryan Mawhinney | 2092484 | 2017-05-11 12:50:14 +0100 | [diff] [blame] | 211 | Settings.Global.DEVICE_POLICY_CONSTANTS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 212 | Settings.Global.DEVICE_PROVISIONED, |
| 213 | Settings.Global.DEVICE_PROVISIONING_MOBILE_DATA_ENABLED, |
| 214 | Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD, |
Ajay Dudani | bcfcd6c | 2018-02-05 10:44:27 -0800 | [diff] [blame] | 215 | Settings.Global.DISPLAY_PANEL_LPM, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 216 | Settings.Global.DISPLAY_SCALING_FORCE, |
| 217 | Settings.Global.DISPLAY_SIZE_FORCED, |
| 218 | Settings.Global.DNS_RESOLVER_MAX_SAMPLES, |
| 219 | Settings.Global.DNS_RESOLVER_MIN_SAMPLES, |
| 220 | Settings.Global.DNS_RESOLVER_SAMPLE_VALIDITY_SECONDS, |
| 221 | Settings.Global.DNS_RESOLVER_SUCCESS_THRESHOLD_PERCENT, |
| 222 | Settings.Global.DOCK_SOUNDS_ENABLED_WHEN_ACCESSIBILITY, |
| 223 | Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE, |
| 224 | Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE, |
| 225 | Settings.Global.DROPBOX_AGE_SECONDS, |
| 226 | Settings.Global.DROPBOX_MAX_FILES, |
| 227 | Settings.Global.DROPBOX_QUOTA_KB, |
| 228 | Settings.Global.DROPBOX_QUOTA_PERCENT, |
| 229 | Settings.Global.DROPBOX_RESERVE_PERCENT, |
| 230 | Settings.Global.DROPBOX_TAG_PREFIX, |
| 231 | Settings.Global.EMERGENCY_AFFORDANCE_NEEDED, |
Adrian Roos | 000cf5e | 2017-11-10 15:55:18 +0100 | [diff] [blame] | 232 | Settings.Global.EMULATE_DISPLAY_CUTOUT, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 233 | Settings.Global.ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED, |
Daniel Nishi | 0f703e6 | 2017-02-21 15:19:27 -0800 | [diff] [blame] | 234 | Settings.Global.ENABLE_CACHE_QUOTA_CALCULATION, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 235 | Settings.Global.ENABLE_CELLULAR_ON_BOOT, |
Bryan Mawhinney | 99d8980 | 2017-06-28 16:22:39 +0100 | [diff] [blame] | 236 | Settings.Global.ENABLE_DELETION_HELPER_NO_THRESHOLD_TOGGLE, |
Bryan Mawhinney | 24a2ae5 | 2017-01-31 11:18:50 +0000 | [diff] [blame] | 237 | Settings.Global.ENABLE_DISKSTATS_LOGGING, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 238 | Settings.Global.ENABLE_EPHEMERAL_FEATURE, |
Petr Cermak | 10011fa | 2018-02-05 19:00:54 +0000 | [diff] [blame] | 239 | Settings.Global.SMART_REPLIES_IN_NOTIFICATIONS_FLAGS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 240 | Settings.Global.ENHANCED_4G_MODE_ENABLED, |
| 241 | Settings.Global.EPHEMERAL_COOKIE_MAX_SIZE_BYTES, |
| 242 | Settings.Global.ERROR_LOGCAT_PREFIX, |
Bryan Mawhinney | 99d8980 | 2017-06-28 16:22:39 +0100 | [diff] [blame] | 243 | Settings.Global.EUICC_PROVISIONED, |
Qingxi Li | ead1271 | 2018-04-11 15:14:56 -0700 | [diff] [blame] | 244 | Settings.Global.EUICC_SUPPORTED_COUNTRIES, |
qingxi | 2f23151 | 2017-06-23 15:32:53 -0700 | [diff] [blame] | 245 | Settings.Global.EUICC_FACTORY_RESET_TIMEOUT_MILLIS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 246 | Settings.Global.FANCY_IME_ANIMATIONS, |
| 247 | Settings.Global.FORCE_ALLOW_ON_EXTERNAL, |
Suprabh Shukla | 4deb852 | 2018-01-08 16:27:10 -0800 | [diff] [blame] | 248 | Settings.Global.FORCED_APP_STANDBY_ENABLED, |
Nancy Zheng | 525aaa1 | 2018-01-12 11:45:37 -0800 | [diff] [blame] | 249 | Settings.Global.FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED, |
yuanlu | b6b0495 | 2018-02-20 14:28:13 -0800 | [diff] [blame] | 250 | Settings.Global.WIFI_ON_WHEN_PROXY_DISCONNECTED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 251 | Settings.Global.FSTRIM_MANDATORY_INTERVAL, |
| 252 | Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST, |
| 253 | Settings.Global.GLOBAL_HTTP_PROXY_HOST, |
| 254 | Settings.Global.GLOBAL_HTTP_PROXY_PAC, |
| 255 | Settings.Global.GLOBAL_HTTP_PROXY_PORT, |
Yu-Han Yang | ab3e7bd | 2018-04-06 10:23:28 -0700 | [diff] [blame] | 256 | Settings.Global.GNSS_HAL_LOCATION_REQUEST_DURATION_MILLIS, |
Yu-Han Yang | 66c7ea9 | 2018-03-11 17:17:15 -0700 | [diff] [blame] | 257 | Settings.Global.GNSS_SATELLITE_BLACKLIST, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 258 | Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS, |
| 259 | Settings.Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED, |
| 260 | Settings.Global.HDMI_CONTROL_AUTO_WAKEUP_ENABLED, |
| 261 | Settings.Global.HDMI_CONTROL_ENABLED, |
Donghyun Cho | c1fa9af | 2016-12-27 18:31:09 +0900 | [diff] [blame] | 262 | Settings.Global.HDMI_SYSTEM_AUDIO_CONTROL_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 263 | Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED, |
Mathew Inwood | 04194fe | 2018-04-04 14:48:03 +0100 | [diff] [blame] | 264 | Settings.Global.HIDDEN_API_ACCESS_LOG_SAMPLING_RATE, |
David Brazdil | df1c7dc | 2018-10-26 16:23:59 +0100 | [diff] [blame] | 265 | Settings.Global.HIDDEN_API_POLICY, |
Dianne Hackborn | 82b17ca | 2018-04-06 16:00:08 -0700 | [diff] [blame] | 266 | Settings.Global.HIDE_ERROR_DIALOGS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 267 | Settings.Global.HTTP_PROXY, |
Salvador Martinez | bb902fc | 2018-01-22 19:46:55 -0800 | [diff] [blame] | 268 | HYBRID_SYSUI_BATTERY_WARNING_FLAGS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 269 | Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY, |
| 270 | Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY, |
Bryan Mawhinney | 99d8980 | 2017-06-28 16:22:39 +0100 | [diff] [blame] | 271 | Settings.Global.INSTANT_APP_DEXOPT_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 272 | Settings.Global.INTENT_FIREWALL_UPDATE_CONTENT_URL, |
| 273 | Settings.Global.INTENT_FIREWALL_UPDATE_METADATA_URL, |
| 274 | Settings.Global.JOB_SCHEDULER_CONSTANTS, |
Robin Lee | 81ad972 | 2018-01-19 16:34:31 +0100 | [diff] [blame] | 275 | Settings.Global.KEEP_PROFILE_IN_BACKGROUND, |
Michal Karpinski | 034a83f | 2017-04-26 19:25:25 +0100 | [diff] [blame] | 276 | Settings.Global.LANG_ID_UPDATE_CONTENT_URL, |
| 277 | Settings.Global.LANG_ID_UPDATE_METADATA_URL, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 278 | Settings.Global.LOCATION_BACKGROUND_THROTTLE_INTERVAL_MS, |
Lifu Tang | c94ef4d | 2017-03-23 23:48:00 -0700 | [diff] [blame] | 279 | Settings.Global.LOCATION_BACKGROUND_THROTTLE_PROXIMITY_ALERT_INTERVAL_MS, |
Bryan Mawhinney | 24a2ae5 | 2017-01-31 11:18:50 +0000 | [diff] [blame] | 280 | Settings.Global.LOCATION_BACKGROUND_THROTTLE_PACKAGE_WHITELIST, |
Makoto Onuki | 0000d32 | 2017-11-28 16:31:47 -0800 | [diff] [blame] | 281 | Settings.Global.LOCATION_GLOBAL_KILL_SWITCH, |
Bryan Mawhinney | 24a2ae5 | 2017-01-31 11:18:50 +0000 | [diff] [blame] | 282 | Settings.Global.LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 283 | Settings.Global.LOCK_SOUND, |
| 284 | Settings.Global.LOW_BATTERY_SOUND, |
| 285 | Settings.Global.LOW_BATTERY_SOUND_TIMEOUT, |
| 286 | Settings.Global.LOW_POWER_MODE, |
Makoto Onuki | 524b4dfe | 2018-03-06 17:34:15 -0800 | [diff] [blame] | 287 | Settings.Global.LOW_POWER_MODE_TRIGGER_LEVEL_MAX, |
Makoto Onuki | a3cd7b9 | 2018-03-19 14:47:05 -0700 | [diff] [blame] | 288 | Settings.Global.LOW_POWER_MODE_STICKY, |
Makoto Onuki | bc064d4b | 2018-03-27 14:48:42 -0700 | [diff] [blame] | 289 | Settings.Global.LOW_POWER_MODE_SUGGESTION_PARAMS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 290 | Settings.Global.LTE_SERVICE_FORCED, |
| 291 | Settings.Global.MAX_NOTIFICATION_ENQUEUE_RATE, |
Philip P. Moltmann | 7e25b3d | 2018-03-09 20:22:58 -0800 | [diff] [blame] | 292 | Settings.Global.MAX_SOUND_TRIGGER_DETECTION_SERVICE_OPS_PER_DAY, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 293 | Settings.Global.MDC_INITIAL_MAX_RETRY, |
| 294 | Settings.Global.MHL_INPUT_SWITCHING_ENABLED, |
| 295 | Settings.Global.MHL_POWER_CHARGE_ENABLED, |
Jayachandran C | 8ef41bf | 2018-12-06 11:12:07 -0800 | [diff] [blame] | 296 | Settings.Global.MIN_DURATION_BETWEEN_RECOVERY_STEPS_IN_MS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 297 | Settings.Global.MOBILE_DATA, // Candidate for backup? |
| 298 | Settings.Global.MOBILE_DATA_ALWAYS_ON, |
| 299 | Settings.Global.MODE_RINGER, |
| 300 | Settings.Global.MULTI_SIM_DATA_CALL_SUBSCRIPTION, |
| 301 | Settings.Global.MULTI_SIM_SMS_PROMPT, |
| 302 | Settings.Global.MULTI_SIM_SMS_SUBSCRIPTION, |
| 303 | Settings.Global.MULTI_SIM_VOICE_CALL_SUBSCRIPTION, |
| 304 | Settings.Global.MULTI_SIM_VOICE_PROMPT, |
| 305 | Settings.Global.NETSTATS_DEV_BUCKET_DURATION, |
| 306 | Settings.Global.NETSTATS_DEV_DELETE_AGE, |
| 307 | Settings.Global.NETSTATS_DEV_PERSIST_BYTES, |
| 308 | Settings.Global.NETSTATS_DEV_ROTATE_AGE, |
| 309 | Settings.Global.NETSTATS_ENABLED, |
| 310 | Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES, |
| 311 | Settings.Global.NETSTATS_POLL_INTERVAL, |
| 312 | Settings.Global.NETSTATS_SAMPLE_ENABLED, |
Jeff Sharkey | f4de294 | 2017-08-29 15:32:13 -0600 | [diff] [blame] | 313 | Settings.Global.NETSTATS_AUGMENT_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 314 | Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE, |
| 315 | Settings.Global.NETSTATS_UID_BUCKET_DURATION, |
| 316 | Settings.Global.NETSTATS_UID_DELETE_AGE, |
| 317 | Settings.Global.NETSTATS_UID_PERSIST_BYTES, |
| 318 | Settings.Global.NETSTATS_UID_ROTATE_AGE, |
| 319 | Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION, |
| 320 | Settings.Global.NETSTATS_UID_TAG_DELETE_AGE, |
| 321 | Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES, |
| 322 | Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE, |
Jeff Sharkey | 36b414b | 2018-03-30 11:00:03 -0600 | [diff] [blame] | 323 | Settings.Global.NETPOLICY_QUOTA_ENABLED, |
| 324 | Settings.Global.NETPOLICY_QUOTA_UNLIMITED, |
| 325 | Settings.Global.NETPOLICY_QUOTA_LIMITED, |
| 326 | Settings.Global.NETPOLICY_QUOTA_FRAC_JOBS, |
| 327 | Settings.Global.NETPOLICY_QUOTA_FRAC_MULTIPATH, |
| 328 | Settings.Global.NETPOLICY_OVERRIDE_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 329 | Settings.Global.NETWORK_AVOID_BAD_WIFI, |
Remi NGUYEN VAN | e0ec992 | 2018-03-29 16:17:19 +0900 | [diff] [blame] | 330 | Settings.Global.NETWORK_DEFAULT_DAILY_MULTIPATH_QUOTA_BYTES, |
Bryan Mawhinney | 9a471b94 | 2017-02-01 13:18:07 +0000 | [diff] [blame] | 331 | Settings.Global.NETWORK_METERED_MULTIPATH_PREFERENCE, |
Ricky Wai | 1a6e667 | 2017-10-27 14:46:01 +0100 | [diff] [blame] | 332 | Settings.Global.NETWORK_WATCHLIST_LAST_REPORT_TIME, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 333 | Settings.Global.NETWORK_PREFERENCE, |
Bryan Mawhinney | 2c5f95a | 2017-02-21 10:58:23 +0000 | [diff] [blame] | 334 | Settings.Global.NETWORK_RECOMMENDATIONS_PACKAGE, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 335 | Settings.Global.NETWORK_RECOMMENDATION_REQUEST_TIMEOUT_MS, |
| 336 | Settings.Global.NETWORK_SCORER_APP, |
| 337 | Settings.Global.NETWORK_SCORING_PROVISIONED, |
Bryan Mawhinney | 24a2ae5 | 2017-01-31 11:18:50 +0000 | [diff] [blame] | 338 | Settings.Global.NETWORK_SCORING_UI_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 339 | Settings.Global.NETWORK_SWITCH_NOTIFICATION_DAILY_LIMIT, |
| 340 | Settings.Global.NETWORK_SWITCH_NOTIFICATION_RATE_LIMIT_MILLIS, |
Ricky Wai | eef5065 | 2017-12-21 16:27:40 +0000 | [diff] [blame] | 341 | Settings.Global.NETWORK_WATCHLIST_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 342 | Settings.Global.NEW_CONTACT_AGGREGATOR, |
Christine Franks | 8ad6f6d | 2017-12-13 18:40:43 -0800 | [diff] [blame] | 343 | Settings.Global.NIGHT_DISPLAY_FORCED_AUTO_MODE_AVAILABLE, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 344 | Settings.Global.NITZ_UPDATE_DIFF, |
| 345 | Settings.Global.NITZ_UPDATE_SPACING, |
Chris Wren | e901a7e | 2017-10-02 17:29:46 -0400 | [diff] [blame] | 346 | Settings.Global.NOTIFICATION_SNOOZE_OPTIONS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 347 | Settings.Global.NSD_ON, |
| 348 | Settings.Global.NTP_SERVER, |
| 349 | Settings.Global.NTP_TIMEOUT, |
| 350 | Settings.Global.OTA_DISABLE_AUTOMATIC_UPDATE, |
Damien Bargiacchi | 68bbaad | 2018-05-09 18:29:43 -0700 | [diff] [blame] | 351 | Settings.Global.USER_ABSENT_RADIOS_OFF_FOR_SMALL_BATTERY_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 352 | Settings.Global.OVERLAY_DISPLAY_DEVICES, |
| 353 | Settings.Global.PAC_CHANGE_DELAY, |
| 354 | Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE, |
| 355 | Settings.Global.PACKAGE_VERIFIER_ENABLE, |
| 356 | Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB, |
| 357 | Settings.Global.PACKAGE_VERIFIER_SETTING_VISIBLE, |
| 358 | Settings.Global.PACKAGE_VERIFIER_TIMEOUT, |
| 359 | Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT, |
| 360 | Settings.Global.PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS, |
| 361 | Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS, |
| 362 | Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT, |
| 363 | Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS, |
| 364 | Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT, |
| 365 | Settings.Global.POLICY_CONTROL, |
Bryan Mawhinney | 24a2ae5 | 2017-01-31 11:18:50 +0000 | [diff] [blame] | 366 | Settings.Global.POWER_MANAGER_CONSTANTS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 367 | Settings.Global.PREFERRED_NETWORK_MODE, |
Bryan Mawhinney | c41f2a4 | 2017-11-24 13:44:48 +0000 | [diff] [blame] | 368 | Settings.Global.PRIV_APP_OOB_ENABLED, |
Victor Hsieh | 785d618 | 2018-04-19 14:26:28 -0700 | [diff] [blame] | 369 | Settings.Global.PRIV_APP_OOB_LIST, |
Erik Kline | 1984179 | 2018-05-16 16:41:57 +0900 | [diff] [blame] | 370 | Settings.Global.PRIVATE_DNS_DEFAULT_MODE, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 371 | Settings.Global.PROVISIONING_APN_ALARM_DELAY_IN_MS, |
| 372 | Settings.Global.RADIO_BLUETOOTH, |
| 373 | Settings.Global.RADIO_CELL, |
| 374 | Settings.Global.RADIO_NFC, |
| 375 | Settings.Global.RADIO_WIFI, |
| 376 | Settings.Global.RADIO_WIMAX, |
Amin Shaikh | d3c8193 | 2017-02-06 16:22:42 -0800 | [diff] [blame] | 377 | Settings.Global.RECOMMENDED_NETWORK_EVALUATOR_CACHE_EXPIRY_MS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 378 | Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT, |
| 379 | Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 380 | Settings.Global.SAFE_BOOT_DISALLOWED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 381 | Settings.Global.SELINUX_STATUS, |
| 382 | Settings.Global.SELINUX_UPDATE_CONTENT_URL, |
| 383 | Settings.Global.SELINUX_UPDATE_METADATA_URL, |
| 384 | Settings.Global.SEND_ACTION_APP_ERROR, |
| 385 | Settings.Global.SET_GLOBAL_HTTP_PROXY, |
| 386 | Settings.Global.SET_INSTALL_LOCATION, |
| 387 | Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL, |
| 388 | Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST, |
| 389 | Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL, |
| 390 | Settings.Global.SHORTCUT_MANAGER_CONSTANTS, |
Andrew Sapperstein | 43643ae | 2017-12-20 15:17:33 -0800 | [diff] [blame] | 391 | Settings.Global.SHOW_FIRST_CRASH_DIALOG, |
Andrew Sapperstein | 5b679c4 | 2018-01-16 11:13:40 -0800 | [diff] [blame] | 392 | Settings.Global.SHOW_MUTE_IN_CRASH_DIALOG, |
Geoffrey Pitsch | bd3ec6a | 2017-05-04 14:56:33 -0400 | [diff] [blame] | 393 | Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS, |
Andrew Sapperstein | 5b679c4 | 2018-01-16 11:13:40 -0800 | [diff] [blame] | 394 | Settings.Global.SHOW_RESTART_IN_CRASH_DIALOG, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 395 | Settings.Global.SHOW_TEMPERATURE_WARNING, |
Beverly | 3bae4e5 | 2018-02-07 12:32:02 -0500 | [diff] [blame] | 396 | Settings.Global.SHOW_ZEN_UPGRADE_NOTIFICATION, |
Beverly | 301e92a | 2018-04-27 09:43:05 -0400 | [diff] [blame] | 397 | Settings.Global.SHOW_ZEN_SETTINGS_SUGGESTION, |
| 398 | Settings.Global.ZEN_SETTINGS_UPDATED, |
| 399 | Settings.Global.ZEN_SETTINGS_SUGGESTION_VIEWED, |
Michal Karpinski | 034a83f | 2017-04-26 19:25:25 +0100 | [diff] [blame] | 400 | Settings.Global.SMART_SELECTION_UPDATE_CONTENT_URL, |
| 401 | Settings.Global.SMART_SELECTION_UPDATE_METADATA_URL, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 402 | Settings.Global.SMS_OUTGOING_CHECK_INTERVAL_MS, |
| 403 | Settings.Global.SMS_OUTGOING_CHECK_MAX_COUNT, |
| 404 | Settings.Global.SMS_SHORT_CODE_CONFIRMATION, |
| 405 | Settings.Global.SMS_SHORT_CODE_RULE, |
| 406 | Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL, |
| 407 | Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL, |
Philip P. Moltmann | 18e3eb8 | 2018-03-09 16:55:55 -0800 | [diff] [blame] | 408 | Settings.Global.SOUND_TRIGGER_DETECTION_SERVICE_OP_TIMEOUT, |
Sundeep Ghuman | 9bb85d3 | 2017-08-28 17:04:16 -0700 | [diff] [blame] | 409 | Settings.Global.SPEED_LABEL_CACHE_EVICTION_AGE_MILLIS, |
Fyodor Kupolov | ee90c03 | 2017-12-12 11:52:57 -0800 | [diff] [blame] | 410 | Settings.Global.SQLITE_COMPATIBILITY_WAL_FLAGS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 411 | Settings.Global.STORAGE_BENCHMARK_INTERVAL, |
Daniel Nishi | 5782b5c | 2017-08-24 10:28:52 -0700 | [diff] [blame] | 412 | Settings.Global.STORAGE_SETTINGS_CLOBBER_THRESHOLD, |
Alice Sheng | b32b1ad | 2018-03-14 12:00:44 -0700 | [diff] [blame] | 413 | Settings.Global.SWAP_ENABLED, |
Makoto Onuki | aad2b51 | 2018-02-07 09:31:46 -0800 | [diff] [blame] | 414 | Settings.Global.SYNC_MANAGER_CONSTANTS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 415 | Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS, |
| 416 | Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL, |
Jeff Sharkey | 78f6f7f | 2017-02-21 13:57:31 -0700 | [diff] [blame] | 417 | Settings.Global.SYS_STORAGE_CACHE_MAX_BYTES, |
| 418 | Settings.Global.SYS_STORAGE_CACHE_PERCENTAGE, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 419 | Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES, |
| 420 | Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES, |
| 421 | Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE, |
Shikhar Srivastav | 9a896a6c | 2018-01-09 16:58:36 -0800 | [diff] [blame] | 422 | Settings.Global.SYS_VDSO, |
Marissa Wall | 04e7a9b | 2018-02-02 09:35:58 -0800 | [diff] [blame] | 423 | Settings.Global.SYS_UIDCPUPOWER, |
Hector Dearman | cf92ca1 | 2018-03-07 11:12:35 +0000 | [diff] [blame] | 424 | Settings.Global.SYS_TRACED, |
Makoto Onuki | 3c9c998 | 2018-01-17 10:46:48 -0800 | [diff] [blame] | 425 | Settings.Global.FPS_DEVISOR, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 426 | Settings.Global.TCP_DEFAULT_INIT_RWND, |
| 427 | Settings.Global.TETHER_DUN_APN, |
| 428 | Settings.Global.TETHER_DUN_REQUIRED, |
Bryan Mawhinney | 99d8980 | 2017-06-28 16:22:39 +0100 | [diff] [blame] | 429 | Settings.Global.TETHER_OFFLOAD_DISABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 430 | Settings.Global.TETHER_SUPPORTED, |
Remi NGUYEN VAN | 0597453 | 2018-08-01 15:51:28 +0900 | [diff] [blame] | 431 | Settings.Global.TETHER_ENABLE_LEGACY_DHCP_SERVER, |
Abodunrinwa Toki | 0e6b43e | 2017-09-19 23:18:40 +0100 | [diff] [blame] | 432 | Settings.Global.TEXT_CLASSIFIER_CONSTANTS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 433 | Settings.Global.THEATER_MODE_ON, |
Michael Kwan | 5f5a0bf | 2018-03-16 12:25:50 -0700 | [diff] [blame] | 434 | Settings.Global.TIME_ONLY_MODE_CONSTANTS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 435 | Settings.Global.TRANSITION_ANIMATION_SCALE, |
| 436 | Settings.Global.TRUSTED_SOUND, |
| 437 | Settings.Global.TZINFO_UPDATE_CONTENT_URL, |
| 438 | Settings.Global.TZINFO_UPDATE_METADATA_URL, |
Svet Ganov | f36d53c | 2017-05-24 00:27:21 -0700 | [diff] [blame] | 439 | Settings.Global.INSTALLED_INSTANT_APP_MIN_CACHE_PERIOD, |
| 440 | Settings.Global.INSTALLED_INSTANT_APP_MAX_CACHE_PERIOD, |
| 441 | Settings.Global.UNINSTALLED_INSTANT_APP_MIN_CACHE_PERIOD, |
| 442 | Settings.Global.UNINSTALLED_INSTANT_APP_MAX_CACHE_PERIOD, |
| 443 | Settings.Global.UNUSED_STATIC_SHARED_LIB_MIN_CACHE_PERIOD, |
Robin Bennett | 1193a35 | 2018-03-28 14:49:58 +0100 | [diff] [blame] | 444 | Settings.Global.UNGAZE_SLEEP_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 445 | Settings.Global.UNLOCK_SOUND, |
| 446 | Settings.Global.USE_GOOGLE_MAIL, |
| 447 | Settings.Global.VT_IMS_ENABLED, |
| 448 | Settings.Global.WAIT_FOR_DEBUGGER, |
Cody Northrop | 86cedcb | 2017-10-20 09:03:13 -0600 | [diff] [blame] | 449 | Settings.Global.ENABLE_GPU_DEBUG_LAYERS, |
| 450 | Settings.Global.GPU_DEBUG_APP, |
| 451 | Settings.Global.GPU_DEBUG_LAYERS, |
gomo | 48f1a64 | 2017-11-10 20:35:46 -0800 | [diff] [blame] | 452 | Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING, |
goneil | 4291960 | 2018-01-23 17:37:26 -0800 | [diff] [blame] | 453 | Settings.Global.INSTALL_CARRIER_APP_NOTIFICATION_PERSISTENT, |
| 454 | Settings.Global.INSTALL_CARRIER_APP_NOTIFICATION_SLEEP_MILLIS, |
Sudheer Shanka | 5918c67 | 2017-03-21 19:31:37 -0700 | [diff] [blame] | 455 | Settings.Global.NETWORK_ACCESS_TIMEOUT_MS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 456 | Settings.Global.WARNING_TEMPERATURE, |
| 457 | Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY, |
| 458 | Settings.Global.WEBVIEW_FALLBACK_LOGIC_ENABLED, |
| 459 | Settings.Global.WEBVIEW_MULTIPROCESS, |
| 460 | Settings.Global.WEBVIEW_PROVIDER, |
| 461 | Settings.Global.WFC_IMS_ENABLED, |
| 462 | Settings.Global.WFC_IMS_MODE, |
| 463 | Settings.Global.WFC_IMS_ROAMING_ENABLED, |
| 464 | Settings.Global.WFC_IMS_ROAMING_MODE, |
Leif Hendrik Wilden | fd30663 | 2018-05-02 12:05:24 -0700 | [diff] [blame] | 465 | Settings.Global.WIFI_ALWAYS_REQUESTED, |
Bryan Mawhinney | 9a471b94 | 2017-02-01 13:18:07 +0000 | [diff] [blame] | 466 | Settings.Global.WIFI_BADGING_THRESHOLDS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 467 | Settings.Global.WIFI_BOUNCE_DELAY_OVERRIDE_MS, |
Jong Wook Kim | 0a20eda | 2018-01-05 18:40:25 -0800 | [diff] [blame] | 468 | Settings.Global.WIFI_CONNECTED_MAC_RANDOMIZATION_ENABLED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 469 | Settings.Global.WIFI_COUNTRY_CODE, |
| 470 | Settings.Global.WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN, |
| 471 | Settings.Global.WIFI_DISPLAY_CERTIFICATION_ON, |
| 472 | Settings.Global.WIFI_DISPLAY_ON, |
| 473 | Settings.Global.WIFI_DISPLAY_WPS_CONFIG, |
| 474 | Settings.Global.WIFI_ENHANCED_AUTO_JOIN, |
| 475 | Settings.Global.WIFI_EPHEMERAL_OUT_OF_RANGE_TIMEOUT_MS, |
| 476 | Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS, |
| 477 | Settings.Global.WIFI_FREQUENCY_BAND, |
| 478 | Settings.Global.WIFI_IDLE_MS, |
| 479 | Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT, |
| 480 | Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS, |
| 481 | Settings.Global.WIFI_NETWORK_SHOW_RSSI, |
| 482 | Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY, |
| 483 | Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT, |
| 484 | Settings.Global.WIFI_ON, |
| 485 | Settings.Global.WIFI_P2P_DEVICE_NAME, |
| 486 | Settings.Global.WIFI_REENABLE_DELAY_MS, |
Wei Wang | b6e04d5 | 2018-04-30 19:49:02 -0700 | [diff] [blame] | 487 | Settings.Global.WIFI_RTT_BACKGROUND_EXEC_GAP_MS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 488 | Settings.Global.WIFI_SAVED_STATE, |
| 489 | Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE, |
| 490 | Settings.Global.WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS, |
Michael Plass | f1510fb | 2018-02-28 16:08:47 -0800 | [diff] [blame] | 491 | Settings.Global.WIFI_SCORE_PARAMS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 492 | Settings.Global.WIFI_SLEEP_POLICY, |
| 493 | Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS, |
| 494 | Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED, |
| 495 | Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED, |
| 496 | Settings.Global.WIFI_WATCHDOG_ON, |
| 497 | Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON, |
| 498 | Settings.Global.WINDOW_ANIMATION_SCALE, |
Beverly | c1313eb | 2018-01-31 18:07:21 -0500 | [diff] [blame] | 499 | Settings.Global.CHARGING_STARTED_SOUND, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 500 | Settings.Global.WTF_IS_FATAL, |
| 501 | Settings.Global.ZEN_MODE, |
| 502 | Settings.Global.ZEN_MODE_CONFIG_ETAG, |
Daniel Colascione | 766b632 | 2018-01-08 19:10:36 -0800 | [diff] [blame] | 503 | Settings.Global.ZEN_MODE_RINGER_LEVEL, |
Michal Karpinski | b52575c | 2018-01-19 17:38:45 +0000 | [diff] [blame] | 504 | Settings.Global.ZRAM_ENABLED, |
Narayan Kamath | 8d82825 | 2018-01-11 15:22:37 +0000 | [diff] [blame] | 505 | Settings.Global.OVERRIDE_SETTINGS_PROVIDER_RESTORE_ANY_VERSION, |
Mathew Inwood | 169cb3b | 2018-02-08 12:23:59 +0000 | [diff] [blame] | 506 | Settings.Global.CHAINED_BATTERY_ATTRIBUTION_ENABLED, |
Annie Meng | d069a88 | 2018-03-13 15:31:40 +0000 | [diff] [blame] | 507 | Settings.Global.HIDDEN_API_BLACKLIST_EXEMPTIONS, |
Malcolm Chen | 77b2b55 | 2018-12-13 19:24:03 -0800 | [diff] [blame] | 508 | Settings.Global.BACKUP_AGENT_TIMEOUT_PARAMETERS, |
| 509 | Settings.Global.ENABLED_SUBSCRIPTION_FOR_SLOT, |
| 510 | Settings.Global.MODEM_STACK_ENABLED_FOR_SLOT); |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 511 | private static final Set<String> BACKUP_BLACKLISTED_SECURE_SETTINGS = |
| 512 | newHashSet( |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 513 | Settings.Secure.ACCESSIBILITY_SOFT_KEYBOARD_MODE, |
| 514 | Settings.Secure.ALLOWED_GEOLOCATION_ORIGINS, |
| 515 | Settings.Secure.ALWAYS_ON_VPN_APP, |
| 516 | Settings.Secure.ALWAYS_ON_VPN_LOCKDOWN, |
Pavel Grafov | a462bcb | 2019-01-25 08:50:06 +0000 | [diff] [blame] | 517 | Settings.Secure.ALWAYS_ON_VPN_LOCKDOWN_WHITELIST, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 518 | Settings.Secure.ANDROID_ID, |
| 519 | Settings.Secure.ANR_SHOW_BACKGROUND, |
| 520 | Settings.Secure.ASSISTANT, |
| 521 | Settings.Secure.ASSIST_DISCLOSURE_ENABLED, |
Kevin Chyn | 6df6b02 | 2018-06-06 17:16:50 -0700 | [diff] [blame] | 522 | Settings.Secure.ASSIST_GESTURE_SENSITIVITY, |
| 523 | Settings.Secure.ASSIST_GESTURE_SETUP_COMPLETE, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 524 | Settings.Secure.ASSIST_SCREENSHOT_ENABLED, |
| 525 | Settings.Secure.ASSIST_STRUCTURE_ENABLED, |
Felipe Leme | 78172e7 | 2017-12-08 17:01:15 -0800 | [diff] [blame] | 526 | Settings.Secure.AUTOFILL_FEATURE_FIELD_CLASSIFICATION, |
Felipe Leme | febb733 | 2018-02-12 18:12:55 -0800 | [diff] [blame] | 527 | Settings.Secure.AUTOFILL_USER_DATA_MAX_CATEGORY_COUNT, |
Felipe Leme | 78172e7 | 2017-12-08 17:01:15 -0800 | [diff] [blame] | 528 | Settings.Secure.AUTOFILL_USER_DATA_MAX_FIELD_CLASSIFICATION_IDS_SIZE, |
| 529 | Settings.Secure.AUTOFILL_USER_DATA_MAX_USER_DATA_SIZE, |
| 530 | Settings.Secure.AUTOFILL_USER_DATA_MAX_VALUE_LENGTH, |
| 531 | Settings.Secure.AUTOFILL_USER_DATA_MIN_VALUE_LENGTH, |
Philip P. Moltmann | e287a15 | 2017-05-04 11:07:05 -0700 | [diff] [blame] | 532 | Settings.Secure.AUTOFILL_SERVICE_SEARCH_URI, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 533 | Settings.Secure.AUTOMATIC_STORAGE_MANAGER_BYTES_CLEARED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 534 | Settings.Secure.AUTOMATIC_STORAGE_MANAGER_ENABLED, |
| 535 | Settings.Secure.AUTOMATIC_STORAGE_MANAGER_LAST_RUN, |
Daniel Nishi | da7332c | 2017-06-12 10:17:33 -0700 | [diff] [blame] | 536 | Settings.Secure.AUTOMATIC_STORAGE_MANAGER_TURNED_OFF_BY_POLICY, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 537 | Settings.Secure.BACKUP_AUTO_RESTORE, |
| 538 | Settings.Secure.BACKUP_ENABLED, |
| 539 | Settings.Secure.BACKUP_PROVISIONED, |
| 540 | Settings.Secure.BACKUP_TRANSPORT, |
sqian | 97b6b00 | 2018-10-08 15:15:41 -0700 | [diff] [blame] | 541 | Settings.Secure.CALL_REDIRECTION_DEFAULT_APPLICATION, |
tonyzhu | 70526c3 | 2018-10-25 16:13:14 +0800 | [diff] [blame] | 542 | Settings.Secure.CALL_SCREENING_DEFAULT_COMPONENT, |
Michal Karpinski | 72dfff9 | 2017-04-27 11:19:04 +0100 | [diff] [blame] | 543 | Settings.Secure.CAMERA_LIFT_TRIGGER_ENABLED, // Candidate for backup? |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 544 | Settings.Secure.CARRIER_APPS_HANDLED, |
Jack Yu | 3902857 | 2017-02-23 09:49:25 -0800 | [diff] [blame] | 545 | Settings.Secure.CMAS_ADDITIONAL_BROADCAST_PKG, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 546 | Settings.Secure.COMPLETED_CATEGORY_PREFIX, |
| 547 | Settings.Secure.CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS, |
| 548 | Settings.Secure.DEFAULT_INPUT_METHOD, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 549 | Settings.Secure.DEVICE_PAIRED, |
| 550 | Settings.Secure.DIALER_DEFAULT_APPLICATION, |
| 551 | Settings.Secure.DISABLED_PRINT_SERVICES, |
| 552 | Settings.Secure.DISABLED_SYSTEM_INPUT_METHODS, |
| 553 | Settings.Secure.DISPLAY_DENSITY_FORCED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 554 | Settings.Secure.DOZE_ALWAYS_ON, |
Adrian Roos | d0963a0 | 2017-05-15 14:33:37 -0700 | [diff] [blame] | 555 | Settings.Secure.DOZE_PULSE_ON_LONG_PRESS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 556 | Settings.Secure.EMERGENCY_ASSISTANCE_APPLICATION, |
Yohei Yukawa | ca78095 | 2018-02-07 22:16:32 +0900 | [diff] [blame] | 557 | Settings.Secure.ENABLED_INPUT_METHODS, // Intentionally removed in P |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 558 | Settings.Secure.ENABLED_NOTIFICATION_ASSISTANT, |
Julia Reynolds | b852e56 | 2017-06-06 16:14:18 -0400 | [diff] [blame] | 559 | Settings.Secure.ENABLED_NOTIFICATION_LISTENERS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 560 | Settings.Secure.ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES, |
| 561 | Settings.Secure.ENABLED_PRINT_SERVICES, |
| 562 | Settings.Secure.IMMERSIVE_MODE_CONFIRMATIONS, |
| 563 | Settings.Secure.INCALL_BACK_BUTTON_BEHAVIOR, |
| 564 | Settings.Secure.INPUT_METHOD_SELECTOR_VISIBILITY, |
| 565 | Settings.Secure.INPUT_METHODS_SUBTYPE_HISTORY, |
| 566 | Settings.Secure.INSTALL_NON_MARKET_APPS, |
| 567 | Settings.Secure.LAST_SETUP_SHOWN, |
Lifu Tang | 0cba58f | 2018-01-23 21:14:15 -0800 | [diff] [blame] | 568 | Settings.Secure.LOCATION_CHANGER, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 569 | Settings.Secure.LOCATION_MODE, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 570 | Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS, // Candidate? |
| 571 | Settings.Secure.LOCK_SCREEN_ALLOW_REMOTE_INPUT, // Candidate? |
| 572 | Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT, |
| 573 | Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS, // Candidate? |
| 574 | Settings.Secure.LOCK_TO_APP_EXIT_LOCKED, |
| 575 | Settings.Secure.MANAGED_PROFILE_CONTACT_REMOTE_SEARCH, |
| 576 | Settings.Secure.MULTI_PRESS_TIMEOUT, |
| 577 | Settings.Secure.NFC_PAYMENT_FOREGROUND, |
Christine Franks | 0dbb39d | 2017-06-27 09:13:35 -0700 | [diff] [blame] | 578 | Settings.Secure.NIGHT_DISPLAY_ACTIVATED, |
| 579 | Settings.Secure.NIGHT_DISPLAY_LAST_ACTIVATED_TIME, |
Mike Digman | 5075264 | 2018-02-15 13:36:09 -0800 | [diff] [blame] | 580 | Settings.Secure.NUM_ROTATION_SUGGESTIONS_ACCEPTED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 581 | Settings.Secure.PACKAGE_VERIFIER_STATE, |
| 582 | Settings.Secure.PACKAGE_VERIFIER_USER_CONSENT, |
| 583 | Settings.Secure.PARENTAL_CONTROL_LAST_UPDATE, |
| 584 | Settings.Secure.PAYMENT_SERVICE_SEARCH_URI, |
| 585 | Settings.Secure.PRINT_SERVICE_SEARCH_URI, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 586 | Settings.Secure.SCREENSAVER_DEFAULT_COMPONENT, // Candidate? |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 587 | Settings.Secure.SEARCH_GLOBAL_SEARCH_ACTIVITY, |
| 588 | Settings.Secure.SEARCH_MAX_RESULTS_PER_SOURCE, |
| 589 | Settings.Secure.SEARCH_MAX_RESULTS_TO_DISPLAY, |
| 590 | Settings.Secure.SEARCH_MAX_SHORTCUTS_RETURNED, |
| 591 | Settings.Secure.SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS, |
| 592 | Settings.Secure.SEARCH_MAX_STAT_AGE_MILLIS, |
| 593 | Settings.Secure.SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING, |
| 594 | Settings.Secure.SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING, |
| 595 | Settings.Secure.SEARCH_NUM_PROMOTED_SOURCES, |
| 596 | Settings.Secure.SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT, |
| 597 | Settings.Secure.SEARCH_PREFILL_MILLIS, |
| 598 | Settings.Secure.SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS, |
| 599 | Settings.Secure.SEARCH_QUERY_THREAD_CORE_POOL_SIZE, |
| 600 | Settings.Secure.SEARCH_QUERY_THREAD_MAX_POOL_SIZE, |
| 601 | Settings.Secure.SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE, |
| 602 | Settings.Secure.SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE, |
| 603 | Settings.Secure.SEARCH_SOURCE_TIMEOUT_MILLIS, |
| 604 | Settings.Secure.SEARCH_THREAD_KEEPALIVE_SECONDS, |
| 605 | Settings.Secure.SEARCH_WEB_RESULTS_OVERRIDE_LIMIT, |
| 606 | Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE, |
| 607 | Settings.Secure.SETTINGS_CLASSNAME, |
| 608 | Settings.Secure.SHOW_NOTE_ABOUT_NOTIFICATION_HIDING, // candidate? |
Mike Digman | e14e663 | 2018-01-11 10:43:08 -0800 | [diff] [blame] | 609 | Settings.Secure.SHOW_ROTATION_SUGGESTIONS, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 610 | Settings.Secure.SKIP_FIRST_USE_HINTS, // candidate? |
| 611 | Settings.Secure.SMS_DEFAULT_APPLICATION, |
Tony Huang | f0800fa | 2018-05-02 10:53:52 +0800 | [diff] [blame] | 612 | Settings.Secure.THEME_MODE, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 613 | Settings.Secure.TRUST_AGENTS_INITIALIZED, |
| 614 | Settings.Secure.TV_INPUT_CUSTOM_LABELS, |
| 615 | Settings.Secure.TV_INPUT_HIDDEN_INPUTS, |
Bryan Mawhinney | 99d8980 | 2017-06-28 16:22:39 +0100 | [diff] [blame] | 616 | Settings.Secure.TV_USER_SETUP_COMPLETE, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 617 | Settings.Secure.UI_NIGHT_MODE, // candidate? |
Suprabh Shukla | 0b1356f | 2017-02-21 14:33:50 -0800 | [diff] [blame] | 618 | Settings.Secure.UNKNOWN_SOURCES_DEFAULT_REVERSED, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 619 | Settings.Secure.UNSAFE_VOLUME_MUSIC_ACTIVE_MS, |
| 620 | Settings.Secure.USB_AUDIO_AUTOMATIC_ROUTING_DISABLED, |
| 621 | Settings.Secure.USER_SETUP_COMPLETE, |
Ajay Nadathur | 702fc64 | 2018-03-09 11:56:01 -0800 | [diff] [blame] | 622 | Settings.Secure.USER_SETUP_PERSONALIZATION_STATE, |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 623 | Settings.Secure.VOICE_INTERACTION_SERVICE, |
| 624 | Settings.Secure.VOICE_RECOGNITION_SERVICE, |
Tim Zheng | cc1e76a | 2017-08-30 17:46:19 -0700 | [diff] [blame] | 625 | Settings.Secure.INSTANT_APPS_ENABLED, |
Lucas Dupin | 6bd8601 | 2017-12-05 17:58:57 -0800 | [diff] [blame] | 626 | Settings.Secure.BACKUP_MANAGER_CONSTANTS, |
Bernardo Rufino | eaa78b9 | 2018-01-26 11:25:37 +0000 | [diff] [blame] | 627 | Settings.Secure.BACKUP_LOCAL_TRANSPORT_PARAMETERS, |
Michal Karpinski | 964943a | 2018-01-19 16:28:26 +0000 | [diff] [blame] | 628 | Settings.Secure.KEYGUARD_SLICE_URI, |
| 629 | Settings.Secure.PARENTAL_CONTROL_ENABLED, |
Daniel Nishi | 79764127 | 2018-01-02 16:48:33 -0800 | [diff] [blame] | 630 | Settings.Secure.PARENTAL_CONTROL_REDIRECT_URL, |
Makoto Onuki | 16a0dd2 | 2018-03-20 10:40:37 -0700 | [diff] [blame] | 631 | Settings.Secure.BLUETOOTH_ON_WHILE_DRIVING, |
| 632 | Settings.Secure.LOW_POWER_MANUAL_ACTIVATION_COUNT, |
Makoto Onuki | 52c6295 | 2018-03-22 10:43:03 -0700 | [diff] [blame] | 633 | Settings.Secure.LOW_POWER_WARNING_ACKNOWLEDGED, |
Artem Iglikov | 5b53875 | 2018-03-27 15:12:18 +0100 | [diff] [blame] | 634 | Settings.Secure.SUPPRESS_AUTO_BATTERY_SAVER_SUGGESTION, |
| 635 | Settings.Secure.PACKAGES_TO_CLEAR_DATA_BEFORE_FULL_RESTORE); |
Bryan Mawhinney | 87b1aac | 2017-01-16 18:06:07 +0000 | [diff] [blame] | 636 | |
| 637 | @Test |
| 638 | public void systemSettingsBackedUpOrBlacklisted() { |
| 639 | checkSettingsBackedUpOrBlacklisted( |
| 640 | getCandidateSettings(Settings.System.class), |
| 641 | newHashSet(Settings.System.SETTINGS_TO_BACKUP), |
| 642 | BACKUP_BLACKLISTED_SYSTEM_SETTINGS); |
| 643 | } |
| 644 | |
| 645 | @Test |
| 646 | public void globalSettingsBackedUpOrBlacklisted() { |
| 647 | checkSettingsBackedUpOrBlacklisted( |
| 648 | getCandidateSettings(Settings.Global.class), |
| 649 | newHashSet(Settings.Global.SETTINGS_TO_BACKUP), |
| 650 | BACKUP_BLACKLISTED_GLOBAL_SETTINGS); |
| 651 | } |
| 652 | |
| 653 | @Test |
| 654 | public void secureSettingsBackedUpOrBlacklisted() { |
| 655 | checkSettingsBackedUpOrBlacklisted( |
| 656 | getCandidateSettings(Settings.Secure.class), |
| 657 | newHashSet(Settings.Secure.SETTINGS_TO_BACKUP), |
| 658 | BACKUP_BLACKLISTED_SECURE_SETTINGS); |
| 659 | } |
| 660 | |
| 661 | private static void checkSettingsBackedUpOrBlacklisted( |
| 662 | Set<String> settings, Set<String> settingsToBackup, Set<String> blacklist) { |
| 663 | Set<String> settingsNotBackedUp = difference(settings, settingsToBackup); |
| 664 | Set<String> settingsNotBackedUpOrBlacklisted = difference(settingsNotBackedUp, blacklist); |
| 665 | assertThat( |
| 666 | "Settings not backed up or blacklisted", |
| 667 | settingsNotBackedUpOrBlacklisted, |
| 668 | is(empty())); |
| 669 | |
| 670 | assertThat( |
| 671 | "blacklisted settings backed up", |
| 672 | intersect(settingsToBackup, blacklist), |
| 673 | is(empty())); |
| 674 | } |
| 675 | |
| 676 | private static Set<String> getCandidateSettings(Class<? extends Settings.NameValueTable> clazz) { |
| 677 | HashSet<String> result = new HashSet<String>(); |
| 678 | for (Field field : clazz.getDeclaredFields()) { |
| 679 | if (looksLikeValidSetting(field)) { |
| 680 | try { |
| 681 | result.add((String) field.get(null)); |
| 682 | } catch (IllegalAccessException e) { |
| 683 | // Impossible for public fields |
| 684 | throw new RuntimeException(e); |
| 685 | } |
| 686 | } |
| 687 | } |
| 688 | return result; |
| 689 | } |
| 690 | |
| 691 | private static boolean looksLikeValidSetting(Field field) { |
| 692 | int modifiers = field.getModifiers(); |
| 693 | return isPublic(modifiers) |
| 694 | && isStatic(modifiers) |
| 695 | && isFinal(modifiers) |
| 696 | && field.getType() == String.class |
| 697 | && field.getAnnotation(Deprecated.class) == null; |
| 698 | } |
| 699 | |
| 700 | private static <T> Set<T> difference(Set<T> s1, Set<T> s2) { |
| 701 | HashSet<T> result = new HashSet<T>(s1); |
| 702 | result.removeAll(s2); |
| 703 | return result; |
| 704 | } |
| 705 | |
| 706 | private static <T> Set<T> intersect(Set<T> s1, Set<T> s2) { |
| 707 | HashSet<T> result = new HashSet<T>(s1); |
| 708 | result.retainAll(s2); |
| 709 | return result; |
| 710 | } |
| 711 | |
| 712 | } |