Home | History | Annotate | Download | only in settings
      1 /*
      2  * Copyright (C) 2007 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 com.android.providers.settings;
     18 
     19 import android.annotation.NonNull;
     20 import android.os.UserHandle;
     21 import android.provider.Settings;
     22 import android.providers.settings.GlobalSettingsProto;
     23 import android.providers.settings.SecureSettingsProto;
     24 import android.providers.settings.SettingProto;
     25 import android.providers.settings.SettingsServiceDumpProto;
     26 import android.providers.settings.SystemSettingsProto;
     27 import android.providers.settings.UserSettingsProto;
     28 import android.util.SparseBooleanArray;
     29 import android.util.proto.ProtoOutputStream;
     30 
     31 /** @hide */
     32 class SettingsProtoDumpUtil {
     33     private SettingsProtoDumpUtil() {}
     34 
     35     static void dumpProtoLocked(SettingsProvider.SettingsRegistry settingsRegistry,
     36             ProtoOutputStream proto) {
     37         // Config settings
     38         SettingsState configSettings = settingsRegistry.getSettingsLocked(
     39                 SettingsProvider.SETTINGS_TYPE_CONFIG, UserHandle.USER_SYSTEM);
     40         if (configSettings != null) {
     41             // TODO(b/113100523): dump configuration settings after they are added
     42         }
     43 
     44         // Global settings
     45         SettingsState globalSettings = settingsRegistry.getSettingsLocked(
     46                 SettingsProvider.SETTINGS_TYPE_GLOBAL, UserHandle.USER_SYSTEM);
     47         if (globalSettings != null) {
     48             dumpProtoGlobalSettingsLocked(proto, SettingsServiceDumpProto.GLOBAL_SETTINGS, globalSettings);
     49         }
     50 
     51         // Per-user settings
     52         SparseBooleanArray users = settingsRegistry.getKnownUsersLocked();
     53         final int userCount = users.size();
     54         for (int i = 0; i < userCount; i++) {
     55             dumpProtoUserSettingsLocked(proto, SettingsServiceDumpProto.USER_SETTINGS,
     56                     settingsRegistry, UserHandle.of(users.keyAt(i)));
     57         }
     58     }
     59 
     60     /**
     61      * Dump all settings of a user as a proto buf.
     62      *
     63      * @param settingsRegistry
     64      * @param user The user the settings should be dumped for
     65      * @param proto The proto buf stream to dump to
     66      */
     67     private static void dumpProtoUserSettingsLocked(
     68             @NonNull ProtoOutputStream proto,
     69             long fieldId,
     70             SettingsProvider.SettingsRegistry settingsRegistry,
     71             @NonNull UserHandle user) {
     72         final long token = proto.start(fieldId);
     73 
     74         proto.write(UserSettingsProto.USER_ID, user.getIdentifier());
     75 
     76         SettingsState secureSettings = settingsRegistry.getSettingsLocked(
     77                 SettingsProvider.SETTINGS_TYPE_SECURE, user.getIdentifier());
     78         if (secureSettings != null) {
     79             dumpProtoSecureSettingsLocked(proto, UserSettingsProto.SECURE_SETTINGS, secureSettings);
     80         }
     81 
     82         SettingsState systemSettings = settingsRegistry.getSettingsLocked(
     83                 SettingsProvider.SETTINGS_TYPE_SYSTEM, user.getIdentifier());
     84         if (systemSettings != null) {
     85             dumpProtoSystemSettingsLocked(proto, UserSettingsProto.SYSTEM_SETTINGS, systemSettings);
     86         }
     87 
     88         proto.end(token);
     89     }
     90 
     91     private static void dumpProtoGlobalSettingsLocked(
     92             @NonNull ProtoOutputStream p, long fieldId, @NonNull SettingsState s) {
     93         final long token = p.start(fieldId);
     94         s.dumpHistoricalOperations(p, GlobalSettingsProto.HISTORICAL_OPERATIONS);
     95 
     96         // This uses the same order as in GlobalSettingsProto.
     97         dumpSetting(s, p,
     98                 Settings.Global.ACTIVITY_MANAGER_CONSTANTS,
     99                 GlobalSettingsProto.ACTIVITY_MANAGER_CONSTANTS);
    100         dumpSetting(s, p,
    101                 Settings.Global.ADB_ENABLED,
    102                 GlobalSettingsProto.ADB_ENABLED);
    103         dumpSetting(s, p,
    104                 Settings.Global.ADD_USERS_WHEN_LOCKED,
    105                 GlobalSettingsProto.ADD_USERS_WHEN_LOCKED);
    106 
    107         final long airplaneModeToken = p.start(GlobalSettingsProto.AIRPLANE_MODE);
    108         dumpSetting(s, p,
    109                 Settings.Global.AIRPLANE_MODE_ON,
    110                 GlobalSettingsProto.AirplaneMode.ON);
    111         // RADIO_BLUETOOTH is just a constant and not an actual setting.
    112         // RADIO_WIFI is just a constant and not an actual setting.
    113         // RADIO_WIMAX is just a constant and not an actual setting.
    114         // RADIO_CELL is just a constant and not an actual setting.
    115         // RADIO_NFC is just a constant and not an actual setting.
    116         dumpSetting(s, p,
    117                 Settings.Global.AIRPLANE_MODE_RADIOS,
    118                 GlobalSettingsProto.AirplaneMode.RADIOS);
    119         dumpSetting(s, p,
    120                 Settings.Global.AIRPLANE_MODE_TOGGLEABLE_RADIOS,
    121                 GlobalSettingsProto.AirplaneMode.TOGGLEABLE_RADIOS);
    122         p.end(airplaneModeToken);
    123 
    124         dumpSetting(s, p,
    125                 Settings.Global.ALARM_MANAGER_CONSTANTS,
    126                 GlobalSettingsProto.ALARM_MANAGER_CONSTANTS);
    127         dumpSetting(s, p,
    128                 Settings.Global.ALLOW_USER_SWITCHING_WHEN_SYSTEM_USER_LOCKED,
    129                 GlobalSettingsProto.ALLOW_USER_SWITCHING_WHEN_SYSTEM_USER_LOCKED);
    130         dumpSetting(s, p,
    131                 Settings.Global.ALWAYS_ON_DISPLAY_CONSTANTS,
    132                 GlobalSettingsProto.ALWAYS_ON_DISPLAY_CONSTANTS);
    133         dumpSetting(s, p,
    134                 Settings.Global.ALWAYS_FINISH_ACTIVITIES,
    135                 GlobalSettingsProto.ALWAYS_FINISH_ACTIVITIES);
    136         dumpSetting(s, p,
    137                 Settings.Global.ANIMATOR_DURATION_SCALE,
    138                 GlobalSettingsProto.ANIMATOR_DURATION_SCALE);
    139 
    140         final long anomalyToken = p.start(GlobalSettingsProto.ANOMALY);
    141         dumpSetting(s, p,
    142                 Settings.Global.ANOMALY_DETECTION_CONSTANTS,
    143                 GlobalSettingsProto.Anomaly.DETECTION_CONSTANTS);
    144         dumpSetting(s, p,
    145                 Settings.Global.ANOMALY_CONFIG_VERSION,
    146                 GlobalSettingsProto.Anomaly.CONFIG_VERSION);
    147         dumpSetting(s, p,
    148                 Settings.Global.ANOMALY_CONFIG,
    149                 GlobalSettingsProto.Anomaly.CONFIG);
    150         p.end(anomalyToken);
    151 
    152         final long apnDbToken = p.start(GlobalSettingsProto.APN_DB);
    153         dumpSetting(s, p,
    154                 Settings.Global.APN_DB_UPDATE_CONTENT_URL,
    155                 GlobalSettingsProto.ApnDb.UPDATE_CONTENT_URL);
    156         dumpSetting(s, p,
    157                 Settings.Global.APN_DB_UPDATE_METADATA_URL,
    158                 GlobalSettingsProto.ApnDb.UPDATE_METADATA_URL);
    159         p.end(apnDbToken);
    160 
    161         final long appToken = p.start(GlobalSettingsProto.APP);
    162         dumpSetting(s, p,
    163                 Settings.Global.APP_IDLE_CONSTANTS,
    164                 GlobalSettingsProto.App.IDLE_CONSTANTS);
    165         dumpSetting(s, p,
    166                 Settings.Global.APP_STANDBY_ENABLED,
    167                 GlobalSettingsProto.App.STANDBY_ENABLED);
    168         dumpSetting(s, p,
    169                 Settings.Global.APP_AUTO_RESTRICTION_ENABLED,
    170                 GlobalSettingsProto.App.AUTO_RESTRICTION_ENABLED);
    171         dumpSetting(s, p,
    172                 Settings.Global.FORCED_APP_STANDBY_ENABLED,
    173                 GlobalSettingsProto.App.FORCED_APP_STANDBY_ENABLED);
    174         dumpSetting(s, p,
    175                 Settings.Global.FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED,
    176                 GlobalSettingsProto.App.FORCED_APP_STANDBY_FOR_SMALL_BATTERY_ENABLED);
    177         p.end(appToken);
    178 
    179         dumpSetting(s, p,
    180                 Settings.Global.ASSISTED_GPS_ENABLED,
    181                 GlobalSettingsProto.ASSISTED_GPS_ENABLED);
    182         dumpSetting(s, p,
    183                 Settings.Global.AUDIO_SAFE_VOLUME_STATE,
    184                 GlobalSettingsProto.AUDIO_SAFE_VOLUME_STATE);
    185 
    186         final long autoToken = p.start(GlobalSettingsProto.AUTO);
    187         dumpSetting(s, p,
    188                 Settings.Global.AUTO_TIME,
    189                 GlobalSettingsProto.Auto.TIME);
    190         dumpSetting(s, p,
    191                 Settings.Global.AUTO_TIME_ZONE,
    192                 GlobalSettingsProto.Auto.TIME_ZONE);
    193         p.end(autoToken);
    194 
    195         final long autofillToken = p.start(GlobalSettingsProto.AUTOFILL);
    196         dumpSetting(s, p,
    197                 Settings.Global.AUTOFILL_COMPAT_MODE_ALLOWED_PACKAGES,
    198                 GlobalSettingsProto.Autofill.COMPAT_MODE_ALLOWED_PACKAGES);
    199         dumpSetting(s, p,
    200                 Settings.Global.AUTOFILL_LOGGING_LEVEL,
    201                 GlobalSettingsProto.Autofill.LOGGING_LEVEL);
    202         dumpSetting(s, p,
    203                 Settings.Global.AUTOFILL_MAX_PARTITIONS_SIZE,
    204                 GlobalSettingsProto.Autofill.MAX_PARTITIONS_SIZE);
    205         dumpSetting(s, p,
    206                 Settings.Global.AUTOFILL_MAX_VISIBLE_DATASETS,
    207                 GlobalSettingsProto.Autofill.MAX_VISIBLE_DATASETS);
    208         p.end(autofillToken);
    209 
    210         final long backupToken = p.start(GlobalSettingsProto.BACKUP);
    211         dumpSetting(s, p,
    212                 Settings.Global.BACKUP_AGENT_TIMEOUT_PARAMETERS,
    213                 GlobalSettingsProto.Backup.BACKUP_AGENT_TIMEOUT_PARAMETERS);
    214         dumpSetting(s, p,
    215                 Settings.Global.BACKUP_MULTI_USER_ENABLED,
    216                 GlobalSettingsProto.Backup.BACKUP_MULTI_USER_ENABLED);
    217         p.end(backupToken);
    218 
    219         final long batteryToken = p.start(GlobalSettingsProto.BATTERY);
    220         dumpSetting(s, p,
    221                 Settings.Global.BATTERY_DISCHARGE_DURATION_THRESHOLD,
    222                 GlobalSettingsProto.Battery.DISCHARGE_DURATION_THRESHOLD);
    223         dumpSetting(s, p,
    224                 Settings.Global.BATTERY_DISCHARGE_THRESHOLD,
    225                 GlobalSettingsProto.Battery.DISCHARGE_THRESHOLD);
    226         dumpSetting(s, p,
    227                 Settings.Global.BATTERY_SAVER_CONSTANTS,
    228                 GlobalSettingsProto.Battery.SAVER_CONSTANTS);
    229         dumpSetting(s, p,
    230                 Settings.Global.BATTERY_SAVER_DEVICE_SPECIFIC_CONSTANTS,
    231                 GlobalSettingsProto.Battery.SAVER_DEVICE_SPECIFIC_CONSTANTS);
    232         dumpSetting(s, p,
    233                 Settings.Global.BATTERY_STATS_CONSTANTS,
    234                 GlobalSettingsProto.Battery.STATS_CONSTANTS);
    235         dumpSetting(s, p,
    236                 Settings.Global.BATTERY_TIP_CONSTANTS,
    237                 GlobalSettingsProto.Battery.TIP_CONSTANTS);
    238         p.end(batteryToken);
    239 
    240         final long bleScanToken = p.start(GlobalSettingsProto.BLE_SCAN);
    241         dumpSetting(s, p,
    242                 Settings.Global.BLE_SCAN_ALWAYS_AVAILABLE,
    243                 GlobalSettingsProto.BleScan.ALWAYS_AVAILABLE);
    244         dumpSetting(s, p,
    245                 Settings.Global.BLE_SCAN_LOW_POWER_WINDOW_MS,
    246                 GlobalSettingsProto.BleScan.LOW_POWER_WINDOW_MS);
    247         dumpSetting(s, p,
    248                 Settings.Global.BLE_SCAN_BALANCED_WINDOW_MS,
    249                 GlobalSettingsProto.BleScan.BALANCED_WINDOW_MS);
    250         dumpSetting(s, p,
    251                 Settings.Global.BLE_SCAN_LOW_LATENCY_WINDOW_MS,
    252                 GlobalSettingsProto.BleScan.LOW_LATENCY_WINDOW_MS);
    253         dumpSetting(s, p,
    254                 Settings.Global.BLE_SCAN_LOW_POWER_INTERVAL_MS,
    255                 GlobalSettingsProto.BleScan.LOW_POWER_INTERVAL_MS);
    256         dumpSetting(s, p,
    257                 Settings.Global.BLE_SCAN_BALANCED_INTERVAL_MS,
    258                 GlobalSettingsProto.BleScan.BALANCED_INTERVAL_MS);
    259         dumpSetting(s, p,
    260                 Settings.Global.BLE_SCAN_LOW_LATENCY_INTERVAL_MS,
    261                 GlobalSettingsProto.BleScan.LOW_LATENCY_INTERVAL_MS);
    262         dumpSetting(s, p,
    263                 Settings.Global.BLE_SCAN_BACKGROUND_MODE,
    264                 GlobalSettingsProto.BleScan.BACKGROUND_MODE);
    265         p.end(bleScanToken);
    266 
    267         final long bluetoothToken = p.start(GlobalSettingsProto.BLUETOOTH);
    268         dumpSetting(s, p,
    269                 Settings.Global.BLUETOOTH_CLASS_OF_DEVICE,
    270                 GlobalSettingsProto.Bluetooth.CLASS_OF_DEVICE);
    271         dumpSetting(s, p,
    272                 Settings.Global.BLUETOOTH_DISABLED_PROFILES,
    273                 GlobalSettingsProto.Bluetooth.DISABLED_PROFILES);
    274         dumpSetting(s, p,
    275                 Settings.Global.BLUETOOTH_INTEROPERABILITY_LIST,
    276                 GlobalSettingsProto.Bluetooth.INTEROPERABILITY_LIST);
    277         dumpSetting(s, p,
    278                 Settings.Global.BLUETOOTH_ON,
    279                 GlobalSettingsProto.Bluetooth.ON);
    280         dumpRepeatedSetting(s, p,
    281                 Settings.Global.BLUETOOTH_HEADSET_PRIORITY_PREFIX,
    282                 GlobalSettingsProto.Bluetooth.HEADSET_PRIORITIES);
    283         dumpRepeatedSetting(s, p,
    284                 Settings.Global.BLUETOOTH_A2DP_SINK_PRIORITY_PREFIX,
    285                 GlobalSettingsProto.Bluetooth.A2DP_SINK_PRIORITIES);
    286         dumpRepeatedSetting(s, p,
    287                 Settings.Global.BLUETOOTH_A2DP_SRC_PRIORITY_PREFIX,
    288                 GlobalSettingsProto.Bluetooth.A2DP_SRC_PRIORITIES);
    289         dumpRepeatedSetting(s, p,
    290                 Settings.Global.BLUETOOTH_A2DP_SUPPORTS_OPTIONAL_CODECS_PREFIX,
    291                 GlobalSettingsProto.Bluetooth.A2DP_SUPPORTS_OPTIONAL_CODECS);
    292         dumpRepeatedSetting(s, p,
    293                 Settings.Global.BLUETOOTH_A2DP_OPTIONAL_CODECS_ENABLED_PREFIX,
    294                 GlobalSettingsProto.Bluetooth.A2DP_OPTIONAL_CODECS_ENABLED);
    295         dumpRepeatedSetting(s, p,
    296                 Settings.Global.BLUETOOTH_INPUT_DEVICE_PRIORITY_PREFIX,
    297                 GlobalSettingsProto.Bluetooth.INPUT_DEVICE_PRIORITIES);
    298         dumpRepeatedSetting(s, p,
    299                 Settings.Global.BLUETOOTH_MAP_PRIORITY_PREFIX,
    300                 GlobalSettingsProto.Bluetooth.MAP_PRIORITIES);
    301         dumpRepeatedSetting(s, p,
    302                 Settings.Global.BLUETOOTH_MAP_CLIENT_PRIORITY_PREFIX,
    303                 GlobalSettingsProto.Bluetooth.MAP_CLIENT_PRIORITIES);
    304         dumpRepeatedSetting(s, p,
    305                 Settings.Global.BLUETOOTH_PBAP_CLIENT_PRIORITY_PREFIX,
    306                 GlobalSettingsProto.Bluetooth.PBAP_CLIENT_PRIORITIES);
    307         dumpRepeatedSetting(s, p,
    308                 Settings.Global.BLUETOOTH_SAP_PRIORITY_PREFIX,
    309                 GlobalSettingsProto.Bluetooth.SAP_PRIORITIES);
    310         dumpRepeatedSetting(s, p,
    311                 Settings.Global.BLUETOOTH_PAN_PRIORITY_PREFIX,
    312                 GlobalSettingsProto.Bluetooth.PAN_PRIORITIES);
    313         dumpRepeatedSetting(s, p,
    314                 Settings.Global.BLUETOOTH_HEARING_AID_PRIORITY_PREFIX,
    315                 GlobalSettingsProto.Bluetooth.HEARING_AID_PRIORITIES);
    316         p.end(bluetoothToken);
    317 
    318         dumpSetting(s, p,
    319                 Settings.Global.BOOT_COUNT,
    320                 GlobalSettingsProto.BOOT_COUNT);
    321         dumpSetting(s, p,
    322                 Settings.Global.BUGREPORT_IN_POWER_MENU,
    323                 GlobalSettingsProto.BUGREPORT_IN_POWER_MENU);
    324         dumpSetting(s, p,
    325                 Settings.Global.CALL_AUTO_RETRY,
    326                 GlobalSettingsProto.CALL_AUTO_RETRY);
    327 
    328         final long captivePortalToken = p.start(GlobalSettingsProto.CAPTIVE_PORTAL);
    329         dumpSetting(s, p,
    330                 Settings.Global.CAPTIVE_PORTAL_MODE,
    331                 GlobalSettingsProto.CaptivePortal.MODE);
    332         dumpSetting(s, p,
    333                 Settings.Global.CAPTIVE_PORTAL_DETECTION_ENABLED,
    334                 GlobalSettingsProto.CaptivePortal.DETECTION_ENABLED);
    335         dumpSetting(s, p,
    336                 Settings.Global.CAPTIVE_PORTAL_SERVER,
    337                 GlobalSettingsProto.CaptivePortal.SERVER);
    338         dumpSetting(s, p,
    339                 Settings.Global.CAPTIVE_PORTAL_HTTPS_URL,
    340                 GlobalSettingsProto.CaptivePortal.HTTPS_URL);
    341         dumpSetting(s, p,
    342                 Settings.Global.CAPTIVE_PORTAL_HTTP_URL,
    343                 GlobalSettingsProto.CaptivePortal.HTTP_URL);
    344         dumpSetting(s, p,
    345                 Settings.Global.CAPTIVE_PORTAL_FALLBACK_URL,
    346                 GlobalSettingsProto.CaptivePortal.FALLBACK_URL);
    347         dumpSetting(s, p,
    348                 Settings.Global.CAPTIVE_PORTAL_OTHER_FALLBACK_URLS,
    349                 GlobalSettingsProto.CaptivePortal.OTHER_FALLBACK_URLS);
    350         dumpSetting(s, p,
    351                 Settings.Global.CAPTIVE_PORTAL_USE_HTTPS,
    352                 GlobalSettingsProto.CaptivePortal.USE_HTTPS);
    353         dumpSetting(s, p,
    354                 Settings.Global.CAPTIVE_PORTAL_USER_AGENT,
    355                 GlobalSettingsProto.CaptivePortal.USER_AGENT);
    356         p.end(captivePortalToken);
    357 
    358         final long carrierToken = p.start(GlobalSettingsProto.CARRIER);
    359         dumpSetting(s, p,
    360                 Settings.Global.CARRIER_APP_WHITELIST,
    361                 GlobalSettingsProto.Carrier.APP_WHITELIST);
    362         dumpSetting(s, p,
    363                 Settings.Global.CARRIER_APP_NAMES,
    364                 GlobalSettingsProto.Carrier.APP_NAMES);
    365         dumpSetting(s, p,
    366                 Settings.Global.INSTALL_CARRIER_APP_NOTIFICATION_PERSISTENT,
    367                 GlobalSettingsProto.Carrier.INSTALL_CARRIER_APP_NOTIFICATION_PERSISTENT);
    368         dumpSetting(s, p,
    369                 Settings.Global.INSTALL_CARRIER_APP_NOTIFICATION_SLEEP_MILLIS,
    370                 GlobalSettingsProto.Carrier.INSTALL_CARRIER_APP_NOTIFICATION_SLEEP_MILLIS);
    371         p.end(carrierToken);
    372 
    373         final long cdmaToken = p.start(GlobalSettingsProto.CDMA);
    374         dumpSetting(s, p,
    375                 Settings.Global.CDMA_CELL_BROADCAST_SMS,
    376                 GlobalSettingsProto.Cdma.CELL_BROADCAST_SMS);
    377         dumpSetting(s, p,
    378                 Settings.Global.CDMA_ROAMING_MODE,
    379                 GlobalSettingsProto.Cdma.ROAMING_MODE);
    380         dumpSetting(s, p,
    381                 Settings.Global.CDMA_SUBSCRIPTION_MODE,
    382                 GlobalSettingsProto.Cdma.SUBSCRIPTION_MODE);
    383         p.end(cdmaToken);
    384 
    385         dumpSetting(s, p,
    386                 Settings.Global.CELL_ON,
    387                 GlobalSettingsProto.CELL_ON);
    388 
    389         final long certPinToken = p.start(GlobalSettingsProto.CERT_PIN);
    390         dumpSetting(s, p,
    391                 Settings.Global.CERT_PIN_UPDATE_CONTENT_URL,
    392                 GlobalSettingsProto.CertPin.UPDATE_CONTENT_URL);
    393         dumpSetting(s, p,
    394                 Settings.Global.CERT_PIN_UPDATE_METADATA_URL,
    395                 GlobalSettingsProto.CertPin.UPDATE_METADATA_URL);
    396         p.end(certPinToken);
    397 
    398         dumpSetting(s, p,
    399                 Settings.Global.CHAINED_BATTERY_ATTRIBUTION_ENABLED,
    400                 GlobalSettingsProto.CHAINED_BATTERY_ATTRIBUTION_ENABLED);
    401         dumpSetting(s, p,
    402                 Settings.Global.COMPATIBILITY_MODE,
    403                 GlobalSettingsProto.COMPATIBILITY_MODE);
    404 
    405         final long connectivityToken = p.start(GlobalSettingsProto.CONNECTIVITY);
    406         dumpSetting(s, p,
    407                 Settings.Global.CONNECTIVITY_METRICS_BUFFER_SIZE,
    408                 GlobalSettingsProto.Connectivity.METRICS_BUFFER_SIZE);
    409         dumpSetting(s, p,
    410                 Settings.Global.CONNECTIVITY_CHANGE_DELAY,
    411                 GlobalSettingsProto.Connectivity.CHANGE_DELAY);
    412         dumpSetting(s, p,
    413                 Settings.Global.CONNECTIVITY_SAMPLING_INTERVAL_IN_SECONDS,
    414                 GlobalSettingsProto.Connectivity.SAMPLING_INTERVAL_IN_SECONDS);
    415         p.end(connectivityToken);
    416 
    417         // Settings.Global.CONTACT_METADATA_SYNC intentionally excluded since it's deprecated.
    418         dumpSetting(s, p,
    419                 Settings.Global.CONTACT_METADATA_SYNC_ENABLED,
    420                 GlobalSettingsProto.CONTACT_METADATA_SYNC_ENABLED);
    421         dumpSetting(s, p,
    422                 Settings.Global.CONTACTS_DATABASE_WAL_ENABLED,
    423                 GlobalSettingsProto.CONTACTS_DATABASE_WAL_ENABLED);
    424 
    425         final long dataToken = p.start(GlobalSettingsProto.DATA);
    426         // Settings.Global.DEFAULT_RESTRICT_BACKGROUND_DATA intentionally excluded.
    427         dumpSetting(s, p,
    428                 Settings.Global.DATA_ACTIVITY_TIMEOUT_MOBILE,
    429                 GlobalSettingsProto.Data.ACTIVITY_TIMEOUT_MOBILE);
    430         dumpSetting(s, p,
    431                 Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI,
    432                 GlobalSettingsProto.Data.ACTIVITY_TIMEOUT_WIFI);
    433         dumpSetting(s, p,
    434                 Settings.Global.DATA_ROAMING,
    435                 GlobalSettingsProto.Data.ROAMING);
    436         dumpSetting(s, p,
    437                 Settings.Global.DATA_STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS,
    438                 GlobalSettingsProto.Data.STALL_ALARM_NON_AGGRESSIVE_DELAY_IN_MS);
    439         dumpSetting(s, p,
    440                 Settings.Global.DATA_STALL_ALARM_AGGRESSIVE_DELAY_IN_MS,
    441                 GlobalSettingsProto.Data.STALL_ALARM_AGGRESSIVE_DELAY_IN_MS);
    442         p.end(dataToken);
    443 
    444         final long databaseToken = p.start(GlobalSettingsProto.DATABASE);
    445         dumpSetting(s, p,
    446                 Settings.Global.DATABASE_DOWNGRADE_REASON,
    447                 GlobalSettingsProto.Database.DOWNGRADE_REASON);
    448         dumpSetting(s, p,
    449                 Settings.Global.DATABASE_CREATION_BUILDID,
    450                 GlobalSettingsProto.Database.CREATION_BUILDID);
    451         p.end(databaseToken);
    452 
    453         final long debugToken = p.start(GlobalSettingsProto.DEBUG);
    454         dumpSetting(s, p,
    455                 Settings.Global.DEBUG_APP,
    456                 GlobalSettingsProto.Debug.APP);
    457         dumpSetting(s, p,
    458                 Settings.Global.DEBUG_VIEW_ATTRIBUTES,
    459                 GlobalSettingsProto.Debug.VIEW_ATTRIBUTES);
    460         dumpSetting(s, p,
    461                 Settings.Global.DEBUG_VIEW_ATTRIBUTES_APPLICATION_PACKAGE,
    462                 GlobalSettingsProto.Debug.VIEW_ATTRIBUTES_APPLICATION_PACKAGE);
    463         p.end(debugToken);
    464 
    465         final long defaultToken = p.start(GlobalSettingsProto.DEFAULT);
    466         // Settings.Global.DEFAULT_SM_DP_PLUS intentionally excluded.
    467         dumpSetting(s, p,
    468                 Settings.Global.DEFAULT_INSTALL_LOCATION,
    469                 GlobalSettingsProto.Default.INSTALL_LOCATION);
    470         dumpSetting(s, p,
    471                 Settings.Global.DEFAULT_DNS_SERVER,
    472                 GlobalSettingsProto.Default.DNS_SERVER);
    473         p.end(defaultToken);
    474 
    475         final long developmentToken = p.start(GlobalSettingsProto.DEVELOPMENT);
    476         dumpSetting(s, p,
    477                 Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES,
    478                 GlobalSettingsProto.Development.FORCE_RESIZABLE_ACTIVITIES);
    479         dumpSetting(s, p,
    480                 Settings.Global.DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT,
    481                 GlobalSettingsProto.Development.ENABLE_FREEFORM_WINDOWS_SUPPORT);
    482         dumpSetting(s, p,
    483                 Settings.Global.DEVELOPMENT_SETTINGS_ENABLED,
    484                 GlobalSettingsProto.Development.SETTINGS_ENABLED);
    485         dumpSetting(s, p,
    486                 Settings.Global.DEVELOPMENT_FORCE_RTL,
    487                 GlobalSettingsProto.Development.FORCE_RTL);
    488         dumpSetting(s, p,
    489                 Settings.Global.EMULATE_DISPLAY_CUTOUT,
    490                 GlobalSettingsProto.Development.EMULATE_DISPLAY_CUTOUT);
    491         dumpSetting(s, p,
    492                 Settings.Global.DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS,
    493                 GlobalSettingsProto.Development.FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS);
    494         p.end(developmentToken);
    495 
    496         final long deviceToken = p.start(GlobalSettingsProto.DEVICE);
    497         dumpSetting(s, p,
    498                 Settings.Global.DEVICE_NAME,
    499                 GlobalSettingsProto.Device.NAME);
    500         dumpSetting(s, p,
    501                 Settings.Global.DEVICE_PROVISIONED,
    502                 GlobalSettingsProto.Device.PROVISIONED);
    503         dumpSetting(s, p,
    504                 Settings.Global.DEVICE_PROVISIONING_MOBILE_DATA_ENABLED,
    505                 GlobalSettingsProto.Device.PROVISIONING_MOBILE_DATA_ENABLED);
    506         dumpSetting(s, p,
    507                 Settings.Global.DEVICE_IDLE_CONSTANTS,
    508                 GlobalSettingsProto.Device.IDLE_CONSTANTS);
    509         dumpSetting(s, p,
    510                 Settings.Global.DEVICE_POLICY_CONSTANTS,
    511                 GlobalSettingsProto.Device.POLICY_CONSTANTS);
    512         dumpSetting(s, p,
    513                 Settings.Global.DEVICE_DEMO_MODE,
    514                 GlobalSettingsProto.Device.DEMO_MODE);
    515         p.end(deviceToken);
    516 
    517         dumpSetting(s, p,
    518                 Settings.Global.DISK_FREE_CHANGE_REPORTING_THRESHOLD,
    519                 GlobalSettingsProto.DISK_FREE_CHANGE_REPORTING_THRESHOLD);
    520 
    521         final long displayToken = p.start(GlobalSettingsProto.DISPLAY);
    522         dumpSetting(s, p,
    523                 Settings.Global.DISPLAY_SIZE_FORCED,
    524                 GlobalSettingsProto.Display.SIZE_FORCED);
    525         dumpSetting(s, p,
    526                 Settings.Global.DISPLAY_SCALING_FORCE,
    527                 GlobalSettingsProto.Display.SCALING_FORCE);
    528         dumpSetting(s, p,
    529                 Settings.Global.DISPLAY_PANEL_LPM,
    530                 GlobalSettingsProto.Display.PANEL_LPM);
    531         p.end(displayToken);
    532 
    533         final long dnsResolverToken = p.start(GlobalSettingsProto.DNS_RESOLVER);
    534         dumpSetting(s, p,
    535                 Settings.Global.DNS_RESOLVER_SAMPLE_VALIDITY_SECONDS,
    536                 GlobalSettingsProto.DnsResolver.SAMPLE_VALIDITY_SECONDS);
    537         dumpSetting(s, p,
    538                 Settings.Global.DNS_RESOLVER_SUCCESS_THRESHOLD_PERCENT,
    539                 GlobalSettingsProto.DnsResolver.SUCCESS_THRESHOLD_PERCENT);
    540         dumpSetting(s, p,
    541                 Settings.Global.DNS_RESOLVER_MIN_SAMPLES,
    542                 GlobalSettingsProto.DnsResolver.MIN_SAMPLES);
    543         dumpSetting(s, p,
    544                 Settings.Global.DNS_RESOLVER_MAX_SAMPLES,
    545                 GlobalSettingsProto.DnsResolver.MAX_SAMPLES);
    546         p.end(dnsResolverToken);
    547 
    548         dumpSetting(s, p,
    549                 Settings.Global.DOCK_AUDIO_MEDIA_ENABLED,
    550                 GlobalSettingsProto.DOCK_AUDIO_MEDIA_ENABLED);
    551 
    552         final long downloadToken = p.start(GlobalSettingsProto.DOWNLOAD);
    553         dumpSetting(s, p,
    554                 Settings.Global.DOWNLOAD_MAX_BYTES_OVER_MOBILE,
    555                 GlobalSettingsProto.Download.MAX_BYTES_OVER_MOBILE);
    556         dumpSetting(s, p,
    557                 Settings.Global.DOWNLOAD_RECOMMENDED_MAX_BYTES_OVER_MOBILE,
    558                 GlobalSettingsProto.Download.RECOMMENDED_MAX_BYTES_OVER_MOBILE);
    559         p.end(downloadToken);
    560 
    561         final long dropboxToken = p.start(GlobalSettingsProto.DROPBOX);
    562         dumpSetting(s, p,
    563                 Settings.Global.DROPBOX_AGE_SECONDS,
    564                 GlobalSettingsProto.Dropbox.AGE_SECONDS);
    565         dumpSetting(s, p,
    566                 Settings.Global.DROPBOX_MAX_FILES,
    567                 GlobalSettingsProto.Dropbox.MAX_FILES);
    568         dumpSetting(s, p,
    569                 Settings.Global.DROPBOX_QUOTA_KB,
    570                 GlobalSettingsProto.Dropbox.QUOTA_KB);
    571         dumpSetting(s, p,
    572                 Settings.Global.DROPBOX_QUOTA_PERCENT,
    573                 GlobalSettingsProto.Dropbox.QUOTA_PERCENT);
    574         dumpSetting(s, p,
    575                 Settings.Global.DROPBOX_RESERVE_PERCENT,
    576                 GlobalSettingsProto.Dropbox.RESERVE_PERCENT);
    577         dumpRepeatedSetting(s, p,
    578                 Settings.Global.DROPBOX_TAG_PREFIX,
    579                 GlobalSettingsProto.Dropbox.SETTINGS);
    580         p.end(dropboxToken);
    581 
    582         final long dynamicPowerSavingsToken = p.start(GlobalSettingsProto.DYNAMIC_POWER_SAVINGS);
    583         dumpSetting(s, p,
    584                 Settings.Global.DYNAMIC_POWER_SAVINGS_DISABLE_THRESHOLD,
    585                 GlobalSettingsProto.DynamicPowerSavings.DISABLE_THRESHOLD);
    586         dumpSetting(s, p,
    587                 Settings.Global.DYNAMIC_POWER_SAVINGS_ENABLED,
    588                 GlobalSettingsProto.DynamicPowerSavings.ENABLED);
    589         p.end(dynamicPowerSavingsToken);
    590 
    591         final long emergencyToken = p.start(GlobalSettingsProto.EMERGENCY);
    592         dumpSetting(s, p,
    593                 Settings.Global.EMERGENCY_TONE,
    594                 GlobalSettingsProto.Emergency.TONE);
    595         dumpSetting(s, p,
    596                 Settings.Global.EMERGENCY_AFFORDANCE_NEEDED,
    597                 GlobalSettingsProto.Emergency.AFFORDANCE_NEEDED);
    598         p.end(emergencyToken);
    599 
    600         final long enableToken = p.start(GlobalSettingsProto.ENABLE);
    601         dumpSetting(s, p,
    602                 Settings.Global.ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED,
    603                 GlobalSettingsProto.Enable.ACCESSIBILITY_GLOBAL_GESTURE_ENABLED);
    604         dumpSetting(s, p,
    605                 Settings.Global.ENABLE_GPU_DEBUG_LAYERS,
    606                 GlobalSettingsProto.Enable.GPU_DEBUG_LAYERS);
    607         dumpSetting(s, p,
    608                 Settings.Global.ENABLE_EPHEMERAL_FEATURE,
    609                 GlobalSettingsProto.Enable.EPHEMERAL_FEATURE);
    610         dumpSetting(s, p,
    611                 Settings.Global.ENABLE_CELLULAR_ON_BOOT,
    612                 GlobalSettingsProto.Enable.CELLULAR_ON_BOOT);
    613         dumpSetting(s, p,
    614                 Settings.Global.ENABLE_DISKSTATS_LOGGING,
    615                 GlobalSettingsProto.Enable.DISKSTATS_LOGGING);
    616         dumpSetting(s, p,
    617                 Settings.Global.ENABLE_CACHE_QUOTA_CALCULATION,
    618                 GlobalSettingsProto.Enable.CACHE_QUOTA_CALCULATION);
    619         dumpSetting(s, p,
    620                 Settings.Global.ENABLE_DELETION_HELPER_NO_THRESHOLD_TOGGLE,
    621                 GlobalSettingsProto.Enable.DELETION_HELPER_NO_THRESHOLD_TOGGLE);
    622         dumpSetting(s, p,
    623                 Settings.Global.ENABLE_GNSS_RAW_MEAS_FULL_TRACKING,
    624                 GlobalSettingsProto.Enable.GNSS_RAW_MEAS_FULL_TRACKING);
    625         p.end(enableToken);
    626 
    627         dumpSetting(s, p,
    628                 Settings.Global.ENCODED_SURROUND_OUTPUT,
    629                 GlobalSettingsProto.ENCODED_SURROUND_OUTPUT);
    630         dumpSetting(s, p,
    631                 Settings.Global.ENHANCED_4G_MODE_ENABLED,
    632                 GlobalSettingsProto.ENHANCED_4G_MODE_ENABLED);
    633         dumpRepeatedSetting(s, p,
    634                 Settings.Global.ERROR_LOGCAT_PREFIX,
    635                 GlobalSettingsProto.ERROR_LOGCAT_LINES);
    636 
    637         final long euiccToken = p.start(GlobalSettingsProto.EUICC);
    638         dumpSetting(s, p,
    639                 Settings.Global.EUICC_PROVISIONED,
    640                 GlobalSettingsProto.Euicc.PROVISIONED);
    641         dumpSetting(s, p,
    642                 Settings.Global.EUICC_FACTORY_RESET_TIMEOUT_MILLIS,
    643                 GlobalSettingsProto.Euicc.FACTORY_RESET_TIMEOUT_MILLIS);
    644         p.end(euiccToken);
    645 
    646         dumpSetting(s, p,
    647                 Settings.Global.FANCY_IME_ANIMATIONS,
    648                 GlobalSettingsProto.FANCY_IME_ANIMATIONS);
    649         dumpSetting(s, p,
    650                 Settings.Global.FORCE_ALLOW_ON_EXTERNAL,
    651                 GlobalSettingsProto.FORCE_ALLOW_ON_EXTERNAL);
    652         dumpSetting(s, p,
    653                 Settings.Global.FPS_DEVISOR,
    654                 GlobalSettingsProto.FPS_DIVISOR);
    655         dumpSetting(s, p,
    656                 Settings.Global.FSTRIM_MANDATORY_INTERVAL,
    657                 GlobalSettingsProto.FSTRIM_MANDATORY_INTERVAL);
    658 
    659         final long ghpToken = p.start(GlobalSettingsProto.GLOBAL_HTTP_PROXY);
    660         dumpSetting(s, p,
    661                 Settings.Global.GLOBAL_HTTP_PROXY_HOST,
    662                 GlobalSettingsProto.GlobalHttpProxy.HOST);
    663         dumpSetting(s, p,
    664                 Settings.Global.GLOBAL_HTTP_PROXY_PORT,
    665                 GlobalSettingsProto.GlobalHttpProxy.PORT);
    666         dumpSetting(s, p,
    667                 Settings.Global.GLOBAL_HTTP_PROXY_EXCLUSION_LIST,
    668                 GlobalSettingsProto.GlobalHttpProxy.EXCLUSION_LIST);
    669         dumpSetting(s, p,
    670                 Settings.Global.GLOBAL_HTTP_PROXY_PAC,
    671                 GlobalSettingsProto.GlobalHttpProxy.PAC);
    672         dumpSetting(s, p,
    673                 Settings.Global.SET_GLOBAL_HTTP_PROXY,
    674                 GlobalSettingsProto.GlobalHttpProxy.SETTING_UI_ENABLED);
    675         p.end(ghpToken);
    676 
    677         dumpSetting(s, p,
    678                 Settings.Global.GPRS_REGISTER_CHECK_PERIOD_MS,
    679                 GlobalSettingsProto.GPRS_REGISTER_CHECK_PERIOD_MS);
    680 
    681         final long gpuToken = p.start(GlobalSettingsProto.GPU);
    682         dumpSetting(s, p,
    683                 Settings.Global.GPU_DEBUG_APP,
    684                 GlobalSettingsProto.Gpu.DEBUG_APP);
    685         dumpSetting(s, p,
    686                 Settings.Global.GPU_DEBUG_LAYERS,
    687                 GlobalSettingsProto.Gpu.DEBUG_LAYERS);
    688         dumpSetting(s, p,
    689                 Settings.Global.GLOBAL_SETTINGS_ANGLE_DEBUG_PACKAGE,
    690                 GlobalSettingsProto.Gpu.ANGLE_DEBUG_PACKAGE);
    691         dumpSetting(s, p,
    692                 Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_ALL_ANGLE,
    693                 GlobalSettingsProto.Gpu.ANGLE_GL_DRIVER_ALL_ANGLE);
    694         dumpSetting(s, p,
    695                 Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_PKGS,
    696                 GlobalSettingsProto.Gpu.ANGLE_GL_DRIVER_SELECTION_PKGS);
    697         dumpSetting(s, p,
    698                 Settings.Global.GLOBAL_SETTINGS_ANGLE_GL_DRIVER_SELECTION_VALUES,
    699                 GlobalSettingsProto.Gpu.ANGLE_GL_DRIVER_SELECTION_VALUES);
    700         dumpSetting(s, p,
    701                 Settings.Global.GLOBAL_SETTINGS_ANGLE_WHITELIST,
    702                 GlobalSettingsProto.Gpu.ANGLE_WHITELIST);
    703         dumpSetting(s, p,
    704                 Settings.Global.GLOBAL_SETTINGS_SHOW_ANGLE_IN_USE_DIALOG_BOX,
    705                 GlobalSettingsProto.Gpu.SHOW_ANGLE_IN_USE_DIALOG);
    706         dumpSetting(s, p,
    707                 Settings.Global.GPU_DEBUG_LAYER_APP,
    708                 GlobalSettingsProto.Gpu.DEBUG_LAYER_APP);
    709         dumpSetting(s, p,
    710                 Settings.Global.GPU_DEBUG_LAYERS_GLES,
    711                 GlobalSettingsProto.Gpu.DEBUG_LAYERS_GLES);
    712         dumpSetting(s, p,
    713                 Settings.Global.GAME_DRIVER_ALL_APPS,
    714                 GlobalSettingsProto.Gpu.GAME_DRIVER_ALL_APPS);
    715         dumpSetting(s, p,
    716                 Settings.Global.GAME_DRIVER_OPT_IN_APPS,
    717                 GlobalSettingsProto.Gpu.GAME_DRIVER_OPT_IN_APPS);
    718         dumpSetting(s, p,
    719                 Settings.Global.GAME_DRIVER_PRERELEASE_OPT_IN_APPS,
    720                 GlobalSettingsProto.Gpu.GAME_DRIVER_PRERELEASE_OPT_IN_APPS);
    721         dumpSetting(s, p,
    722                 Settings.Global.GAME_DRIVER_OPT_OUT_APPS,
    723                 GlobalSettingsProto.Gpu.GAME_DRIVER_OPT_OUT_APPS);
    724         dumpSetting(s, p,
    725                 Settings.Global.GAME_DRIVER_BLACKLIST,
    726                 GlobalSettingsProto.Gpu.GAME_DRIVER_BLACKLIST);
    727         dumpSetting(s, p,
    728                 Settings.Global.GAME_DRIVER_WHITELIST,
    729                 GlobalSettingsProto.Gpu.GAME_DRIVER_WHITELIST);
    730         dumpSetting(s, p,
    731                 Settings.Global.GAME_DRIVER_BLACKLISTS,
    732                 GlobalSettingsProto.Gpu.GAME_DRIVER_BLACKLISTS);
    733         dumpSetting(s, p,
    734                 Settings.Global.GAME_DRIVER_SPHAL_LIBRARIES,
    735                 GlobalSettingsProto.Gpu.GAME_DRIVER_SPHAL_LIBRARIES);
    736         p.end(gpuToken);
    737 
    738         final long hdmiToken = p.start(GlobalSettingsProto.HDMI);
    739         dumpSetting(s, p,
    740                 Settings.Global.HDMI_CONTROL_ENABLED,
    741                 GlobalSettingsProto.Hdmi.CONTROL_ENABLED);
    742         dumpSetting(s, p,
    743                 Settings.Global.HDMI_SYSTEM_AUDIO_CONTROL_ENABLED,
    744                 GlobalSettingsProto.Hdmi.SYSTEM_AUDIO_CONTROL_ENABLED);
    745         dumpSetting(s, p,
    746                 Settings.Global.HDMI_CONTROL_AUTO_WAKEUP_ENABLED,
    747                 GlobalSettingsProto.Hdmi.CONTROL_AUTO_WAKEUP_ENABLED);
    748         dumpSetting(s, p,
    749                 Settings.Global.HDMI_CONTROL_AUTO_DEVICE_OFF_ENABLED,
    750                 GlobalSettingsProto.Hdmi.CONTROL_AUTO_DEVICE_OFF_ENABLED);
    751         p.end(hdmiToken);
    752 
    753         dumpSetting(s, p,
    754                 Settings.Global.HEADS_UP_NOTIFICATIONS_ENABLED,
    755                 GlobalSettingsProto.HEADS_UP_NOTIFICATIONS_ENABLED);
    756         dumpSetting(s, p,
    757                 Settings.Global.HIDDEN_API_BLACKLIST_EXEMPTIONS,
    758                 GlobalSettingsProto.HIDDEN_API_BLACKLIST_EXEMPTIONS);
    759 
    760         final long inetCondToken = p.start(GlobalSettingsProto.INET_CONDITION);
    761         dumpSetting(s, p,
    762                 Settings.Global.INET_CONDITION_DEBOUNCE_UP_DELAY,
    763                 GlobalSettingsProto.InetCondition.DEBOUNCE_UP_DELAY);
    764         dumpSetting(s, p,
    765                 Settings.Global.INET_CONDITION_DEBOUNCE_DOWN_DELAY,
    766                 GlobalSettingsProto.InetCondition.DEBOUNCE_DOWN_DELAY);
    767         p.end(inetCondToken);
    768 
    769         final long instantAppToken = p.start(GlobalSettingsProto.INSTANT_APP);
    770         dumpSetting(s, p,
    771                 Settings.Global.INSTANT_APP_DEXOPT_ENABLED,
    772                 GlobalSettingsProto.InstantApp.DEXOPT_ENABLED);
    773         dumpSetting(s, p,
    774                 Settings.Global.EPHEMERAL_COOKIE_MAX_SIZE_BYTES,
    775                 GlobalSettingsProto.InstantApp.EPHEMERAL_COOKIE_MAX_SIZE_BYTES);
    776         dumpSetting(s, p,
    777                 Settings.Global.INSTALLED_INSTANT_APP_MIN_CACHE_PERIOD,
    778                 GlobalSettingsProto.InstantApp.INSTALLED_MIN_CACHE_PERIOD);
    779         dumpSetting(s, p,
    780                 Settings.Global.INSTALLED_INSTANT_APP_MAX_CACHE_PERIOD,
    781                 GlobalSettingsProto.InstantApp.INSTALLED_MAX_CACHE_PERIOD);
    782         dumpSetting(s, p,
    783                 Settings.Global.UNINSTALLED_INSTANT_APP_MIN_CACHE_PERIOD,
    784                 GlobalSettingsProto.InstantApp.UNINSTALLED_MIN_CACHE_PERIOD);
    785         dumpSetting(s, p,
    786                 Settings.Global.UNINSTALLED_INSTANT_APP_MAX_CACHE_PERIOD,
    787                 GlobalSettingsProto.InstantApp.UNINSTALLED_MAX_CACHE_PERIOD);
    788         p.end(instantAppToken);
    789 
    790         final long intentFirewallToken = p.start(GlobalSettingsProto.INTENT_FIREWALL);
    791         dumpSetting(s, p,
    792                 Settings.Global.INTENT_FIREWALL_UPDATE_CONTENT_URL,
    793                 GlobalSettingsProto.IntentFirewall.UPDATE_CONTENT_URL);
    794         dumpSetting(s, p,
    795                 Settings.Global.INTENT_FIREWALL_UPDATE_METADATA_URL,
    796                 GlobalSettingsProto.IntentFirewall.UPDATE_METADATA_URL);
    797         p.end(intentFirewallToken);
    798 
    799         dumpSetting(s, p,
    800                 Settings.Global.JOB_SCHEDULER_CONSTANTS,
    801                 GlobalSettingsProto.JOB_SCHEDULER_CONSTANTS);
    802         dumpSetting(s, p,
    803                 Settings.Global.JOB_SCHEDULER_QUOTA_CONTROLLER_CONSTANTS,
    804                 GlobalSettingsProto.JOB_SCHEDULER_QUOTA_CONTROLLER_CONSTANTS);
    805         dumpSetting(s, p,
    806                 Settings.Global.JOB_SCHEDULER_TIME_CONTROLLER_CONSTANTS,
    807                 GlobalSettingsProto.JOB_SCHEDULER_TIME_CONTROLLER_CONSTANTS);
    808         dumpSetting(s, p,
    809                 Settings.Global.KEEP_PROFILE_IN_BACKGROUND,
    810                 GlobalSettingsProto.KEEP_PROFILE_IN_BACKGROUND);
    811 
    812         final long langIdToken = p.start(GlobalSettingsProto.LANG_ID);
    813         dumpSetting(s, p,
    814                 Settings.Global.LANG_ID_UPDATE_CONTENT_URL,
    815                 GlobalSettingsProto.LangId.UPDATE_CONTENT_URL);
    816         dumpSetting(s, p,
    817                 Settings.Global.LANG_ID_UPDATE_METADATA_URL,
    818                 GlobalSettingsProto.LangId.UPDATE_METADATA_URL);
    819         p.end(langIdToken);
    820 
    821         final long locationToken = p.start(GlobalSettingsProto.LOCATION);
    822         dumpSetting(s, p,
    823                 Settings.Global.LOCATION_BACKGROUND_THROTTLE_INTERVAL_MS,
    824                 GlobalSettingsProto.Location.BACKGROUND_THROTTLE_INTERVAL_MS);
    825         dumpSetting(s, p,
    826                 Settings.Global.LOCATION_BACKGROUND_THROTTLE_PROXIMITY_ALERT_INTERVAL_MS,
    827                 GlobalSettingsProto.Location.BACKGROUND_THROTTLE_PROXIMITY_ALERT_INTERVAL_MS);
    828         dumpSetting(s, p,
    829                 Settings.Global.LOCATION_BACKGROUND_THROTTLE_PACKAGE_WHITELIST,
    830                 GlobalSettingsProto.Location.BACKGROUND_THROTTLE_PACKAGE_WHITELIST);
    831         dumpSetting(s, p,
    832                 Settings.Global.LOCATION_SETTINGS_LINK_TO_PERMISSIONS_ENABLED,
    833                 GlobalSettingsProto.Location.SETTINGS_LINK_TO_PERMISSIONS_ENABLED);
    834         dumpSetting(s, p,
    835                 Settings.Global.LOCATION_GLOBAL_KILL_SWITCH,
    836                 GlobalSettingsProto.Location.GLOBAL_KILL_SWITCH);
    837         dumpSetting(s, p,
    838                 Settings.Global.GNSS_SATELLITE_BLACKLIST,
    839                 GlobalSettingsProto.Location.GNSS_SATELLITE_BLACKLIST);
    840         dumpSetting(s, p,
    841                 Settings.Global.GNSS_HAL_LOCATION_REQUEST_DURATION_MILLIS,
    842                 GlobalSettingsProto.Location.GNSS_HAL_LOCATION_REQUEST_DURATION_MILLIS);
    843         dumpSetting(s, p,
    844                 Settings.Global.LOCATION_IGNORE_SETTINGS_PACKAGE_WHITELIST,
    845                 GlobalSettingsProto.Location.IGNORE_SETTINGS_PACKAGE_WHITELIST);
    846         p.end(locationToken);
    847 
    848         final long lpmToken = p.start(GlobalSettingsProto.LOW_POWER_MODE);
    849         dumpSetting(s, p,
    850                 Settings.Global.LOW_POWER_MODE,
    851                 GlobalSettingsProto.LowPowerMode.ENABLED);
    852         dumpSetting(s, p,
    853                 Settings.Global.LOW_POWER_MODE_TRIGGER_LEVEL,
    854                 GlobalSettingsProto.LowPowerMode.TRIGGER_LEVEL);
    855         dumpSetting(s, p,
    856                 Settings.Global.LOW_POWER_MODE_TRIGGER_LEVEL_MAX,
    857                 GlobalSettingsProto.LowPowerMode.TRIGGER_LEVEL_MAX);
    858         dumpSetting(s, p,
    859                 Settings.Global.AUTOMATIC_POWER_SAVE_MODE,
    860                 GlobalSettingsProto.LowPowerMode.AUTOMATIC_POWER_SAVER_MODE);
    861         dumpSetting(s, p,
    862                 Settings.Global.LOW_POWER_MODE_STICKY,
    863                 GlobalSettingsProto.LowPowerMode.STICKY_ENABLED);
    864         dumpSetting(s, p,
    865                 Settings.Global.LOW_POWER_MODE_STICKY_AUTO_DISABLE_ENABLED,
    866                 GlobalSettingsProto.LowPowerMode.STICKY_AUTO_DISABLE_ENABLED);
    867         dumpSetting(s, p,
    868                 Settings.Global.LOW_POWER_MODE_STICKY_AUTO_DISABLE_LEVEL,
    869                 GlobalSettingsProto.LowPowerMode.STICKY_AUTO_DISABLE_LEVEL);
    870         p.end(lpmToken);
    871 
    872         dumpSetting(s, p,
    873                 Settings.Global.LTE_SERVICE_FORCED,
    874                 GlobalSettingsProto.LTE_SERVICE_FORCED);
    875         dumpSetting(s, p,
    876                 Settings.Global.MDC_INITIAL_MAX_RETRY,
    877                 GlobalSettingsProto.MDC_INITIAL_MAX_RETRY);
    878 
    879         final long mhlToken = p.start(GlobalSettingsProto.MHL);
    880         dumpSetting(s, p,
    881                 Settings.Global.MHL_INPUT_SWITCHING_ENABLED,
    882                 GlobalSettingsProto.Mhl.INPUT_SWITCHING_ENABLED);
    883         dumpSetting(s, p,
    884                 Settings.Global.MHL_POWER_CHARGE_ENABLED,
    885                 GlobalSettingsProto.Mhl.POWER_CHARGE_ENABLED);
    886         p.end(mhlToken);
    887 
    888         final long mobileDataToken = p.start(GlobalSettingsProto.MOBILE_DATA);
    889         dumpSetting(s, p,
    890                 Settings.Global.MOBILE_DATA,
    891                 GlobalSettingsProto.MobileData.ALLOWED);
    892         dumpSetting(s, p,
    893                 Settings.Global.MOBILE_DATA_ALWAYS_ON,
    894                 GlobalSettingsProto.MobileData.ALWAYS_ON);
    895         p.end(mobileDataToken);
    896 
    897         dumpSetting(s, p,
    898                 Settings.Global.MODE_RINGER,
    899                 GlobalSettingsProto.MODE_RINGER);
    900 
    901         final long multiSimToken = p.start(GlobalSettingsProto.MULTI_SIM);
    902         dumpSetting(s, p,
    903                 Settings.Global.MULTI_SIM_VOICE_CALL_SUBSCRIPTION,
    904                 GlobalSettingsProto.MultiSim.VOICE_CALL_SUBSCRIPTION);
    905         dumpSetting(s, p,
    906                 Settings.Global.MULTI_SIM_VOICE_PROMPT,
    907                 GlobalSettingsProto.MultiSim.VOICE_PROMPT);
    908         dumpSetting(s, p,
    909                 Settings.Global.MULTI_SIM_DATA_CALL_SUBSCRIPTION,
    910                 GlobalSettingsProto.MultiSim.DATA_CALL_SUBSCRIPTION);
    911         dumpSetting(s, p,
    912                 Settings.Global.MULTI_SIM_SMS_SUBSCRIPTION,
    913                 GlobalSettingsProto.MultiSim.SMS_SUBSCRIPTION);
    914         dumpSetting(s, p,
    915                 Settings.Global.MULTI_SIM_SMS_PROMPT,
    916                 GlobalSettingsProto.MultiSim.SMS_PROMPT);
    917         p.end(multiSimToken);
    918 
    919         dumpSetting(s, p,
    920                 Settings.Global.NATIVE_FLAGS_HEALTH_CHECK_ENABLED,
    921                 GlobalSettingsProto.NATIVE_FLAGS_HEALTH_CHECK_ENABLED);
    922 
    923         final long netstatsToken = p.start(GlobalSettingsProto.NETSTATS);
    924         dumpSetting(s, p,
    925                 Settings.Global.NETSTATS_ENABLED,
    926                 GlobalSettingsProto.Netstats.ENABLED);
    927         dumpSetting(s, p,
    928                 Settings.Global.NETSTATS_POLL_INTERVAL,
    929                 GlobalSettingsProto.Netstats.POLL_INTERVAL);
    930         dumpSetting(s, p,
    931                 Settings.Global.NETSTATS_TIME_CACHE_MAX_AGE,
    932                 GlobalSettingsProto.Netstats.TIME_CACHE_MAX_AGE);
    933         dumpSetting(s, p,
    934                 Settings.Global.NETSTATS_GLOBAL_ALERT_BYTES,
    935                 GlobalSettingsProto.Netstats.GLOBAL_ALERT_BYTES);
    936         dumpSetting(s, p,
    937                 Settings.Global.NETSTATS_SAMPLE_ENABLED,
    938                 GlobalSettingsProto.Netstats.SAMPLE_ENABLED);
    939         dumpSetting(s, p,
    940                 Settings.Global.NETSTATS_AUGMENT_ENABLED,
    941                 GlobalSettingsProto.Netstats.AUGMENT_ENABLED);
    942         dumpSetting(s, p,
    943                 Settings.Global.NETSTATS_DEV_BUCKET_DURATION,
    944                 GlobalSettingsProto.Netstats.DEV_BUCKET_DURATION);
    945         dumpSetting(s, p,
    946                 Settings.Global.NETSTATS_DEV_PERSIST_BYTES,
    947                 GlobalSettingsProto.Netstats.DEV_PERSIST_BYTES);
    948         dumpSetting(s, p,
    949                 Settings.Global.NETSTATS_DEV_ROTATE_AGE,
    950                 GlobalSettingsProto.Netstats.DEV_ROTATE_AGE);
    951         dumpSetting(s, p,
    952                 Settings.Global.NETSTATS_DEV_DELETE_AGE,
    953                 GlobalSettingsProto.Netstats.DEV_DELETE_AGE);
    954         dumpSetting(s, p,
    955                 Settings.Global.NETSTATS_UID_BUCKET_DURATION,
    956                 GlobalSettingsProto.Netstats.UID_BUCKET_DURATION);
    957         dumpSetting(s, p,
    958                 Settings.Global.NETSTATS_UID_PERSIST_BYTES,
    959                 GlobalSettingsProto.Netstats.UID_PERSIST_BYTES);
    960         dumpSetting(s, p,
    961                 Settings.Global.NETSTATS_UID_ROTATE_AGE,
    962                 GlobalSettingsProto.Netstats.UID_ROTATE_AGE);
    963         dumpSetting(s, p,
    964                 Settings.Global.NETSTATS_UID_DELETE_AGE,
    965                 GlobalSettingsProto.Netstats.UID_DELETE_AGE);
    966         dumpSetting(s, p,
    967                 Settings.Global.NETSTATS_UID_TAG_BUCKET_DURATION,
    968                 GlobalSettingsProto.Netstats.UID_TAG_BUCKET_DURATION);
    969         dumpSetting(s, p,
    970                 Settings.Global.NETSTATS_UID_TAG_PERSIST_BYTES,
    971                 GlobalSettingsProto.Netstats.UID_TAG_PERSIST_BYTES);
    972         dumpSetting(s, p,
    973                 Settings.Global.NETSTATS_UID_TAG_ROTATE_AGE,
    974                 GlobalSettingsProto.Netstats.UID_TAG_ROTATE_AGE);
    975         dumpSetting(s, p,
    976                 Settings.Global.NETSTATS_UID_TAG_DELETE_AGE,
    977                 GlobalSettingsProto.Netstats.UID_TAG_DELETE_AGE);
    978         p.end(netstatsToken);
    979 
    980         final long networkToken = p.start(GlobalSettingsProto.NETWORK);
    981         dumpSetting(s, p,
    982                 Settings.Global.NETWORK_PREFERENCE,
    983                 GlobalSettingsProto.Network.PREFERENCE);
    984         dumpSetting(s, p,
    985                 Settings.Global.PREFERRED_NETWORK_MODE,
    986                 GlobalSettingsProto.Network.PREFERRED_NETWORK_MODE);
    987         dumpSetting(s, p,
    988                 Settings.Global.NETWORK_SCORER_APP,
    989                 GlobalSettingsProto.Network.SCORER_APP);
    990         dumpSetting(s, p,
    991                 Settings.Global.NETWORK_SWITCH_NOTIFICATION_DAILY_LIMIT,
    992                 GlobalSettingsProto.Network.SWITCH_NOTIFICATION_DAILY_LIMIT);
    993         dumpSetting(s, p,
    994                 Settings.Global.NETWORK_SWITCH_NOTIFICATION_RATE_LIMIT_MILLIS,
    995                 GlobalSettingsProto.Network.SWITCH_NOTIFICATION_RATE_LIMIT_MILLIS);
    996         dumpSetting(s, p,
    997                 Settings.Global.NETWORK_AVOID_BAD_WIFI,
    998                 GlobalSettingsProto.Network.AVOID_BAD_WIFI);
    999         dumpSetting(s, p,
   1000                 Settings.Global.NETWORK_METERED_MULTIPATH_PREFERENCE,
   1001                 GlobalSettingsProto.Network.METERED_MULTIPATH_PREFERENCE);
   1002         dumpSetting(s, p,
   1003                 Settings.Global.NETWORK_WATCHLIST_LAST_REPORT_TIME,
   1004                 GlobalSettingsProto.Network.WATCHLIST_LAST_REPORT_TIME);
   1005         dumpSetting(s, p,
   1006                 Settings.Global.NETWORK_SCORING_UI_ENABLED,
   1007                 GlobalSettingsProto.Network.SCORING_UI_ENABLED);
   1008         dumpSetting(s, p,
   1009                 Settings.Global.NETWORK_RECOMMENDATIONS_ENABLED,
   1010                 GlobalSettingsProto.Network.RECOMMENDATIONS_ENABLED);
   1011         dumpSetting(s, p,
   1012                 Settings.Global.NETWORK_RECOMMENDATIONS_PACKAGE,
   1013                 GlobalSettingsProto.Network.RECOMMENDATIONS_PACKAGE);
   1014         dumpSetting(s, p,
   1015                 Settings.Global.NETWORK_RECOMMENDATION_REQUEST_TIMEOUT_MS,
   1016                 GlobalSettingsProto.Network.RECOMMENDATION_REQUEST_TIMEOUT_MS);
   1017         dumpSetting(s, p,
   1018                 Settings.Global.NETWORK_WATCHLIST_ENABLED,
   1019                 GlobalSettingsProto.Network.WATCHLIST_ENABLED);
   1020         dumpSetting(s, p,
   1021                 Settings.Global.NETWORK_SCORING_PROVISIONED,
   1022                 GlobalSettingsProto.Network.SCORING_PROVISIONED);
   1023         dumpSetting(s, p,
   1024                 Settings.Global.NETWORK_ACCESS_TIMEOUT_MS,
   1025                 GlobalSettingsProto.Network.ACCESS_TIMEOUT_MS);
   1026         dumpSetting(s, p,
   1027                 Settings.Global.RECOMMENDED_NETWORK_EVALUATOR_CACHE_EXPIRY_MS,
   1028                 GlobalSettingsProto.Network.RECOMMENDED_NETWORK_EVALUATOR_CACHE_EXPIRY_MS);
   1029         p.end(networkToken);
   1030 
   1031         dumpSetting(s, p,
   1032                 Settings.Global.NEW_CONTACT_AGGREGATOR,
   1033                 GlobalSettingsProto.NEW_CONTACT_AGGREGATOR);
   1034         dumpSetting(s, p,
   1035                 Settings.Global.NIGHT_DISPLAY_FORCED_AUTO_MODE_AVAILABLE,
   1036                 GlobalSettingsProto.NIGHT_DISPLAY_FORCED_AUTO_MODE_AVAILABLE);
   1037 
   1038         final long nitzUpdateToken = p.start(GlobalSettingsProto.NITZ_UPDATE);
   1039         dumpSetting(s, p,
   1040                 Settings.Global.NITZ_UPDATE_DIFF,
   1041                 GlobalSettingsProto.NitzUpdate.DIFF);
   1042         dumpSetting(s, p,
   1043                 Settings.Global.NITZ_UPDATE_SPACING,
   1044                 GlobalSettingsProto.NitzUpdate.SPACING);
   1045         p.end(nitzUpdateToken);
   1046 
   1047         final long notificationToken = p.start(GlobalSettingsProto.NOTIFICATION);
   1048         dumpSetting(s, p,
   1049                 Settings.Global.MAX_NOTIFICATION_ENQUEUE_RATE,
   1050                 GlobalSettingsProto.Notification.MAX_NOTIFICATION_ENQUEUE_RATE);
   1051         dumpSetting(s, p,
   1052                 Settings.Global.SHOW_NOTIFICATION_CHANNEL_WARNINGS,
   1053                 GlobalSettingsProto.Notification.SHOW_NOTIFICATION_CHANNEL_WARNINGS);
   1054         // The list of snooze options for notifications. This is encoded as a key=value list,
   1055         // separated by commas.
   1056         dumpSetting(s, p,
   1057                 Settings.Global.NOTIFICATION_SNOOZE_OPTIONS,
   1058                 GlobalSettingsProto.Notification.SNOOZE_OPTIONS);
   1059         dumpSetting(s, p,
   1060                 Settings.Global.SMART_REPLIES_IN_NOTIFICATIONS_FLAGS,
   1061                 GlobalSettingsProto.Notification.SMART_REPLIES_IN_NOTIFICATIONS_FLAGS);
   1062         dumpSetting(s, p,
   1063                 Settings.Global.SMART_SUGGESTIONS_IN_NOTIFICATIONS_FLAGS,
   1064                 GlobalSettingsProto.Notification.SMART_SUGGESTIONS_IN_NOTIFICATIONS_FLAGS);
   1065         p.end(notificationToken);
   1066 
   1067         dumpSetting(s, p,
   1068                 Settings.Global.NSD_ON,
   1069                 GlobalSettingsProto.NSD_ON);
   1070 
   1071         final long ntpToken = p.start(GlobalSettingsProto.NTP);
   1072         dumpSetting(s, p,
   1073                 Settings.Global.NTP_SERVER,
   1074                 GlobalSettingsProto.Ntp.SERVER);
   1075         dumpSetting(s, p,
   1076                 Settings.Global.NTP_TIMEOUT,
   1077                 GlobalSettingsProto.Ntp.TIMEOUT_MS);
   1078         p.end(ntpToken);
   1079 
   1080         final long uasbToken = p.start(GlobalSettingsProto.USER_ABSENT_SMALL_BATTERY);
   1081         dumpSetting(s, p,
   1082                 Settings.Global.USER_ABSENT_RADIOS_OFF_FOR_SMALL_BATTERY_ENABLED,
   1083                 GlobalSettingsProto.UserAbsentSmallBattery.RADIOS_OFF_ENABLED);
   1084         dumpSetting(s, p,
   1085                 Settings.Global.USER_ABSENT_TOUCH_OFF_FOR_SMALL_BATTERY_ENABLED,
   1086                 GlobalSettingsProto.UserAbsentSmallBattery.TOUCH_OFF_ENABLED);
   1087         p.end(uasbToken);
   1088 
   1089         dumpSetting(s, p,
   1090                 Settings.Global.OTA_DISABLE_AUTOMATIC_UPDATE,
   1091                 GlobalSettingsProto.OTA_DISABLE_AUTOMATIC_UPDATE);
   1092         dumpSetting(s, p,
   1093                 Settings.Global.OVERLAY_DISPLAY_DEVICES,
   1094                 GlobalSettingsProto.OVERLAY_DISPLAY_DEVICES);
   1095         dumpSetting(s, p,
   1096                 Settings.Global.OVERRIDE_SETTINGS_PROVIDER_RESTORE_ANY_VERSION,
   1097                 GlobalSettingsProto.OVERRIDE_SETTINGS_PROVIDER_RESTORE_ANY_VERSION);
   1098         dumpSetting(s, p,
   1099                 Settings.Global.PAC_CHANGE_DELAY,
   1100                 GlobalSettingsProto.PAC_CHANGE_DELAY);
   1101 
   1102         final long pkgVerifierToken = p.start(GlobalSettingsProto.PACKAGE_VERIFIER);
   1103         dumpSetting(s, p,
   1104                 Settings.Global.PACKAGE_VERIFIER_ENABLE,
   1105                 GlobalSettingsProto.PackageVerifier.ENABLED);
   1106         dumpSetting(s, p,
   1107                 Settings.Global.PACKAGE_VERIFIER_TIMEOUT,
   1108                 GlobalSettingsProto.PackageVerifier.TIMEOUT);
   1109         dumpSetting(s, p,
   1110                 Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE,
   1111                 GlobalSettingsProto.PackageVerifier.DEFAULT_RESPONSE);
   1112         dumpSetting(s, p,
   1113                 Settings.Global.PACKAGE_VERIFIER_SETTING_VISIBLE,
   1114                 GlobalSettingsProto.PackageVerifier.SETTING_VISIBLE);
   1115         dumpSetting(s, p,
   1116                 Settings.Global.PACKAGE_VERIFIER_INCLUDE_ADB,
   1117                 GlobalSettingsProto.PackageVerifier.INCLUDE_ADB);
   1118         p.end(pkgVerifierToken);
   1119 
   1120         final long pdpWatchdogToken = p.start(GlobalSettingsProto.PDP_WATCHDOG);
   1121         dumpSetting(s, p,
   1122                 Settings.Global.PDP_WATCHDOG_POLL_INTERVAL_MS,
   1123                 GlobalSettingsProto.PdpWatchdog.POLL_INTERVAL_MS);
   1124         dumpSetting(s, p,
   1125                 Settings.Global.PDP_WATCHDOG_LONG_POLL_INTERVAL_MS,
   1126                 GlobalSettingsProto.PdpWatchdog.LONG_POLL_INTERVAL_MS);
   1127         dumpSetting(s, p,
   1128                 Settings.Global.PDP_WATCHDOG_ERROR_POLL_INTERVAL_MS,
   1129                 GlobalSettingsProto.PdpWatchdog.ERROR_POLL_INTERVAL_MS);
   1130         dumpSetting(s, p,
   1131                 Settings.Global.PDP_WATCHDOG_TRIGGER_PACKET_COUNT,
   1132                 GlobalSettingsProto.PdpWatchdog.TRIGGER_PACKET_COUNT);
   1133         dumpSetting(s, p,
   1134                 Settings.Global.PDP_WATCHDOG_ERROR_POLL_COUNT,
   1135                 GlobalSettingsProto.PdpWatchdog.ERROR_POLL_COUNT);
   1136         dumpSetting(s, p,
   1137                 Settings.Global.PDP_WATCHDOG_MAX_PDP_RESET_FAIL_COUNT,
   1138                 GlobalSettingsProto.PdpWatchdog.MAX_PDP_RESET_FAIL_COUNT);
   1139         p.end(pdpWatchdogToken);
   1140 
   1141         dumpSetting(s, p,
   1142                 Settings.Global.POLICY_CONTROL,
   1143                 GlobalSettingsProto.POLICY_CONTROL);
   1144         dumpSetting(s, p,
   1145                 Settings.Global.POWER_MANAGER_CONSTANTS,
   1146                 GlobalSettingsProto.POWER_MANAGER_CONSTANTS);
   1147 
   1148         final long prepaidSetupToken = p.start(GlobalSettingsProto.PREPAID_SETUP);
   1149         dumpSetting(s, p,
   1150                 Settings.Global.SETUP_PREPAID_DATA_SERVICE_URL,
   1151                 GlobalSettingsProto.PrepaidSetup.DATA_SERVICE_URL);
   1152         dumpSetting(s, p,
   1153                 Settings.Global.SETUP_PREPAID_DETECTION_TARGET_URL,
   1154                 GlobalSettingsProto.PrepaidSetup.DETECTION_TARGET_URL);
   1155         dumpSetting(s, p,
   1156                 Settings.Global.SETUP_PREPAID_DETECTION_REDIR_HOST,
   1157                 GlobalSettingsProto.PrepaidSetup.DETECTION_REDIR_HOST);
   1158         p.end(prepaidSetupToken);
   1159 
   1160         final long privateToken = p.start(GlobalSettingsProto.PRIVATE);
   1161         dumpSetting(s, p,
   1162                 Settings.Global.PRIVATE_DNS_MODE,
   1163                 GlobalSettingsProto.Private.DNS_MODE);
   1164         dumpSetting(s, p,
   1165                 Settings.Global.PRIVATE_DNS_SPECIFIER,
   1166                 GlobalSettingsProto.Private.DNS_SPECIFIER);
   1167         p.end(privateToken);
   1168 
   1169         dumpSetting(s, p,
   1170                 Settings.Global.PROVISIONING_APN_ALARM_DELAY_IN_MS,
   1171                 GlobalSettingsProto.PROVISIONING_APN_ALARM_DELAY_IN_MS);
   1172         dumpSetting(s, p,
   1173                 Settings.Global.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT,
   1174                 GlobalSettingsProto.READ_EXTERNAL_STORAGE_ENFORCED_DEFAULT);
   1175         dumpSetting(s, p,
   1176                 Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT,
   1177                 GlobalSettingsProto.REQUIRE_PASSWORD_TO_DECRYPT);
   1178         dumpSetting(s, p,
   1179                 Settings.Global.SAFE_BOOT_DISALLOWED,
   1180                 GlobalSettingsProto.SAFE_BOOT_DISALLOWED);
   1181 
   1182         final long selinuxToken = p.start(GlobalSettingsProto.SELINUX);
   1183         dumpSetting(s, p,
   1184                 Settings.Global.SELINUX_UPDATE_CONTENT_URL,
   1185                 GlobalSettingsProto.Selinux.UPDATE_CONTENT_URL);
   1186         dumpSetting(s, p,
   1187                 Settings.Global.SELINUX_UPDATE_METADATA_URL,
   1188                 GlobalSettingsProto.Selinux.UPDATE_METADATA_URL);
   1189         dumpSetting(s, p,
   1190                 Settings.Global.SELINUX_STATUS,
   1191                 GlobalSettingsProto.Selinux.STATUS);
   1192         p.end(selinuxToken);
   1193 
   1194         dumpSetting(s, p,
   1195                 Settings.Global.SEND_ACTION_APP_ERROR,
   1196                 GlobalSettingsProto.SEND_ACTION_APP_ERROR);
   1197         dumpSetting(s, p,
   1198                 Settings.Global.SET_INSTALL_LOCATION,
   1199                 GlobalSettingsProto.SET_INSTALL_LOCATION);
   1200         dumpSetting(s, p,
   1201                 Settings.Global.SHORTCUT_MANAGER_CONSTANTS,
   1202                 GlobalSettingsProto.SHORTCUT_MANAGER_CONSTANTS);
   1203         dumpSetting(s, p,
   1204                 Settings.Global.SHOW_FIRST_CRASH_DIALOG,
   1205                 GlobalSettingsProto.SHOW_FIRST_CRASH_DIALOG);
   1206         dumpSetting(s, p,
   1207                 Settings.Global.SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED,
   1208                 GlobalSettingsProto.SHOW_HIDDEN_LAUNCHER_ICON_APPS_ENABLED);
   1209         // Settings.Global.SHOW_PROCESSES intentionally excluded since it's deprecated.
   1210         dumpSetting(s, p,
   1211                 Settings.Global.SHOW_RESTART_IN_CRASH_DIALOG,
   1212                 GlobalSettingsProto.SHOW_RESTART_IN_CRASH_DIALOG);
   1213         dumpSetting(s, p,
   1214                 Settings.Global.SHOW_MUTE_IN_CRASH_DIALOG,
   1215                 GlobalSettingsProto.SHOW_MUTE_IN_CRASH_DIALOG);
   1216         dumpSetting(s, p,
   1217                 Settings.Global.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED,
   1218                 GlobalSettingsProto.SHOW_NEW_APP_INSTALLED_NOTIFICATION_ENABLED);
   1219 
   1220         final long smartSelectToken = p.start(GlobalSettingsProto.SMART_SELECTION);
   1221         dumpSetting(s, p,
   1222                 Settings.Global.SMART_SELECTION_UPDATE_CONTENT_URL,
   1223                 GlobalSettingsProto.SmartSelection.UPDATE_CONTENT_URL);
   1224         dumpSetting(s, p,
   1225                 Settings.Global.SMART_SELECTION_UPDATE_METADATA_URL,
   1226                 GlobalSettingsProto.SmartSelection.UPDATE_METADATA_URL);
   1227         p.end(smartSelectToken);
   1228 
   1229         final long smsToken = p.start(GlobalSettingsProto.SMS);
   1230         dumpSetting(s, p,
   1231                 Settings.Global.SMS_OUTGOING_CHECK_INTERVAL_MS,
   1232                 GlobalSettingsProto.Sms.OUTGOING_CHECK_INTERVAL_MS);
   1233         dumpSetting(s, p,
   1234                 Settings.Global.SMS_OUTGOING_CHECK_MAX_COUNT,
   1235                 GlobalSettingsProto.Sms.OUTGOING_CHECK_MAX_COUNT);
   1236         dumpSetting(s, p,
   1237                 Settings.Global.SMS_SHORT_CODE_CONFIRMATION,
   1238                 GlobalSettingsProto.Sms.SHORT_CODE_CONFIRMATION);
   1239         dumpSetting(s, p,
   1240                 Settings.Global.SMS_SHORT_CODE_RULE,
   1241                 GlobalSettingsProto.Sms.SHORT_CODE_RULE);
   1242         dumpSetting(s, p,
   1243                 Settings.Global.SMS_SHORT_CODES_UPDATE_CONTENT_URL,
   1244                 GlobalSettingsProto.Sms.SHORT_CODES_UPDATE_CONTENT_URL);
   1245         dumpSetting(s, p,
   1246                 Settings.Global.SMS_SHORT_CODES_UPDATE_METADATA_URL,
   1247                 GlobalSettingsProto.Sms.SHORT_CODES_UPDATE_METADATA_URL);
   1248         p.end(smsToken);
   1249 
   1250         final long soundsToken = p.start(GlobalSettingsProto.SOUNDS);
   1251         dumpSetting(s, p,
   1252                 Settings.Global.CAR_DOCK_SOUND,
   1253                 GlobalSettingsProto.Sounds.CAR_DOCK);
   1254         dumpSetting(s, p,
   1255                 Settings.Global.CAR_UNDOCK_SOUND,
   1256                 GlobalSettingsProto.Sounds.CAR_UNDOCK);
   1257         dumpSetting(s, p,
   1258                 Settings.Global.DESK_DOCK_SOUND,
   1259                 GlobalSettingsProto.Sounds.DESK_DOCK);
   1260         dumpSetting(s, p,
   1261                 Settings.Global.DESK_UNDOCK_SOUND,
   1262                 GlobalSettingsProto.Sounds.DESK_UNDOCK);
   1263         dumpSetting(s, p,
   1264                 Settings.Global.DOCK_SOUNDS_ENABLED,
   1265                 GlobalSettingsProto.Sounds.DOCK_SOUNDS_ENABLED);
   1266         dumpSetting(s, p,
   1267                 Settings.Global.DOCK_SOUNDS_ENABLED_WHEN_ACCESSIBILITY,
   1268                 GlobalSettingsProto.Sounds.DOCK_SOUNDS_ENABLED_WHEN_ACCESSIBILITY);
   1269         dumpSetting(s, p,
   1270                 Settings.Global.LOCK_SOUND,
   1271                 GlobalSettingsProto.Sounds.LOCK);
   1272         dumpSetting(s, p,
   1273                 Settings.Global.UNLOCK_SOUND,
   1274                 GlobalSettingsProto.Sounds.UNLOCK);
   1275         dumpSetting(s, p,
   1276                 Settings.Global.TRUSTED_SOUND,
   1277                 GlobalSettingsProto.Sounds.TRUSTED);
   1278         dumpSetting(s, p,
   1279                 Settings.Global.LOW_BATTERY_SOUND,
   1280                 GlobalSettingsProto.Sounds.LOW_BATTERY);
   1281         dumpSetting(s, p,
   1282                 Settings.Global.LOW_BATTERY_SOUND_TIMEOUT,
   1283                 GlobalSettingsProto.Sounds.LOW_BATTERY_SOUND_TIMEOUT);
   1284         dumpSetting(s, p,
   1285                 Settings.Global.POWER_SOUNDS_ENABLED,
   1286                 GlobalSettingsProto.Sounds.LOW_BATTERY_SOUNDS_ENABLED);
   1287         dumpSetting(s, p,
   1288                 Settings.Global.CHARGING_STARTED_SOUND,
   1289                 GlobalSettingsProto.Sounds.CHARGING_STARTED);
   1290         p.end(soundsToken);
   1291 
   1292         final long soundTriggerToken = p.start(GlobalSettingsProto.SOUND_TRIGGER);
   1293         dumpSetting(s, p,
   1294                 Settings.Global.MAX_SOUND_TRIGGER_DETECTION_SERVICE_OPS_PER_DAY,
   1295                 GlobalSettingsProto.SoundTrigger.MAX_SOUND_TRIGGER_DETECTION_SERVICE_OPS_PER_DAY);
   1296         dumpSetting(s, p,
   1297                 Settings.Global.SOUND_TRIGGER_DETECTION_SERVICE_OP_TIMEOUT,
   1298                 GlobalSettingsProto.SoundTrigger.DETECTION_SERVICE_OP_TIMEOUT_MS);
   1299         p.end(soundTriggerToken);
   1300 
   1301         dumpSetting(s, p,
   1302                 Settings.Global.SPEED_LABEL_CACHE_EVICTION_AGE_MILLIS,
   1303                 GlobalSettingsProto.SPEED_LABEL_CACHE_EVICTION_AGE_MS);
   1304         dumpSetting(s, p,
   1305                 Settings.Global.SQLITE_COMPATIBILITY_WAL_FLAGS,
   1306                 GlobalSettingsProto.SQLITE_COMPATIBILITY_WAL_FLAGS);
   1307         dumpSetting(s, p,
   1308                 Settings.Global.STAY_ON_WHILE_PLUGGED_IN,
   1309                 GlobalSettingsProto.STAY_ON_WHILE_PLUGGED_IN);
   1310 
   1311         final long storageToken = p.start(GlobalSettingsProto.STORAGE);
   1312         dumpSetting(s, p,
   1313                 Settings.Global.STORAGE_BENCHMARK_INTERVAL,
   1314                 GlobalSettingsProto.Storage.BENCHMARK_INTERVAL);
   1315         dumpSetting(s, p,
   1316                 Settings.Global.STORAGE_SETTINGS_CLOBBER_THRESHOLD,
   1317                 GlobalSettingsProto.Storage.SETTINGS_CLOBBER_THRESHOLD);
   1318         p.end(storageToken);
   1319 
   1320         final long syncToken = p.start(GlobalSettingsProto.SYNC);
   1321         dumpSetting(s, p,
   1322                 Settings.Global.SYNC_MAX_RETRY_DELAY_IN_SECONDS,
   1323                 GlobalSettingsProto.Sync.MAX_RETRY_DELAY_IN_SECONDS);
   1324         dumpSetting(s, p,
   1325                 Settings.Global.SYNC_MANAGER_CONSTANTS,
   1326                 GlobalSettingsProto.Sync.MANAGER_CONSTANTS);
   1327         p.end(syncToken);
   1328 
   1329         final long sysToken = p.start(GlobalSettingsProto.SYS);
   1330         dumpSetting(s, p,
   1331                 Settings.Global.SYS_FREE_STORAGE_LOG_INTERVAL,
   1332                 GlobalSettingsProto.Sys.FREE_STORAGE_LOG_INTERVAL_MINS);
   1333         dumpSetting(s, p,
   1334                 Settings.Global.SYS_STORAGE_THRESHOLD_PERCENTAGE,
   1335                 GlobalSettingsProto.Sys.STORAGE_THRESHOLD_PERCENTAGE);
   1336         dumpSetting(s, p,
   1337                 Settings.Global.SYS_STORAGE_THRESHOLD_MAX_BYTES,
   1338                 GlobalSettingsProto.Sys.STORAGE_THRESHOLD_MAX_BYTES);
   1339         dumpSetting(s, p,
   1340                 Settings.Global.SYS_STORAGE_FULL_THRESHOLD_BYTES,
   1341                 GlobalSettingsProto.Sys.STORAGE_FULL_THRESHOLD_BYTES);
   1342         dumpSetting(s, p,
   1343                 Settings.Global.SYS_STORAGE_CACHE_PERCENTAGE,
   1344                 GlobalSettingsProto.Sys.STORAGE_CACHE_PERCENTAGE);
   1345         dumpSetting(s, p,
   1346                 Settings.Global.SYS_STORAGE_CACHE_MAX_BYTES,
   1347                 GlobalSettingsProto.Sys.STORAGE_CACHE_MAX_BYTES);
   1348         dumpSetting(s, p,
   1349                 Settings.Global.SYS_VDSO,
   1350                 GlobalSettingsProto.Sys.VDSO);
   1351         dumpSetting(s, p,
   1352                 Settings.Global.SYS_UIDCPUPOWER,
   1353                 GlobalSettingsProto.Sys.UIDCPUPOWER);
   1354         p.end(sysToken);
   1355 
   1356         dumpSetting(s, p,
   1357                 Settings.Global.TCP_DEFAULT_INIT_RWND,
   1358                 GlobalSettingsProto.TCP_DEFAULT_INIT_RWND);
   1359 
   1360         final long tempWarningToken = p.start(GlobalSettingsProto.TEMPERATURE_WARNING);
   1361         dumpSetting(s, p,
   1362                 Settings.Global.SHOW_TEMPERATURE_WARNING,
   1363                 GlobalSettingsProto.TemperatureWarning.SHOW_TEMPERATURE_WARNING);
   1364         dumpSetting(s, p,
   1365                 Settings.Global.SHOW_USB_TEMPERATURE_ALARM,
   1366                 GlobalSettingsProto.TemperatureWarning.SHOW_USB_TEMPERATURE_ALARM);
   1367         dumpSetting(s, p,
   1368                 Settings.Global.WARNING_TEMPERATURE,
   1369                 GlobalSettingsProto.TemperatureWarning.WARNING_TEMPERATURE_LEVEL);
   1370         p.end(tempWarningToken);
   1371 
   1372         final long tetherToken = p.start(GlobalSettingsProto.TETHER);
   1373         dumpSetting(s, p,
   1374                 Settings.Global.TETHER_SUPPORTED,
   1375                 GlobalSettingsProto.Tether.SUPPORTED);
   1376         dumpSetting(s, p,
   1377                 Settings.Global.TETHER_DUN_REQUIRED,
   1378                 GlobalSettingsProto.Tether.DUN_REQUIRED);
   1379         dumpSetting(s, p,
   1380                 Settings.Global.TETHER_DUN_APN,
   1381                 GlobalSettingsProto.Tether.DUN_APN);
   1382         dumpSetting(s, p,
   1383                 Settings.Global.TETHER_OFFLOAD_DISABLED,
   1384                 GlobalSettingsProto.Tether.OFFLOAD_DISABLED);
   1385         dumpSetting(s, p,
   1386                 Settings.Global.SOFT_AP_TIMEOUT_ENABLED,
   1387                 GlobalSettingsProto.Tether.TIMEOUT_ENABLED);
   1388         p.end(tetherToken);
   1389 
   1390         dumpSetting(s, p,
   1391                 Settings.Global.TEXT_CLASSIFIER_CONSTANTS,
   1392                 GlobalSettingsProto.TEXT_CLASSIFIER_CONSTANTS);
   1393         dumpSetting(s, p,
   1394                 Settings.Global.TEXT_CLASSIFIER_ACTION_MODEL_PARAMS,
   1395                 GlobalSettingsProto.TEXT_CLASSIFIER_ACTION_MODEL_PARAMS);
   1396         dumpSetting(s, p,
   1397                 Settings.Global.THEATER_MODE_ON,
   1398                 GlobalSettingsProto.THEATER_MODE_ON);
   1399         dumpSetting(s, p,
   1400                 Settings.Global.TIME_ONLY_MODE_CONSTANTS,
   1401                 GlobalSettingsProto.TIME_ONLY_MODE_CONSTANTS);
   1402         dumpSetting(s, p,
   1403                 Settings.Global.TRANSITION_ANIMATION_SCALE,
   1404                 GlobalSettingsProto.TRANSITION_ANIMATION_SCALE);
   1405 
   1406         final long tzinfoToken = p.start(GlobalSettingsProto.TZINFO);
   1407         dumpSetting(s, p,
   1408                 Settings.Global.TZINFO_UPDATE_CONTENT_URL,
   1409                 GlobalSettingsProto.Tzinfo.UPDATE_CONTENT_URL);
   1410         dumpSetting(s, p,
   1411                 Settings.Global.TZINFO_UPDATE_METADATA_URL,
   1412                 GlobalSettingsProto.Tzinfo.UPDATE_METADATA_URL);
   1413         p.end(tzinfoToken);
   1414 
   1415         dumpSetting(s, p,
   1416                 Settings.Global.UNUSED_STATIC_SHARED_LIB_MIN_CACHE_PERIOD,
   1417                 GlobalSettingsProto.UNUSED_STATIC_SHARED_LIB_MIN_CACHE_PERIOD_MS);
   1418         dumpSetting(s, p,
   1419                 Settings.Global.USB_MASS_STORAGE_ENABLED,
   1420                 GlobalSettingsProto.USB_MASS_STORAGE_ENABLED);
   1421         dumpSetting(s, p,
   1422                 Settings.Global.USE_GOOGLE_MAIL,
   1423                 GlobalSettingsProto.USE_GOOGLE_MAIL);
   1424         dumpSetting(s, p,
   1425                 Settings.Global.USE_OPEN_WIFI_PACKAGE,
   1426                 GlobalSettingsProto.USE_OPEN_WIFI_PACKAGE);
   1427         dumpSetting(s, p,
   1428                 Settings.Global.VT_IMS_ENABLED,
   1429                 GlobalSettingsProto.VT_IMS_ENABLED);
   1430         dumpSetting(s, p,
   1431                 Settings.Global.WAIT_FOR_DEBUGGER,
   1432                 GlobalSettingsProto.WAIT_FOR_DEBUGGER);
   1433 
   1434         final long webviewToken = p.start(GlobalSettingsProto.WEBVIEW);
   1435         dumpSetting(s, p,
   1436                 Settings.Global.WEBVIEW_DATA_REDUCTION_PROXY_KEY,
   1437                 GlobalSettingsProto.Webview.DATA_REDUCTION_PROXY_KEY);
   1438         dumpSetting(s, p,
   1439                 Settings.Global.WEBVIEW_FALLBACK_LOGIC_ENABLED,
   1440                 GlobalSettingsProto.Webview.FALLBACK_LOGIC_ENABLED);
   1441         dumpSetting(s, p,
   1442                 Settings.Global.WEBVIEW_PROVIDER,
   1443                 GlobalSettingsProto.Webview.PROVIDER);
   1444         dumpSetting(s, p,
   1445                 Settings.Global.WEBVIEW_MULTIPROCESS,
   1446                 GlobalSettingsProto.Webview.MULTIPROCESS);
   1447         p.end(webviewToken);
   1448 
   1449         final long wfcToken = p.start(GlobalSettingsProto.WFC);
   1450         dumpSetting(s, p,
   1451                 Settings.Global.WFC_IMS_ENABLED,
   1452                 GlobalSettingsProto.Wfc.IMS_ENABLED);
   1453         dumpSetting(s, p,
   1454                 Settings.Global.WFC_IMS_MODE,
   1455                 GlobalSettingsProto.Wfc.IMS_MODE);
   1456         dumpSetting(s, p,
   1457                 Settings.Global.WFC_IMS_ROAMING_MODE,
   1458                 GlobalSettingsProto.Wfc.IMS_ROAMING_MODE);
   1459         dumpSetting(s, p,
   1460                 Settings.Global.WFC_IMS_ROAMING_ENABLED,
   1461                 GlobalSettingsProto.Wfc.IMS_ROAMING_ENABLED);
   1462         p.end(wfcToken);
   1463 
   1464         final long wifiToken = p.start(GlobalSettingsProto.WIFI);
   1465         dumpSetting(s, p,
   1466                 Settings.Global.WIFI_SLEEP_POLICY,
   1467                 GlobalSettingsProto.Wifi.SLEEP_POLICY);
   1468         dumpSetting(s, p,
   1469                 Settings.Global.WIFI_BADGING_THRESHOLDS,
   1470                 GlobalSettingsProto.Wifi.BADGING_THRESHOLDS);
   1471         dumpSetting(s, p,
   1472                 Settings.Global.WIFI_DISPLAY_ON,
   1473                 GlobalSettingsProto.Wifi.DISPLAY_ON);
   1474         dumpSetting(s, p,
   1475                 Settings.Global.WIFI_DISPLAY_CERTIFICATION_ON,
   1476                 GlobalSettingsProto.Wifi.DISPLAY_CERTIFICATION_ON);
   1477         dumpSetting(s, p,
   1478                 Settings.Global.WIFI_DISPLAY_WPS_CONFIG,
   1479                 GlobalSettingsProto.Wifi.DISPLAY_WPS_CONFIG);
   1480         dumpSetting(s, p,
   1481                 Settings.Global.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON,
   1482                 GlobalSettingsProto.Wifi.NETWORKS_AVAILABLE_NOTIFICATION_ON);
   1483         dumpSetting(s, p,
   1484                 Settings.Global.WIFI_CARRIER_NETWORKS_AVAILABLE_NOTIFICATION_ON,
   1485                 GlobalSettingsProto.Wifi.CARRIER_NETWORKS_AVAILABLE_NOTIFICATION_ON);
   1486         dumpSetting(s, p,
   1487                 Settings.Global.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY,
   1488                 GlobalSettingsProto.Wifi.NETWORKS_AVAILABLE_REPEAT_DELAY);
   1489         dumpSetting(s, p,
   1490                 Settings.Global.WIFI_COUNTRY_CODE,
   1491                 GlobalSettingsProto.Wifi.COUNTRY_CODE);
   1492         dumpSetting(s, p,
   1493                 Settings.Global.WIFI_FRAMEWORK_SCAN_INTERVAL_MS,
   1494                 GlobalSettingsProto.Wifi.FRAMEWORK_SCAN_INTERVAL_MS);
   1495         dumpSetting(s, p,
   1496                 Settings.Global.WIFI_IDLE_MS,
   1497                 GlobalSettingsProto.Wifi.IDLE_MS);
   1498         dumpSetting(s, p,
   1499                 Settings.Global.WIFI_NUM_OPEN_NETWORKS_KEPT,
   1500                 GlobalSettingsProto.Wifi.NUM_OPEN_NETWORKS_KEPT);
   1501         dumpSetting(s, p,
   1502                 Settings.Global.WIFI_ON,
   1503                 GlobalSettingsProto.Wifi.ON);
   1504         dumpSetting(s, p,
   1505                 Settings.Global.WIFI_SCAN_ALWAYS_AVAILABLE,
   1506                 GlobalSettingsProto.Wifi.SCAN_ALWAYS_AVAILABLE);
   1507         dumpSetting(s, p,
   1508                 Settings.Global.WIFI_WAKEUP_ENABLED,
   1509                 GlobalSettingsProto.Wifi.WAKEUP_ENABLED);
   1510         dumpSetting(s, p,
   1511                 Settings.Global.WIFI_SAVED_STATE,
   1512                 GlobalSettingsProto.Wifi.SAVED_STATE);
   1513         dumpSetting(s, p,
   1514                 Settings.Global.WIFI_SUPPLICANT_SCAN_INTERVAL_MS,
   1515                 GlobalSettingsProto.Wifi.SUPPLICANT_SCAN_INTERVAL_MS);
   1516         dumpSetting(s, p,
   1517                 Settings.Global.WIFI_ENHANCED_AUTO_JOIN,
   1518                 GlobalSettingsProto.Wifi.ENHANCED_AUTO_JOIN);
   1519         dumpSetting(s, p,
   1520                 Settings.Global.WIFI_NETWORK_SHOW_RSSI,
   1521                 GlobalSettingsProto.Wifi.NETWORK_SHOW_RSSI);
   1522         dumpSetting(s, p,
   1523                 Settings.Global.WIFI_SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS,
   1524                 GlobalSettingsProto.Wifi.SCAN_INTERVAL_WHEN_P2P_CONNECTED_MS);
   1525         dumpSetting(s, p,
   1526                 Settings.Global.WIFI_WATCHDOG_ON,
   1527                 GlobalSettingsProto.Wifi.WATCHDOG_ON);
   1528         dumpSetting(s, p,
   1529                 Settings.Global.WIFI_WATCHDOG_POOR_NETWORK_TEST_ENABLED,
   1530                 GlobalSettingsProto.Wifi.WATCHDOG_POOR_NETWORK_TEST_ENABLED);
   1531         dumpSetting(s, p,
   1532                 Settings.Global.WIFI_SUSPEND_OPTIMIZATIONS_ENABLED,
   1533                 GlobalSettingsProto.Wifi.SUSPEND_OPTIMIZATIONS_ENABLED);
   1534         dumpSetting(s, p,
   1535                 Settings.Global.WIFI_VERBOSE_LOGGING_ENABLED,
   1536                 GlobalSettingsProto.Wifi.VERBOSE_LOGGING_ENABLED);
   1537         dumpSetting(s, p,
   1538                 Settings.Global.WIFI_MAX_DHCP_RETRY_COUNT,
   1539                 GlobalSettingsProto.Wifi.MAX_DHCP_RETRY_COUNT);
   1540         dumpSetting(s, p,
   1541                 Settings.Global.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS,
   1542                 GlobalSettingsProto.Wifi.MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS);
   1543         dumpSetting(s, p,
   1544                 Settings.Global.WIFI_DEVICE_OWNER_CONFIGS_LOCKDOWN,
   1545                 GlobalSettingsProto.Wifi.DEVICE_OWNER_CONFIGS_LOCKDOWN);
   1546         dumpSetting(s, p,
   1547                 Settings.Global.WIFI_FREQUENCY_BAND,
   1548                 GlobalSettingsProto.Wifi.FREQUENCY_BAND);
   1549         dumpSetting(s, p,
   1550                 Settings.Global.WIFI_P2P_DEVICE_NAME,
   1551                 GlobalSettingsProto.Wifi.P2P_DEVICE_NAME);
   1552         dumpSetting(s, p,
   1553                 Settings.Global.WIFI_REENABLE_DELAY_MS,
   1554                 GlobalSettingsProto.Wifi.REENABLE_DELAY_MS);
   1555         dumpSetting(s, p,
   1556                 Settings.Global.WIFI_EPHEMERAL_OUT_OF_RANGE_TIMEOUT_MS,
   1557                 GlobalSettingsProto.Wifi.EPHEMERAL_OUT_OF_RANGE_TIMEOUT_MS);
   1558         dumpSetting(s, p,
   1559                 Settings.Global.WIFI_ON_WHEN_PROXY_DISCONNECTED,
   1560                 GlobalSettingsProto.Wifi.ON_WHEN_PROXY_DISCONNECTED);
   1561         dumpSetting(s, p,
   1562                 Settings.Global.WIFI_BOUNCE_DELAY_OVERRIDE_MS,
   1563                 GlobalSettingsProto.Wifi.BOUNCE_DELAY_OVERRIDE_MS);
   1564         p.end(wifiToken);
   1565 
   1566         dumpSetting(s, p,
   1567                 Settings.Global.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON,
   1568                 GlobalSettingsProto.WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON);
   1569         dumpSetting(s, p,
   1570                 Settings.Global.WINDOW_ANIMATION_SCALE,
   1571                 GlobalSettingsProto.WINDOW_ANIMATION_SCALE);
   1572         dumpSetting(s, p,
   1573                 Settings.Global.WTF_IS_FATAL,
   1574                 GlobalSettingsProto.WTF_IS_FATAL);
   1575 
   1576         final long zenToken = p.start(GlobalSettingsProto.ZEN);
   1577         dumpSetting(s, p,
   1578                 Settings.Global.ZEN_MODE,
   1579                 GlobalSettingsProto.Zen.MODE);
   1580         dumpSetting(s, p,
   1581                 Settings.Global.ZEN_MODE_RINGER_LEVEL,
   1582                 GlobalSettingsProto.Zen.MODE_RINGER_LEVEL);
   1583         dumpSetting(s, p,
   1584                 Settings.Global.ZEN_MODE_CONFIG_ETAG,
   1585                 GlobalSettingsProto.Zen.MODE_CONFIG_ETAG);
   1586         p.end(zenToken);
   1587 
   1588         dumpSetting(s, p,
   1589                 Settings.Global.ZRAM_ENABLED,
   1590                 GlobalSettingsProto.ZRAM_ENABLED);
   1591 
   1592         dumpSetting(s, p,
   1593                 Settings.Global.APP_OPS_CONSTANTS,
   1594                 GlobalSettingsProto.APP_OPS_CONSTANTS);
   1595 
   1596         p.end(token);
   1597         // Please insert new settings using the same order as in GlobalSettingsProto.
   1598 
   1599         // Settings.Global.INSTALL_NON_MARKET_APPS intentionally excluded since it's deprecated.
   1600     }
   1601 
   1602     /** Dumps settings that use a common prefix into a repeated field. */
   1603     private static void dumpRepeatedSetting(@NonNull SettingsState settings,
   1604             @NonNull ProtoOutputStream proto, String settingPrefix, long fieldId) {
   1605         for (String s : settings.getSettingNamesLocked()) {
   1606             if (s.startsWith(settingPrefix)) {
   1607                 dumpSetting(settings, proto, s, fieldId);
   1608             }
   1609         }
   1610     }
   1611 
   1612     /** Dump a single {@link SettingsState.Setting} to a proto buf */
   1613     private static void dumpSetting(@NonNull SettingsState settings,
   1614             @NonNull ProtoOutputStream proto, String settingName, long fieldId) {
   1615         SettingsState.Setting setting = settings.getSettingLocked(settingName);
   1616         long settingsToken = proto.start(fieldId);
   1617         proto.write(SettingProto.ID, setting.getId());
   1618         proto.write(SettingProto.NAME, settingName);
   1619         if (setting.getPackageName() != null) {
   1620             proto.write(SettingProto.PKG, setting.getPackageName());
   1621         }
   1622         proto.write(SettingProto.VALUE, setting.getValue());
   1623         if (setting.getDefaultValue() != null) {
   1624             proto.write(SettingProto.DEFAULT_VALUE, setting.getDefaultValue());
   1625             proto.write(SettingProto.DEFAULT_FROM_SYSTEM, setting.isDefaultFromSystem());
   1626         }
   1627         proto.end(settingsToken);
   1628     }
   1629 
   1630     static void dumpProtoSecureSettingsLocked(
   1631             @NonNull ProtoOutputStream p, long fieldId, @NonNull SettingsState s) {
   1632         final long token = p.start(fieldId);
   1633 
   1634         s.dumpHistoricalOperations(p, SecureSettingsProto.HISTORICAL_OPERATIONS);
   1635 
   1636         // This uses the same order as in SecureSettingsProto.
   1637 
   1638         final long accessibilityToken = p.start(SecureSettingsProto.ACCESSIBILITY);
   1639         dumpSetting(s, p,
   1640                 Settings.Secure.ACCESSIBILITY_ENABLED,
   1641                 SecureSettingsProto.Accessibility.ENABLED);
   1642         dumpSetting(s, p,
   1643                 Settings.Secure.ENABLED_ACCESSIBILITY_SERVICES,
   1644                 SecureSettingsProto.Accessibility.ENABLED_ACCESSIBILITY_SERVICES);
   1645         dumpSetting(s, p,
   1646                 Settings.Secure.ACCESSIBILITY_AUTOCLICK_ENABLED,
   1647                 SecureSettingsProto.Accessibility.AUTOCLICK_ENABLED);
   1648         dumpSetting(s, p,
   1649                 Settings.Secure.ACCESSIBILITY_AUTOCLICK_DELAY,
   1650                 SecureSettingsProto.Accessibility.AUTOCLICK_DELAY);
   1651         dumpSetting(s, p,
   1652                 Settings.Secure.ACCESSIBILITY_BUTTON_TARGET_COMPONENT,
   1653                 SecureSettingsProto.Accessibility.BUTTON_TARGET_COMPONENT);
   1654         dumpSetting(s, p,
   1655                 Settings.Secure.ACCESSIBILITY_CAPTIONING_ENABLED,
   1656                 SecureSettingsProto.Accessibility.CAPTIONING_ENABLED);
   1657         dumpSetting(s, p,
   1658                 Settings.Secure.ACCESSIBILITY_CAPTIONING_LOCALE,
   1659                 SecureSettingsProto.Accessibility.CAPTIONING_LOCALE);
   1660         dumpSetting(s, p,
   1661                 Settings.Secure.ACCESSIBILITY_CAPTIONING_PRESET,
   1662                 SecureSettingsProto.Accessibility.CAPTIONING_PRESET);
   1663         dumpSetting(s, p,
   1664                 Settings.Secure.ACCESSIBILITY_CAPTIONING_BACKGROUND_COLOR,
   1665                 SecureSettingsProto.Accessibility.CAPTIONING_BACKGROUND_COLOR);
   1666         dumpSetting(s, p,
   1667                 Settings.Secure.ACCESSIBILITY_CAPTIONING_FOREGROUND_COLOR,
   1668                 SecureSettingsProto.Accessibility.CAPTIONING_FOREGROUND_COLOR);
   1669         dumpSetting(s, p,
   1670                 Settings.Secure.ACCESSIBILITY_CAPTIONING_EDGE_TYPE,
   1671                 SecureSettingsProto.Accessibility.CAPTIONING_EDGE_TYPE);
   1672         dumpSetting(s, p,
   1673                 Settings.Secure.ACCESSIBILITY_CAPTIONING_EDGE_COLOR,
   1674                 SecureSettingsProto.Accessibility.CAPTIONING_EDGE_COLOR);
   1675         dumpSetting(s, p,
   1676                 Settings.Secure.ACCESSIBILITY_CAPTIONING_WINDOW_COLOR,
   1677                 SecureSettingsProto.Accessibility.CAPTIONING_WINDOW_COLOR);
   1678         dumpSetting(s, p,
   1679                 Settings.Secure.ACCESSIBILITY_CAPTIONING_TYPEFACE,
   1680                 SecureSettingsProto.Accessibility.CAPTIONING_TYPEFACE);
   1681         dumpSetting(s, p,
   1682                 Settings.Secure.ACCESSIBILITY_CAPTIONING_FONT_SCALE,
   1683                 SecureSettingsProto.Accessibility.CAPTIONING_FONT_SCALE);
   1684         dumpSetting(s, p,
   1685                 Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER_ENABLED,
   1686                 SecureSettingsProto.Accessibility.DISPLAY_DALTONIZER_ENABLED);
   1687         dumpSetting(s, p,
   1688                 Settings.Secure.ACCESSIBILITY_DISPLAY_DALTONIZER,
   1689                 SecureSettingsProto.Accessibility.DISPLAY_DALTONIZER);
   1690         dumpSetting(s, p,
   1691                 Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED,
   1692                 SecureSettingsProto.Accessibility.DISPLAY_INVERSION_ENABLED);
   1693         dumpSetting(s, p,
   1694                 Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_ENABLED,
   1695                 SecureSettingsProto.Accessibility.DISPLAY_MAGNIFICATION_ENABLED);
   1696         dumpSetting(s, p,
   1697                 Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_NAVBAR_ENABLED,
   1698                 SecureSettingsProto.Accessibility.DISPLAY_MAGNIFICATION_NAVBAR_ENABLED);
   1699         dumpSetting(s, p,
   1700                 Settings.Secure.ACCESSIBILITY_DISPLAY_MAGNIFICATION_SCALE,
   1701                 SecureSettingsProto.Accessibility.DISPLAY_MAGNIFICATION_SCALE);
   1702         dumpSetting(s, p,
   1703                 Settings.Secure.ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED,
   1704                 SecureSettingsProto.Accessibility.HIGH_TEXT_CONTRAST_ENABLED);
   1705         dumpSetting(s, p,
   1706                 Settings.Secure.ACCESSIBILITY_LARGE_POINTER_ICON,
   1707                 SecureSettingsProto.Accessibility.LARGE_POINTER_ICON);
   1708         dumpSetting(s, p,
   1709                 Settings.Secure.ACCESSIBILITY_SHORTCUT_ENABLED,
   1710                 SecureSettingsProto.Accessibility.SHORTCUT_ENABLED);
   1711         dumpSetting(s, p,
   1712                 Settings.Secure.ACCESSIBILITY_SHORTCUT_ON_LOCK_SCREEN,
   1713                 SecureSettingsProto.Accessibility.SHORTCUT_ON_LOCK_SCREEN);
   1714         dumpSetting(s, p,
   1715                 Settings.Secure.ACCESSIBILITY_SHORTCUT_DIALOG_SHOWN,
   1716                 SecureSettingsProto.Accessibility.SHORTCUT_DIALOG_SHOWN);
   1717         dumpSetting(s, p,
   1718                 Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE,
   1719                 SecureSettingsProto.Accessibility.SHORTCUT_TARGET_SERVICE);
   1720         dumpSetting(s, p,
   1721                 Settings.Secure.ACCESSIBILITY_SOFT_KEYBOARD_MODE,
   1722                 SecureSettingsProto.Accessibility.SOFT_KEYBOARD_MODE);
   1723         dumpSetting(s, p,
   1724                 Settings.Secure.ACCESSIBILITY_SPEAK_PASSWORD,
   1725                 SecureSettingsProto.Accessibility.SPEAK_PASSWORD);
   1726         dumpSetting(s, p,
   1727                 Settings.Secure.TOUCH_EXPLORATION_ENABLED,
   1728                 SecureSettingsProto.Accessibility.TOUCH_EXPLORATION_ENABLED);
   1729         dumpSetting(s, p,
   1730                 Settings.Secure.TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES,
   1731                 SecureSettingsProto.Accessibility.TOUCH_EXPLORATION_GRANTED_ACCESSIBILITY_SERVICES);
   1732         dumpSetting(s, p,
   1733                 Settings.Secure.ACCESSIBILITY_NON_INTERACTIVE_UI_TIMEOUT_MS,
   1734                 SecureSettingsProto.Accessibility.NON_INTERACTIVE_UI_TIMEOUT_MS);
   1735         dumpSetting(s, p,
   1736                 Settings.Secure.ACCESSIBILITY_INTERACTIVE_UI_TIMEOUT_MS,
   1737                 SecureSettingsProto.Accessibility.INTERACTIVE_UI_TIMEOUT_MS);
   1738         p.end(accessibilityToken);
   1739 
   1740         dumpSetting(s, p,
   1741                 Settings.Secure.ALLOWED_GEOLOCATION_ORIGINS,
   1742                 SecureSettingsProto.ALLOWED_GEOLOCATION_ORIGINS);
   1743 
   1744         final long aovToken = p.start(SecureSettingsProto.ALWAYS_ON_VPN);
   1745         dumpSetting(s, p,
   1746                 Settings.Secure.ALWAYS_ON_VPN_APP,
   1747                 SecureSettingsProto.AlwaysOnVpn.APP);
   1748         dumpSetting(s, p,
   1749                 Settings.Secure.ALWAYS_ON_VPN_LOCKDOWN,
   1750                 SecureSettingsProto.AlwaysOnVpn.LOCKDOWN);
   1751         p.end(aovToken);
   1752 
   1753         dumpSetting(s, p,
   1754                 Settings.Secure.ANDROID_ID,
   1755                 SecureSettingsProto.ANDROID_ID);
   1756         dumpSetting(s, p,
   1757                 Settings.Secure.ANR_SHOW_BACKGROUND,
   1758                 SecureSettingsProto.ANR_SHOW_BACKGROUND);
   1759 
   1760         final long assistToken = p.start(SecureSettingsProto.ASSIST);
   1761         dumpSetting(s, p,
   1762                 Settings.Secure.ASSISTANT,
   1763                 SecureSettingsProto.Assist.ASSISTANT);
   1764         dumpSetting(s, p,
   1765                 Settings.Secure.ASSIST_STRUCTURE_ENABLED,
   1766                 SecureSettingsProto.Assist.STRUCTURE_ENABLED);
   1767         dumpSetting(s, p,
   1768                 Settings.Secure.ASSIST_SCREENSHOT_ENABLED,
   1769                 SecureSettingsProto.Assist.SCREENSHOT_ENABLED);
   1770         dumpSetting(s, p,
   1771                 Settings.Secure.ASSIST_DISCLOSURE_ENABLED,
   1772                 SecureSettingsProto.Assist.DISCLOSURE_ENABLED);
   1773         dumpSetting(s, p,
   1774                 Settings.Secure.ASSIST_GESTURE_ENABLED,
   1775                 SecureSettingsProto.Assist.GESTURE_ENABLED);
   1776         dumpSetting(s, p,
   1777                 Settings.Secure.ASSIST_GESTURE_SENSITIVITY,
   1778                 SecureSettingsProto.Assist.GESTURE_SENSITIVITY);
   1779         dumpSetting(s, p,
   1780                 Settings.Secure.ASSIST_GESTURE_SILENCE_ALERTS_ENABLED,
   1781                 SecureSettingsProto.Assist.GESTURE_SILENCE_ALERTS_ENABLED);
   1782         dumpSetting(s, p,
   1783                 Settings.Secure.ASSIST_GESTURE_WAKE_ENABLED,
   1784                 SecureSettingsProto.Assist.GESTURE_WAKE_ENABLED);
   1785         dumpSetting(s, p,
   1786                 Settings.Secure.ASSIST_GESTURE_SETUP_COMPLETE,
   1787                 SecureSettingsProto.Assist.GESTURE_SETUP_COMPLETE);
   1788         p.end(assistToken);
   1789 
   1790         final long autofillToken = p.start(SecureSettingsProto.AUTOFILL);
   1791         dumpSetting(s, p,
   1792                 Settings.Secure.AUTOFILL_SERVICE,
   1793                 SecureSettingsProto.Autofill.SERVICE);
   1794         dumpSetting(s, p,
   1795                 Settings.Secure.AUTOFILL_FEATURE_FIELD_CLASSIFICATION,
   1796                 SecureSettingsProto.Autofill.FEATURE_FIELD_CLASSIFICATION);
   1797         dumpSetting(s, p,
   1798                 Settings.Secure.AUTOFILL_USER_DATA_MAX_USER_DATA_SIZE,
   1799                 SecureSettingsProto.Autofill.USER_DATA_MAX_USER_DATA_SIZE);
   1800         dumpSetting(s, p,
   1801                 Settings.Secure.AUTOFILL_USER_DATA_MAX_FIELD_CLASSIFICATION_IDS_SIZE,
   1802                 SecureSettingsProto.Autofill.USER_DATA_MAX_FIELD_CLASSIFICATION_IDS_SIZE);
   1803         dumpSetting(s, p,
   1804                 Settings.Secure.AUTOFILL_USER_DATA_MAX_CATEGORY_COUNT,
   1805                 SecureSettingsProto.Autofill.USER_DATA_MAX_CATEGORY_COUNT);
   1806         dumpSetting(s, p,
   1807                 Settings.Secure.AUTOFILL_USER_DATA_MAX_VALUE_LENGTH,
   1808                 SecureSettingsProto.Autofill.USER_DATA_MAX_VALUE_LENGTH);
   1809         dumpSetting(s, p,
   1810                 Settings.Secure.AUTOFILL_USER_DATA_MIN_VALUE_LENGTH,
   1811                 SecureSettingsProto.Autofill.USER_DATA_MIN_VALUE_LENGTH);
   1812         dumpSetting(s, p,
   1813                 Settings.Secure.AUTOFILL_SERVICE_SEARCH_URI,
   1814                 SecureSettingsProto.Autofill.SERVICE_SEARCH_URI);
   1815         p.end(autofillToken);
   1816 
   1817         final long asmToken = p.start(SecureSettingsProto.AUTOMATIC_STORAGE_MANAGER);
   1818         dumpSetting(s, p,
   1819                 Settings.Secure.AUTOMATIC_STORAGE_MANAGER_ENABLED,
   1820                 SecureSettingsProto.AutomaticStorageManager.ENABLED);
   1821         dumpSetting(s, p,
   1822                 Settings.Secure.AUTOMATIC_STORAGE_MANAGER_DAYS_TO_RETAIN,
   1823                 SecureSettingsProto.AutomaticStorageManager.DAYS_TO_RETAIN);
   1824         dumpSetting(s, p,
   1825                 Settings.Secure.AUTOMATIC_STORAGE_MANAGER_BYTES_CLEARED,
   1826                 SecureSettingsProto.AutomaticStorageManager.BYTES_CLEARED);
   1827         dumpSetting(s, p,
   1828                 Settings.Secure.AUTOMATIC_STORAGE_MANAGER_LAST_RUN,
   1829                 SecureSettingsProto.AutomaticStorageManager.LAST_RUN);
   1830         dumpSetting(s, p,
   1831                 Settings.Secure.AUTOMATIC_STORAGE_MANAGER_TURNED_OFF_BY_POLICY,
   1832                 SecureSettingsProto.AutomaticStorageManager.TURNED_OFF_BY_POLICY);
   1833         p.end(asmToken);
   1834 
   1835         final long backupToken = p.start(SecureSettingsProto.BACKUP);
   1836         dumpSetting(s, p,
   1837                 Settings.Secure.BACKUP_ENABLED,
   1838                 SecureSettingsProto.Backup.ENABLED);
   1839         dumpSetting(s, p,
   1840                 Settings.Secure.BACKUP_AUTO_RESTORE,
   1841                 SecureSettingsProto.Backup.AUTO_RESTORE);
   1842         dumpSetting(s, p,
   1843                 Settings.Secure.BACKUP_PROVISIONED,
   1844                 SecureSettingsProto.Backup.PROVISIONED);
   1845         dumpSetting(s, p,
   1846                 Settings.Secure.BACKUP_TRANSPORT,
   1847                 SecureSettingsProto.Backup.TRANSPORT);
   1848         dumpSetting(s, p,
   1849                 Settings.Secure.BACKUP_MANAGER_CONSTANTS,
   1850                 SecureSettingsProto.Backup.MANAGER_CONSTANTS);
   1851         dumpSetting(s, p,
   1852                 Settings.Secure.BACKUP_LOCAL_TRANSPORT_PARAMETERS,
   1853                 SecureSettingsProto.Backup.LOCAL_TRANSPORT_PARAMETERS);
   1854         dumpSetting(s, p,
   1855                 Settings.Secure.PACKAGES_TO_CLEAR_DATA_BEFORE_FULL_RESTORE,
   1856                 SecureSettingsProto.Backup.PACKAGES_TO_CLEAR_DATA_BEFORE_FULL_RESTORE);
   1857         p.end(backupToken);
   1858 
   1859         // Settings.Secure.BLUETOOTH_ON intentionally excluded since it's deprecated.
   1860         dumpSetting(s, p,
   1861                 Settings.Secure.BLUETOOTH_ON_WHILE_DRIVING,
   1862                 SecureSettingsProto.BLUETOOTH_ON_WHILE_DRIVING);
   1863 
   1864         final long cameraToken = p.start(SecureSettingsProto.CAMERA);
   1865         dumpSetting(s, p,
   1866                 Settings.Secure.CAMERA_GESTURE_DISABLED,
   1867                 SecureSettingsProto.Camera.GESTURE_DISABLED);
   1868         dumpSetting(s, p,
   1869                 Settings.Secure.CAMERA_DOUBLE_TAP_POWER_GESTURE_DISABLED,
   1870                 SecureSettingsProto.Camera.DOUBLE_TAP_POWER_GESTURE_DISABLED);
   1871         dumpSetting(s, p,
   1872                 Settings.Secure.CAMERA_DOUBLE_TWIST_TO_FLIP_ENABLED,
   1873                 SecureSettingsProto.Camera.DOUBLE_TWIST_TO_FLIP_ENABLED);
   1874         dumpSetting(s, p,
   1875                 Settings.Secure.CAMERA_LIFT_TRIGGER_ENABLED,
   1876                 SecureSettingsProto.Camera.LIFT_TRIGGER_ENABLED);
   1877         p.end(cameraToken);
   1878 
   1879         dumpSetting(s, p,
   1880                 Settings.Secure.CARRIER_APPS_HANDLED,
   1881                 SecureSettingsProto.CARRIER_APPS_HANDLED);
   1882         dumpSetting(s, p,
   1883                 Settings.Secure.CMAS_ADDITIONAL_BROADCAST_PKG,
   1884                 SecureSettingsProto.CMAS_ADDITIONAL_BROADCAST_PKG);
   1885         dumpRepeatedSetting(s, p,
   1886                 Settings.Secure.COMPLETED_CATEGORY_PREFIX,
   1887                 SecureSettingsProto.COMPLETED_CATEGORIES);
   1888         dumpSetting(s, p,
   1889                 Settings.Secure.CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS,
   1890                 SecureSettingsProto.CONNECTIVITY_RELEASE_PENDING_INTENT_DELAY_MS);
   1891         dumpSetting(s, p,
   1892                 Settings.Secure.DEVICE_PAIRED,
   1893                 SecureSettingsProto.DEVICE_PAIRED);
   1894         dumpSetting(s, p,
   1895                 Settings.Secure.DIALER_DEFAULT_APPLICATION,
   1896                 SecureSettingsProto.DIALER_DEFAULT_APPLICATION);
   1897         dumpSetting(s, p,
   1898                 Settings.Secure.DISPLAY_DENSITY_FORCED,
   1899                 SecureSettingsProto.DISPLAY_DENSITY_FORCED);
   1900         dumpSetting(s, p,
   1901                 Settings.Secure.DOUBLE_TAP_TO_WAKE,
   1902                 SecureSettingsProto.DOUBLE_TAP_TO_WAKE);
   1903 
   1904         final long dozeToken = p.start(SecureSettingsProto.DOZE);
   1905         dumpSetting(s, p,
   1906                 Settings.Secure.DOZE_ENABLED,
   1907                 SecureSettingsProto.Doze.ENABLED);
   1908         dumpSetting(s, p,
   1909                 Settings.Secure.DOZE_ALWAYS_ON,
   1910                 SecureSettingsProto.Doze.ALWAYS_ON);
   1911         dumpSetting(s, p,
   1912                 Settings.Secure.DOZE_PICK_UP_GESTURE,
   1913                 SecureSettingsProto.Doze.PULSE_ON_PICK_UP);
   1914         dumpSetting(s, p,
   1915                 Settings.Secure.DOZE_PULSE_ON_LONG_PRESS,
   1916                 SecureSettingsProto.Doze.PULSE_ON_LONG_PRESS);
   1917         dumpSetting(s, p,
   1918                 Settings.Secure.DOZE_DOUBLE_TAP_GESTURE,
   1919                 SecureSettingsProto.Doze.PULSE_ON_DOUBLE_TAP);
   1920         dumpSetting(s, p,
   1921                 Settings.Secure.DOZE_TAP_SCREEN_GESTURE,
   1922                 SecureSettingsProto.Doze.PULSE_ON_TAP);
   1923         p.end(dozeToken);
   1924 
   1925         dumpSetting(s, p,
   1926                 Settings.Secure.EMERGENCY_ASSISTANCE_APPLICATION,
   1927                 SecureSettingsProto.EMERGENCY_ASSISTANCE_APPLICATION);
   1928         dumpSetting(s, p,
   1929                 Settings.Secure.ENHANCED_VOICE_PRIVACY_ENABLED,
   1930                 SecureSettingsProto.ENHANCED_VOICE_PRIVACY_ENABLED);
   1931 
   1932         final long gestureToken = p.start(SecureSettingsProto.GESTURE);
   1933         dumpSetting(s, p,
   1934                 Settings.Secure.AWARE_ENABLED,
   1935                 SecureSettingsProto.Gesture.AWARE_ENABLED);
   1936 
   1937         dumpSetting(s, p,
   1938                 Settings.Secure.SILENCE_ALARMS_GESTURE_COUNT,
   1939                 SecureSettingsProto.Gesture.SILENCE_ALARMS_COUNT);
   1940         dumpSetting(s, p,
   1941                 Settings.Secure.SILENCE_CALL_GESTURE_COUNT,
   1942                 SecureSettingsProto.Gesture.SILENCE_CALLS_COUNT);
   1943         dumpSetting(s, p,
   1944                 Settings.Secure.SILENCE_GESTURE,
   1945                 SecureSettingsProto.Gesture.SILENCE_ENABLED);
   1946         dumpSetting(s, p,
   1947                 Settings.Secure.SILENCE_NOTIFICATION_GESTURE_COUNT,
   1948                 SecureSettingsProto.Gesture.SILENCE_NOTIFICATION_COUNT);
   1949         dumpSetting(s, p,
   1950                 Settings.Secure.SILENCE_TIMER_GESTURE_COUNT,
   1951                 SecureSettingsProto.Gesture.SILENCE_TIMER_COUNT);
   1952 
   1953         dumpSetting(s, p,
   1954                 Settings.Secure.SKIP_GESTURE_COUNT,
   1955                 SecureSettingsProto.Gesture.SKIP_COUNT);
   1956         dumpSetting(s, p,
   1957                 Settings.Secure.SKIP_GESTURE,
   1958                 SecureSettingsProto.Gesture.SKIP_ENABLED);
   1959         p.end(gestureToken);
   1960 
   1961         dumpSetting(s, p,
   1962                 Settings.Secure.IMMERSIVE_MODE_CONFIRMATIONS,
   1963                 SecureSettingsProto.IMMERSIVE_MODE_CONFIRMATIONS);
   1964 
   1965         final long incallToken = p.start(SecureSettingsProto.INCALL);
   1966         dumpSetting(s, p,
   1967                 Settings.Secure.INCALL_POWER_BUTTON_BEHAVIOR,
   1968                 SecureSettingsProto.Incall.POWER_BUTTON_BEHAVIOR);
   1969         dumpSetting(s, p,
   1970                 Settings.Secure.INCALL_BACK_BUTTON_BEHAVIOR,
   1971                 SecureSettingsProto.Incall.BACK_BUTTON_BEHAVIOR);
   1972         p.end(incallToken);
   1973 
   1974         final long inputMethodsToken = p.start(SecureSettingsProto.INPUT_METHODS);
   1975         dumpSetting(s, p,
   1976                 Settings.Secure.DEFAULT_INPUT_METHOD,
   1977                 SecureSettingsProto.InputMethods.DEFAULT_INPUT_METHOD);
   1978         dumpSetting(s, p,
   1979                 Settings.Secure.DISABLED_SYSTEM_INPUT_METHODS,
   1980                 SecureSettingsProto.InputMethods.DISABLED_SYSTEM_INPUT_METHODS);
   1981         dumpSetting(s, p,
   1982                 Settings.Secure.ENABLED_INPUT_METHODS,
   1983                 SecureSettingsProto.InputMethods.ENABLED_INPUT_METHODS);
   1984         dumpSetting(s, p,
   1985                 Settings.Secure.INPUT_METHODS_SUBTYPE_HISTORY,
   1986                 SecureSettingsProto.InputMethods.SUBTYPE_HISTORY);
   1987         dumpSetting(s, p,
   1988                 Settings.Secure.INPUT_METHOD_SELECTOR_VISIBILITY,
   1989                 SecureSettingsProto.InputMethods.METHOD_SELECTOR_VISIBILITY);
   1990         dumpSetting(s, p,
   1991                 Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE,
   1992                 SecureSettingsProto.InputMethods.SELECTED_INPUT_METHOD_SUBTYPE);
   1993         dumpSetting(s, p,
   1994                 Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD,
   1995                 SecureSettingsProto.InputMethods.SHOW_IME_WITH_HARD_KEYBOARD);
   1996         p.end(inputMethodsToken);
   1997 
   1998         dumpSetting(s, p,
   1999                 Settings.Secure.INSTALL_NON_MARKET_APPS,
   2000                 SecureSettingsProto.INSTALL_NON_MARKET_APPS);
   2001         dumpSetting(s, p,
   2002                 Settings.Secure.INSTANT_APPS_ENABLED,
   2003                 SecureSettingsProto.INSTANT_APPS_ENABLED);
   2004         dumpSetting(s, p,
   2005                 Settings.Secure.KEYGUARD_SLICE_URI,
   2006                 SecureSettingsProto.KEYGUARD_SLICE_URI);
   2007         dumpSetting(s, p,
   2008                 Settings.Secure.LAST_SETUP_SHOWN,
   2009                 SecureSettingsProto.LAST_SETUP_SHOWN);
   2010 
   2011         final long locationToken = p.start(SecureSettingsProto.LOCATION);
   2012         // Settings.Secure.LOCATION_PROVIDERS_ALLOWED intentionally excluded since it's deprecated.
   2013         dumpSetting(s, p,
   2014                 Settings.Secure.LOCATION_MODE,
   2015                 SecureSettingsProto.Location.MODE);
   2016         dumpSetting(s, p,
   2017                 Settings.Secure.LOCATION_CHANGER,
   2018                 SecureSettingsProto.Location.CHANGER);
   2019         dumpSetting(s, p,
   2020                 Settings.Secure.LOCATION_PERMISSIONS_UPGRADE_TO_Q_MODE,
   2021                 SecureSettingsProto.Location.PERMISSIONS_UPGRADE_TO_Q_MODE);
   2022         p.end(locationToken);
   2023 
   2024         final long locationAccessCheckToken = p.start(SecureSettingsProto.LOCATION_ACCESS_CHECK);
   2025         dumpSetting(s, p,
   2026                 Settings.Secure.LOCATION_ACCESS_CHECK_INTERVAL_MILLIS,
   2027                 SecureSettingsProto.LocationAccessCheck.INTERVAL_MILLIS);
   2028         dumpSetting(s, p,
   2029                 Settings.Secure.LOCATION_ACCESS_CHECK_DELAY_MILLIS,
   2030                 SecureSettingsProto.LocationAccessCheck.DELAY_MILLIS);
   2031         p.end(locationAccessCheckToken);
   2032 
   2033         final long lockScreenToken = p.start(SecureSettingsProto.LOCK_SCREEN);
   2034         // Settings.Secure.LOCK_BIOMETRIC_WEAK_FLAGS intentionally excluded since it's deprecated.
   2035         // Settings.Secure.LOCK_PATTERN_ENABLED intentionally excluded since it's deprecated.
   2036         // Settings.Secure.LOCK_PATTERN_VISIBLE intentionally excluded since it's deprecated.
   2037         // Settings.Secure.LOCK_PATTERN_TACTICLE_FEEDBACK_ENABLED intentionally excluded since it's deprecated.
   2038         dumpSetting(s, p,
   2039                 Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT,
   2040                 SecureSettingsProto.LockScreen.LOCK_AFTER_TIMEOUT);
   2041         // Settings.Secure.LOCK_SCREEN_OWNER_INFO intentionally excluded since it's deprecated.
   2042         // Settings.Secure.LOCK_SCREEN_APPWIDGET_IDS intentionally excluded since it's deprecated.
   2043         // Settings.Secure.LOCK_SCREEN_FALLBACK_APPWIDGET_ID intentionally excluded since it's deprecated.
   2044         // Settings.Secure.LOCK_SCREEN_STICKY_APPWIDGET intentionally excluded since it's deprecated.
   2045         // Settings.Secure.LOCK_SCREEN_OWNER_INFO_ENABLED intentionally excluded since it's deprecated.
   2046         dumpSetting(s, p,
   2047                 Settings.Secure.LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS,
   2048                 SecureSettingsProto.LockScreen.ALLOW_PRIVATE_NOTIFICATIONS);
   2049         dumpSetting(s, p,
   2050                 Settings.Secure.LOCK_SCREEN_ALLOW_REMOTE_INPUT,
   2051                 SecureSettingsProto.LockScreen.ALLOW_REMOTE_INPUT);
   2052         dumpSetting(s, p,
   2053                 Settings.Secure.LOCK_SCREEN_SHOW_NOTIFICATIONS,
   2054                 SecureSettingsProto.LockScreen.SHOW_NOTIFICATIONS);
   2055         p.end(lockScreenToken);
   2056 
   2057         dumpSetting(s, p,
   2058                 Settings.Secure.LOCK_TO_APP_EXIT_LOCKED,
   2059                 SecureSettingsProto.LOCK_TO_APP_EXIT_LOCKED);
   2060         dumpSetting(s, p,
   2061                 Settings.Secure.LOCKDOWN_IN_POWER_MENU,
   2062                 SecureSettingsProto.LOCKDOWN_IN_POWER_MENU);
   2063         dumpSetting(s, p,
   2064                 Settings.Secure.LONG_PRESS_TIMEOUT,
   2065                 SecureSettingsProto.LONG_PRESS_TIMEOUT);
   2066 
   2067         final long managedProfileToken = p.start(SecureSettingsProto.MANAGED_PROFILE);
   2068         dumpSetting(s, p,
   2069                 Settings.Secure.MANAGED_PROFILE_CONTACT_REMOTE_SEARCH,
   2070                 SecureSettingsProto.ManagedProfile.CONTACT_REMOTE_SEARCH);
   2071         p.end(managedProfileToken);
   2072 
   2073         final long mountToken = p.start(SecureSettingsProto.MOUNT);
   2074         dumpSetting(s, p,
   2075                 Settings.Secure.MOUNT_PLAY_NOTIFICATION_SND,
   2076                 SecureSettingsProto.Mount.PLAY_NOTIFICATION_SND);
   2077         dumpSetting(s, p,
   2078                 Settings.Secure.MOUNT_UMS_AUTOSTART,
   2079                 SecureSettingsProto.Mount.UMS_AUTOSTART);
   2080         dumpSetting(s, p,
   2081                 Settings.Secure.MOUNT_UMS_PROMPT,
   2082                 SecureSettingsProto.Mount.UMS_PROMPT);
   2083         dumpSetting(s, p,
   2084                 Settings.Secure.MOUNT_UMS_NOTIFY_ENABLED,
   2085                 SecureSettingsProto.Mount.UMS_NOTIFY_ENABLED);
   2086         p.end(mountToken);
   2087 
   2088         dumpSetting(s, p,
   2089                 Settings.Secure.MULTI_PRESS_TIMEOUT,
   2090                 SecureSettingsProto.MULTI_PRESS_TIMEOUT);
   2091 
   2092         dumpSetting(s, p,
   2093                 Settings.Secure.NAVIGATION_MODE,
   2094                 SecureSettingsProto.NAVIGATION_MODE);
   2095 
   2096         final long nfcPaymentToken = p.start(SecureSettingsProto.NFC_PAYMENT);
   2097         dumpSetting(s, p,
   2098                 Settings.Secure.NFC_PAYMENT_DEFAULT_COMPONENT,
   2099                 SecureSettingsProto.NfcPayment.DEFAULT_COMPONENT);
   2100         dumpSetting(s, p,
   2101                 Settings.Secure.NFC_PAYMENT_FOREGROUND,
   2102                 SecureSettingsProto.NfcPayment.FOREGROUND);
   2103         dumpSetting(s, p,
   2104                 Settings.Secure.PAYMENT_SERVICE_SEARCH_URI,
   2105                 SecureSettingsProto.NfcPayment.PAYMENT_SERVICE_SEARCH_URI);
   2106         p.end(nfcPaymentToken);
   2107 
   2108         final long nightDisplayToken = p.start(SecureSettingsProto.NIGHT_DISPLAY);
   2109         dumpSetting(s, p,
   2110                 Settings.Secure.NIGHT_DISPLAY_ACTIVATED,
   2111                 SecureSettingsProto.NightDisplay.ACTIVATED);
   2112         dumpSetting(s, p,
   2113                 Settings.Secure.NIGHT_DISPLAY_AUTO_MODE,
   2114                 SecureSettingsProto.NightDisplay.AUTO_MODE);
   2115         dumpSetting(s, p,
   2116                 Settings.Secure.NIGHT_DISPLAY_COLOR_TEMPERATURE,
   2117                 SecureSettingsProto.NightDisplay.COLOR_TEMPERATURE);
   2118         dumpSetting(s, p,
   2119                 Settings.Secure.NIGHT_DISPLAY_CUSTOM_START_TIME,
   2120                 SecureSettingsProto.NightDisplay.CUSTOM_START_TIME);
   2121         dumpSetting(s, p,
   2122                 Settings.Secure.NIGHT_DISPLAY_CUSTOM_END_TIME,
   2123                 SecureSettingsProto.NightDisplay.CUSTOM_END_TIME);
   2124         dumpSetting(s, p,
   2125                 Settings.Secure.NIGHT_DISPLAY_LAST_ACTIVATED_TIME,
   2126                 SecureSettingsProto.NightDisplay.LAST_ACTIVATED_TIME);
   2127         p.end(nightDisplayToken);
   2128 
   2129         final long notificationToken = p.start(SecureSettingsProto.NOTIFICATION);
   2130         dumpSetting(s, p,
   2131                 Settings.Secure.ENABLED_NOTIFICATION_ASSISTANT,
   2132                 SecureSettingsProto.Notification.ENABLED_ASSISTANT);
   2133         dumpSetting(s, p,
   2134                 Settings.Secure.ENABLED_NOTIFICATION_LISTENERS,
   2135                 SecureSettingsProto.Notification.ENABLED_LISTENERS);
   2136         dumpSetting(s, p,
   2137                 Settings.Secure.ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES,
   2138                 SecureSettingsProto.Notification.ENABLED_POLICY_ACCESS_PACKAGES);
   2139         dumpSetting(s, p,
   2140                 Settings.Secure.NOTIFICATION_BADGING,
   2141                 SecureSettingsProto.Notification.BADGING);
   2142         dumpSetting(s, p,
   2143                 Settings.Secure.NOTIFICATION_BUBBLES,
   2144                 SecureSettingsProto.Notification.BUBBLES);
   2145         dumpSetting(s, p,
   2146                 Settings.Secure.SHOW_NOTE_ABOUT_NOTIFICATION_HIDING,
   2147                 SecureSettingsProto.Notification.SHOW_NOTE_ABOUT_NOTIFICATION_HIDING);
   2148         dumpSetting(s, p,
   2149                 Settings.Secure.IN_CALL_NOTIFICATION_ENABLED,
   2150                 SecureSettingsProto.Notification.IN_CALL_NOTIFICATION_ENABLED);
   2151         p.end(notificationToken);
   2152 
   2153         final long packageVerifierToken = p.start(SecureSettingsProto.PACKAGE_VERIFIER);
   2154         dumpSetting(s, p,
   2155                 Settings.Secure.PACKAGE_VERIFIER_USER_CONSENT,
   2156                 SecureSettingsProto.PackageVerifier.USER_CONSENT);
   2157         dumpSetting(s, p,
   2158                 Settings.Secure.PACKAGE_VERIFIER_STATE,
   2159                 SecureSettingsProto.PackageVerifier.STATE);
   2160         p.end(packageVerifierToken);
   2161 
   2162         final long parentalControlToken = p.start(SecureSettingsProto.PARENTAL_CONTROL);
   2163         dumpSetting(s, p,
   2164                 Settings.Secure.PARENTAL_CONTROL_ENABLED,
   2165                 SecureSettingsProto.ParentalControl.ENABLED);
   2166         dumpSetting(s, p,
   2167                 Settings.Secure.PARENTAL_CONTROL_LAST_UPDATE,
   2168                 SecureSettingsProto.ParentalControl.LAST_UPDATE);
   2169         dumpSetting(s, p,
   2170                 Settings.Secure.PARENTAL_CONTROL_REDIRECT_URL,
   2171                 SecureSettingsProto.ParentalControl.REDIRECT_URL);
   2172         p.end(parentalControlToken);
   2173 
   2174         final long printServiceToken = p.start(SecureSettingsProto.PRINT_SERVICE);
   2175         dumpSetting(s, p,
   2176                 Settings.Secure.PRINT_SERVICE_SEARCH_URI,
   2177                 SecureSettingsProto.PrintService.SEARCH_URI);
   2178         dumpSetting(s, p,
   2179                 Settings.Secure.ENABLED_PRINT_SERVICES,
   2180                 SecureSettingsProto.PrintService.ENABLED_PRINT_SERVICES);
   2181         dumpSetting(s, p,
   2182                 Settings.Secure.DISABLED_PRINT_SERVICES,
   2183                 SecureSettingsProto.PrintService.DISABLED_PRINT_SERVICES);
   2184         p.end(printServiceToken);
   2185 
   2186         final long qsToken = p.start(SecureSettingsProto.QS);
   2187         dumpSetting(s, p,
   2188                 Settings.Secure.QS_TILES,
   2189                 SecureSettingsProto.QuickSettings.TILES);
   2190         dumpSetting(s, p,
   2191                 Settings.Secure.QS_AUTO_ADDED_TILES,
   2192                 SecureSettingsProto.QuickSettings.AUTO_ADDED_TILES);
   2193         p.end(qsToken);
   2194 
   2195         final long rotationToken = p.start(SecureSettingsProto.ROTATION);
   2196         dumpSetting(s, p,
   2197                 Settings.Secure.SHOW_ROTATION_SUGGESTIONS,
   2198                 SecureSettingsProto.Rotation.SHOW_ROTATION_SUGGESTIONS);
   2199         dumpSetting(s, p,
   2200                 Settings.Secure.NUM_ROTATION_SUGGESTIONS_ACCEPTED,
   2201                 SecureSettingsProto.Rotation.NUM_ROTATION_SUGGESTIONS_ACCEPTED);
   2202         p.end(rotationToken);
   2203 
   2204         dumpSetting(s, p,
   2205                 Settings.Secure.RTT_CALLING_MODE,
   2206                 SecureSettingsProto.RTT_CALLING_MODE);
   2207 
   2208         final long screensaverToken = p.start(SecureSettingsProto.SCREENSAVER);
   2209         dumpSetting(s, p,
   2210                 Settings.Secure.SCREENSAVER_ENABLED,
   2211                 SecureSettingsProto.Screensaver.ENABLED);
   2212         dumpSetting(s, p,
   2213                 Settings.Secure.SCREENSAVER_COMPONENTS,
   2214                 SecureSettingsProto.Screensaver.COMPONENTS);
   2215         dumpSetting(s, p,
   2216                 Settings.Secure.SCREENSAVER_ACTIVATE_ON_DOCK,
   2217                 SecureSettingsProto.Screensaver.ACTIVATE_ON_DOCK);
   2218         dumpSetting(s, p,
   2219                 Settings.Secure.SCREENSAVER_ACTIVATE_ON_SLEEP,
   2220                 SecureSettingsProto.Screensaver.ACTIVATE_ON_SLEEP);
   2221         dumpSetting(s, p,
   2222                 Settings.Secure.SCREENSAVER_DEFAULT_COMPONENT,
   2223                 SecureSettingsProto.Screensaver.DEFAULT_COMPONENT);
   2224         p.end(screensaverToken);
   2225 
   2226         final long searchToken = p.start(SecureSettingsProto.SEARCH);
   2227         dumpSetting(s, p,
   2228                 Settings.Secure.SEARCH_GLOBAL_SEARCH_ACTIVITY,
   2229                 SecureSettingsProto.Search.GLOBAL_SEARCH_ACTIVITY);
   2230         dumpSetting(s, p,
   2231                 Settings.Secure.SEARCH_NUM_PROMOTED_SOURCES,
   2232                 SecureSettingsProto.Search.NUM_PROMOTED_SOURCES);
   2233         dumpSetting(s, p,
   2234                 Settings.Secure.SEARCH_MAX_RESULTS_TO_DISPLAY,
   2235                 SecureSettingsProto.Search.MAX_RESULTS_TO_DISPLAY);
   2236         dumpSetting(s, p,
   2237                 Settings.Secure.SEARCH_MAX_RESULTS_PER_SOURCE,
   2238                 SecureSettingsProto.Search.MAX_RESULTS_PER_SOURCE);
   2239         dumpSetting(s, p,
   2240                 Settings.Secure.SEARCH_WEB_RESULTS_OVERRIDE_LIMIT,
   2241                 SecureSettingsProto.Search.WEB_RESULTS_OVERRIDE_LIMIT);
   2242         dumpSetting(s, p,
   2243                 Settings.Secure.SEARCH_PROMOTED_SOURCE_DEADLINE_MILLIS,
   2244                 SecureSettingsProto.Search.PROMOTED_SOURCE_DEADLINE_MILLIS);
   2245         dumpSetting(s, p,
   2246                 Settings.Secure.SEARCH_SOURCE_TIMEOUT_MILLIS,
   2247                 SecureSettingsProto.Search.SOURCE_TIMEOUT_MILLIS);
   2248         dumpSetting(s, p,
   2249                 Settings.Secure.SEARCH_PREFILL_MILLIS,
   2250                 SecureSettingsProto.Search.PREFILL_MILLIS);
   2251         dumpSetting(s, p,
   2252                 Settings.Secure.SEARCH_MAX_STAT_AGE_MILLIS,
   2253                 SecureSettingsProto.Search.MAX_STAT_AGE_MILLIS);
   2254         dumpSetting(s, p,
   2255                 Settings.Secure.SEARCH_MAX_SOURCE_EVENT_AGE_MILLIS,
   2256                 SecureSettingsProto.Search.MAX_SOURCE_EVENT_AGE_MILLIS);
   2257         dumpSetting(s, p,
   2258                 Settings.Secure.SEARCH_MIN_IMPRESSIONS_FOR_SOURCE_RANKING,
   2259                 SecureSettingsProto.Search.MIN_IMPRESSIONS_FOR_SOURCE_RANKING);
   2260         dumpSetting(s, p,
   2261                 Settings.Secure.SEARCH_MIN_CLICKS_FOR_SOURCE_RANKING,
   2262                 SecureSettingsProto.Search.MIN_CLICKS_FOR_SOURCE_RANKING);
   2263         dumpSetting(s, p,
   2264                 Settings.Secure.SEARCH_MAX_SHORTCUTS_RETURNED,
   2265                 SecureSettingsProto.Search.MAX_SHORTCUTS_RETURNED);
   2266         dumpSetting(s, p,
   2267                 Settings.Secure.SEARCH_QUERY_THREAD_CORE_POOL_SIZE,
   2268                 SecureSettingsProto.Search.QUERY_THREAD_CORE_POOL_SIZE);
   2269         dumpSetting(s, p,
   2270                 Settings.Secure.SEARCH_QUERY_THREAD_MAX_POOL_SIZE,
   2271                 SecureSettingsProto.Search.QUERY_THREAD_MAX_POOL_SIZE);
   2272         dumpSetting(s, p,
   2273                 Settings.Secure.SEARCH_SHORTCUT_REFRESH_CORE_POOL_SIZE,
   2274                 SecureSettingsProto.Search.SHORTCUT_REFRESH_CORE_POOL_SIZE);
   2275         dumpSetting(s, p,
   2276                 Settings.Secure.SEARCH_SHORTCUT_REFRESH_MAX_POOL_SIZE,
   2277                 SecureSettingsProto.Search.SHORTCUT_REFRESH_MAX_POOL_SIZE);
   2278         dumpSetting(s, p,
   2279                 Settings.Secure.SEARCH_THREAD_KEEPALIVE_SECONDS,
   2280                 SecureSettingsProto.Search.THREAD_KEEPALIVE_SECONDS);
   2281         dumpSetting(s, p,
   2282                 Settings.Secure.SEARCH_PER_SOURCE_CONCURRENT_QUERY_LIMIT,
   2283                 SecureSettingsProto.Search.PER_SOURCE_CONCURRENT_QUERY_LIMIT);
   2284         p.end(searchToken);
   2285 
   2286         final long spellCheckerToken = p.start(SecureSettingsProto.SPELL_CHECKER);
   2287         dumpSetting(s, p,
   2288                 Settings.Secure.SPELL_CHECKER_ENABLED,
   2289                 SecureSettingsProto.SpellChecker.ENABLED);
   2290         dumpSetting(s, p,
   2291                 Settings.Secure.SELECTED_SPELL_CHECKER,
   2292                 SecureSettingsProto.SpellChecker.SELECTED);
   2293         dumpSetting(s, p,
   2294                 Settings.Secure.SELECTED_SPELL_CHECKER_SUBTYPE,
   2295                 SecureSettingsProto.SpellChecker.SELECTED_SUBTYPE);
   2296         p.end(spellCheckerToken);
   2297 
   2298         dumpSetting(s, p,
   2299                 Settings.Secure.SETTINGS_CLASSNAME,
   2300                 SecureSettingsProto.SETTINGS_CLASSNAME);
   2301         dumpSetting(s, p,
   2302                 Settings.Secure.SHOW_FIRST_CRASH_DIALOG_DEV_OPTION,
   2303                 SecureSettingsProto.SHOW_FIRST_CRASH_DIALOG_DEV_OPTION);
   2304         dumpSetting(s, p,
   2305                 Settings.Secure.SKIP_FIRST_USE_HINTS,
   2306                 SecureSettingsProto.SKIP_FIRST_USE_HINTS);
   2307         dumpSetting(s, p,
   2308                 Settings.Secure.SLEEP_TIMEOUT,
   2309                 SecureSettingsProto.SLEEP_TIMEOUT);
   2310         dumpSetting(s, p,
   2311                 Settings.Secure.SMS_DEFAULT_APPLICATION,
   2312                 SecureSettingsProto.SMS_DEFAULT_APPLICATION);
   2313 
   2314         final long soundsToken = p.start(SecureSettingsProto.SOUNDS);
   2315         dumpSetting(s, p,
   2316                 Settings.Secure.CHARGING_SOUNDS_ENABLED,
   2317                 SecureSettingsProto.Sounds.CHARGING_SOUNDS_ENABLED);
   2318         dumpSetting(s, p,
   2319                 Settings.Secure.CHARGING_VIBRATION_ENABLED,
   2320                 SecureSettingsProto.Sounds.CHARGING_VIBRATION_ENABLED);
   2321         p.end(soundsToken);
   2322 
   2323         dumpSetting(s, p,
   2324                 Settings.Secure.SYNC_PARENT_SOUNDS,
   2325                 SecureSettingsProto.SYNC_PARENT_SOUNDS);
   2326         dumpSetting(s, p,
   2327                 Settings.Secure.SYSTEM_NAVIGATION_KEYS_ENABLED,
   2328                 SecureSettingsProto.SYSTEM_NAVIGATION_KEYS_ENABLED);
   2329         dumpSetting(s, p,
   2330                 Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES,
   2331                 SecureSettingsProto.THEME_CUSTOMIZATION_OVERLAY_PACKAGES);
   2332         dumpSetting(s, p,
   2333                 Settings.Secure.TRUST_AGENTS_INITIALIZED,
   2334                 SecureSettingsProto.TRUST_AGENTS_INITIALIZED);
   2335 
   2336         final long ttsToken = p.start(SecureSettingsProto.TTS);
   2337         // Settings.Secure.TTS_USE_DEFAULTS intentionally excluded since it's deprecated.
   2338         dumpSetting(s, p,
   2339                 Settings.Secure.TTS_DEFAULT_RATE,
   2340                 SecureSettingsProto.Tts.DEFAULT_RATE);
   2341         dumpSetting(s, p,
   2342                 Settings.Secure.TTS_DEFAULT_PITCH,
   2343                 SecureSettingsProto.Tts.DEFAULT_PITCH);
   2344         dumpSetting(s, p,
   2345                 Settings.Secure.TTS_DEFAULT_SYNTH,
   2346                 SecureSettingsProto.Tts.DEFAULT_SYNTH);
   2347         // Settings.Secure.TTS_DEFAULT_LANG intentionally excluded since it's deprecated.
   2348         // Settings.Secure.TTS_DEFAULT_COUNTRY intentionally excluded since it's deprecated.
   2349         // Settings.Secure.TTS_DEFAULT_VARIANT intentionally excluded since it's deprecated.
   2350         dumpSetting(s, p,
   2351                 Settings.Secure.TTS_DEFAULT_LOCALE,
   2352                 SecureSettingsProto.Tts.DEFAULT_LOCALE);
   2353         dumpSetting(s, p,
   2354                 Settings.Secure.TTS_ENABLED_PLUGINS,
   2355                 SecureSettingsProto.Tts.ENABLED_PLUGINS);
   2356         p.end(ttsToken);
   2357 
   2358         final long ttyToken = p.start(SecureSettingsProto.TTY);
   2359         dumpSetting(s, p,
   2360                 Settings.Secure.TTY_MODE_ENABLED,
   2361                 SecureSettingsProto.Tty.TTY_MODE_ENABLED);
   2362         dumpSetting(s, p,
   2363                 Settings.Secure.PREFERRED_TTY_MODE,
   2364                 SecureSettingsProto.Tty.PREFERRED_TTY_MODE);
   2365         p.end(ttyToken);
   2366 
   2367         final long tvToken = p.start(SecureSettingsProto.TV);
   2368         // Whether the current user has been set up via setup wizard (0 = false, 1 = true). This
   2369         // value differs from USER_SETUP_COMPLETE in that it can be reset back to 0 in case
   2370         // SetupWizard has been re-enabled on TV devices.
   2371         dumpSetting(s, p,
   2372                 Settings.Secure.TV_USER_SETUP_COMPLETE,
   2373                 SecureSettingsProto.Tv.USER_SETUP_COMPLETE);
   2374         dumpSetting(s, p,
   2375                 Settings.Secure.TV_INPUT_HIDDEN_INPUTS,
   2376                 SecureSettingsProto.Tv.INPUT_HIDDEN_INPUTS);
   2377         dumpSetting(s, p,
   2378                 Settings.Secure.TV_INPUT_CUSTOM_LABELS,
   2379                 SecureSettingsProto.Tv.INPUT_CUSTOM_LABELS);
   2380         p.end(tvToken);
   2381 
   2382         dumpSetting(s, p,
   2383                 Settings.Secure.UI_NIGHT_MODE,
   2384                 SecureSettingsProto.UI_NIGHT_MODE);
   2385         dumpSetting(s, p,
   2386                 Settings.Secure.UNKNOWN_SOURCES_DEFAULT_REVERSED,
   2387                 SecureSettingsProto.UNKNOWN_SOURCES_DEFAULT_REVERSED);
   2388         dumpSetting(s, p,
   2389                 Settings.Secure.USB_AUDIO_AUTOMATIC_ROUTING_DISABLED,
   2390                 SecureSettingsProto.USB_AUDIO_AUTOMATIC_ROUTING_DISABLED);
   2391         dumpSetting(s, p,
   2392                 Settings.Secure.USER_SETUP_COMPLETE,
   2393                 SecureSettingsProto.USER_SETUP_COMPLETE);
   2394 
   2395         final long voiceToken = p.start(SecureSettingsProto.VOICE);
   2396         dumpSetting(s, p,
   2397                 Settings.Secure.VOICE_INTERACTION_SERVICE,
   2398                 SecureSettingsProto.Voice.INTERACTION_SERVICE);
   2399         dumpSetting(s, p,
   2400                 Settings.Secure.VOICE_RECOGNITION_SERVICE,
   2401                 SecureSettingsProto.Voice.RECOGNITION_SERVICE);
   2402         p.end(voiceToken);
   2403 
   2404         final long volumeToken = p.start(SecureSettingsProto.VOLUME);
   2405         dumpSetting(s, p,
   2406                 Settings.Secure.VOLUME_HUSH_GESTURE,
   2407                 SecureSettingsProto.Volume.HUSH_GESTURE);
   2408         dumpSetting(s, p,
   2409                 Settings.Secure.UNSAFE_VOLUME_MUSIC_ACTIVE_MS,
   2410                 SecureSettingsProto.Volume.UNSAFE_VOLUME_MUSIC_ACTIVE_MS);
   2411         p.end(volumeToken);
   2412 
   2413         final long vrToken = p.start(SecureSettingsProto.VR);
   2414         dumpSetting(s, p,
   2415                 Settings.Secure.VR_DISPLAY_MODE,
   2416                 SecureSettingsProto.Vr.DISPLAY_MODE);
   2417         dumpSetting(s, p,
   2418                 Settings.Secure.ENABLED_VR_LISTENERS,
   2419                 SecureSettingsProto.Vr.ENABLED_LISTENERS);
   2420         p.end(vrToken);
   2421 
   2422         dumpSetting(s, p,
   2423                 Settings.Secure.WAKE_GESTURE_ENABLED,
   2424                 SecureSettingsProto.WAKE_GESTURE_ENABLED);
   2425 
   2426         final long zenToken = p.start(SecureSettingsProto.ZEN);
   2427         dumpSetting(s, p,
   2428                 Settings.Secure.ZEN_DURATION,
   2429                 SecureSettingsProto.Zen.DURATION);
   2430         dumpSetting(s, p,
   2431                 Settings.Secure.SHOW_ZEN_UPGRADE_NOTIFICATION,
   2432                 SecureSettingsProto.Zen.SHOW_ZEN_UPGRADE_NOTIFICATION);
   2433         dumpSetting(s, p,
   2434                 Settings.Secure.SHOW_ZEN_SETTINGS_SUGGESTION,
   2435                 SecureSettingsProto.Zen.SHOW_ZEN_SETTINGS_SUGGESTION);
   2436         dumpSetting(s, p,
   2437                 Settings.Secure.ZEN_SETTINGS_UPDATED,
   2438                 SecureSettingsProto.Zen.SETTINGS_UPDATED);
   2439         dumpSetting(s, p,
   2440                 Settings.Secure.ZEN_SETTINGS_SUGGESTION_VIEWED,
   2441                 SecureSettingsProto.Zen.SETTINGS_SUGGESTION_VIEWED);
   2442         p.end(zenToken);
   2443 
   2444         // Please insert new settings using the same order as in SecureSettingsProto.
   2445         p.end(token);
   2446 
   2447         // Settings.Secure.DEVELOPMENT_SETTINGS_ENABLED intentionally excluded since it's deprecated.
   2448         // Settings.Secure.BUGREPORT_IN_POWER_MENU intentionally excluded since it's deprecated.
   2449         // Settings.Secure.ADB_ENABLED intentionally excluded since it's deprecated.
   2450         // Settings.Secure.ALLOW_MOCK_LOCATION intentionally excluded since it's deprecated.
   2451         // Settings.Secure.DATA_ROAMING intentionally excluded since it's deprecated.
   2452         // Settings.Secure.DEVICE_PROVISIONED intentionally excluded since it's deprecated.
   2453         // Settings.Secure.HTTP_PROXY intentionally excluded since it's deprecated.
   2454         // Settings.Secure.LOGGING_ID intentionally excluded since it's deprecated.
   2455         // Settings.Secure.NETWORK_PREFERENCE intentionally excluded since it's deprecated.
   2456         // Settings.Secure.USB_MASS_STORAGE_ENABLED intentionally excluded since it's deprecated.
   2457         // Settings.Secure.USE_GOOGLE_MAIL intentionally excluded since it's deprecated.
   2458         // Settings.Secure.WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON intentionally excluded since it's deprecated.
   2459         // Settings.Secure.WIFI_NETWORKS_AVAILABLE_REPEAT_DELAY intentionally excluded since it's deprecated.
   2460         // Settings.Secure.WIFI_NUM_OPEN_NETWORKS_KEPT intentionally excluded since it's deprecated.
   2461         // Settings.Secure.WIFI_ON intentionally excluded since it's deprecated.
   2462         // Settings.Secure.WIFI_WATCHDOG_ACCEPTABLE_PACKET_LOSS_PERCENTAGE intentionally excluded since it's deprecated.
   2463         // Settings.Secure.WIFI_WATCHDOG_AP_COUNT intentionally excluded since it's deprecated.
   2464         // Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_DELAY_MS intentionally excluded since it's deprecated.
   2465         // Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_ENABLED intentionally excluded since it's deprecated.
   2466         // Settings.Secure.WIFI_WATCHDOG_BACKGROUND_CHECK_TIMEOUT_MS intentionally excluded since it's deprecated.
   2467         // Settings.Secure.WIFI_WATCHDOG_INITIAL_IGNORED_PING_COUNT intentionally excluded since it's deprecated.
   2468         // Settings.Secure.WIFI_WATCHDOG_MAX_AP_CHECKS intentionally excluded since it's deprecated.
   2469         // Settings.Secure.WIFI_WATCHDOG_ON intentionally excluded since it's deprecated.
   2470         // Settings.Secure.WIFI_WATCHDOG_WATCH_LIST intentionally excluded since it's deprecated.
   2471         // Settings.Secure.WIFI_WATCHDOG_PING_COUNT intentionally excluded since it's deprecated.
   2472         // Settings.Secure.WIFI_WATCHDOG_PING_DELAY_MS intentionally excluded since it's deprecated.
   2473         // Settings.Secure.WIFI_WATCHDOG_PING_TIMEOUT_MS intentionally excluded since it's deprecated.
   2474         // Settings.Secure.WIFI_MAX_DHCP_RETRY_COUNT intentionally excluded since it's deprecated.
   2475         // Settings.Secure.WIFI_MOBILE_DATA_TRANSITION_WAKELOCK_TIMEOUT_MS intentionally excluded since it's deprecated.
   2476         // Settings.Secure.BACKGROUND_DATA intentionally excluded since it's deprecated.
   2477         // Settings.Secure.WIFI_IDLE_MS intentionally excluded since it's deprecated.
   2478 
   2479 
   2480         // Please insert new settings using the same order as in SecureSettingsProto.
   2481     }
   2482 
   2483     private static void dumpProtoSystemSettingsLocked(
   2484             @NonNull ProtoOutputStream p, long fieldId, @NonNull SettingsState s) {
   2485         final long token = p.start(fieldId);
   2486 
   2487         s.dumpHistoricalOperations(p, SystemSettingsProto.HISTORICAL_OPERATIONS);
   2488 
   2489         // This uses the same order as in SystemSettingsProto.
   2490 
   2491         dumpSetting(s, p,
   2492                 Settings.System.ADVANCED_SETTINGS,
   2493                 SystemSettingsProto.ADVANCED_SETTINGS);
   2494 
   2495         final long alarmToken = p.start(SystemSettingsProto.ALARM);
   2496         dumpSetting(s, p,
   2497                 Settings.System.ALARM_ALERT,
   2498                 SystemSettingsProto.Alarm.DEFAULT_URI);
   2499         dumpSetting(s, p,
   2500                 Settings.System.ALARM_ALERT_CACHE,
   2501                 SystemSettingsProto.Alarm.ALERT_CACHE);
   2502         // Settings.System.NEXT_ALARM_FORMATTED intentionally excluded since it's deprecated.
   2503         p.end(alarmToken);
   2504 
   2505         final long bluetoothToken = p.start(SystemSettingsProto.BLUETOOTH);
   2506         dumpSetting(s, p,
   2507                 Settings.System.BLUETOOTH_DISCOVERABILITY,
   2508                 SystemSettingsProto.Bluetooth.DISCOVERABILITY);
   2509         dumpSetting(s, p,
   2510                 Settings.System.BLUETOOTH_DISCOVERABILITY_TIMEOUT,
   2511                 SystemSettingsProto.Bluetooth.DISCOVERABILITY_TIMEOUT_SECS);
   2512         p.end(bluetoothToken);
   2513 
   2514         dumpSetting(s, p,
   2515                 Settings.System.DATE_FORMAT,
   2516                 SystemSettingsProto.DATE_FORMAT);
   2517         dumpSetting(s, p,
   2518                 Settings.System.DISPLAY_COLOR_MODE,
   2519                 SystemSettingsProto.DISPLAY_COLOR_MODE);
   2520 
   2521         final long devOptionsToken = p.start(SystemSettingsProto.DEVELOPER_OPTIONS);
   2522         dumpSetting(s, p,
   2523                 Settings.System.SHOW_TOUCHES,
   2524                 SystemSettingsProto.DevOptions.SHOW_TOUCHES);
   2525         dumpSetting(s, p,
   2526                 Settings.System.POINTER_LOCATION,
   2527                 SystemSettingsProto.DevOptions.POINTER_LOCATION);
   2528         dumpSetting(s, p,
   2529                 Settings.System.WINDOW_ORIENTATION_LISTENER_LOG,
   2530                 SystemSettingsProto.DevOptions.WINDOW_ORIENTATION_LISTENER_LOG);
   2531         p.end(devOptionsToken);
   2532 
   2533         final long dtmfToneToken = p.start(SystemSettingsProto.DTMF_TONE);
   2534         dumpSetting(s, p,
   2535                 Settings.System.DTMF_TONE_WHEN_DIALING,
   2536                 SystemSettingsProto.DtmfTone.PLAY_WHEN_DIALING);
   2537         dumpSetting(s, p,
   2538                 Settings.System.DTMF_TONE_TYPE_WHEN_DIALING,
   2539                 SystemSettingsProto.DtmfTone.TYPE_PLAYED_WHEN_DIALING);
   2540         p.end(dtmfToneToken);
   2541 
   2542         dumpSetting(s, p,
   2543                 Settings.System.EGG_MODE,
   2544                 SystemSettingsProto.EGG_MODE);
   2545         dumpSetting(s, p,
   2546                 Settings.System.END_BUTTON_BEHAVIOR,
   2547                 SystemSettingsProto.END_BUTTON_BEHAVIOR);
   2548         dumpSetting(s, p,
   2549                 Settings.System.FONT_SCALE,
   2550                 SystemSettingsProto.FONT_SCALE);
   2551 
   2552         final long hapticFeedbackToken = p.start(SystemSettingsProto.HAPTIC_FEEDBACK);
   2553         dumpSetting(s, p,
   2554                 Settings.System.HAPTIC_FEEDBACK_ENABLED,
   2555                 SystemSettingsProto.HapticFeedback.ENABLED);
   2556         dumpSetting(s, p,
   2557                 Settings.System.HAPTIC_FEEDBACK_INTENSITY,
   2558                 SystemSettingsProto.HapticFeedback.INTENSITY);
   2559         p.end(hapticFeedbackToken);
   2560 
   2561         dumpSetting(s, p,
   2562                 Settings.System.HEARING_AID,
   2563                 SystemSettingsProto.HEARING_AID);
   2564         dumpSetting(s, p,
   2565                 Settings.System.LOCK_TO_APP_ENABLED,
   2566                 SystemSettingsProto.LOCK_TO_APP_ENABLED);
   2567 
   2568         final long lockscreenToken = p.start(SystemSettingsProto.LOCKSCREEN);
   2569         dumpSetting(s, p,
   2570                 Settings.System.LOCKSCREEN_SOUNDS_ENABLED,
   2571                 SystemSettingsProto.Lockscreen.SOUNDS_ENABLED);
   2572         dumpSetting(s, p,
   2573                 Settings.System.LOCKSCREEN_DISABLED,
   2574                 SystemSettingsProto.Lockscreen.DISABLED);
   2575         p.end(lockscreenToken);
   2576 
   2577         dumpSetting(s, p,
   2578                 Settings.System.MEDIA_BUTTON_RECEIVER,
   2579                 SystemSettingsProto.MEDIA_BUTTON_RECEIVER);
   2580 
   2581         final long notificationToken = p.start(SystemSettingsProto.NOTIFICATION);
   2582         dumpSetting(s, p,
   2583                 Settings.System.NOTIFICATION_SOUND,
   2584                 SystemSettingsProto.Notification.SOUND);
   2585         dumpSetting(s, p,
   2586                 Settings.System.NOTIFICATION_SOUND_CACHE,
   2587                 SystemSettingsProto.Notification.SOUND_CACHE);
   2588         dumpSetting(s, p,
   2589                 Settings.System.NOTIFICATION_LIGHT_PULSE,
   2590                 SystemSettingsProto.Notification.LIGHT_PULSE);
   2591         dumpSetting(s, p,
   2592                 Settings.System.NOTIFICATION_VIBRATION_INTENSITY,
   2593                 SystemSettingsProto.Notification.VIBRATION_INTENSITY);
   2594         // Settings.System.NOTIFICATIONS_USE_RING_VOLUME intentionally excluded since it's deprecated.
   2595         p.end(notificationToken);
   2596 
   2597         dumpSetting(s, p,
   2598                 Settings.System.POINTER_SPEED,
   2599                 SystemSettingsProto.POINTER_SPEED);
   2600 
   2601         final long ringtoneToken = p.start(SystemSettingsProto.RINGTONE);
   2602         dumpSetting(s, p,
   2603                 Settings.System.RINGTONE,
   2604                 SystemSettingsProto.Ringtone.DEFAULT_URI);
   2605         dumpSetting(s, p,
   2606                 Settings.System.RINGTONE_CACHE,
   2607                 SystemSettingsProto.Ringtone.CACHE);
   2608         p.end(ringtoneToken);
   2609 
   2610         final long rotationToken = p.start(SystemSettingsProto.ROTATION);
   2611         dumpSetting(s, p,
   2612                 Settings.System.ACCELEROMETER_ROTATION,
   2613                 SystemSettingsProto.Rotation.ACCELEROMETER_ROTATION);
   2614         dumpSetting(s, p,
   2615                 Settings.System.USER_ROTATION,
   2616                 SystemSettingsProto.Rotation.USER_ROTATION);
   2617         dumpSetting(s, p,
   2618                 Settings.System.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY,
   2619                 SystemSettingsProto.Rotation.HIDE_ROTATION_LOCK_TOGGLE_FOR_ACCESSIBILITY);
   2620         p.end(rotationToken);
   2621 
   2622         final long screenToken = p.start(SystemSettingsProto.SCREEN);
   2623         dumpSetting(s, p,
   2624                 Settings.System.SCREEN_OFF_TIMEOUT,
   2625                 SystemSettingsProto.Screen.OFF_TIMEOUT);
   2626         dumpSetting(s, p,
   2627                 Settings.System.SCREEN_BRIGHTNESS,
   2628                 SystemSettingsProto.Screen.BRIGHTNESS);
   2629         dumpSetting(s, p,
   2630                 Settings.System.SCREEN_BRIGHTNESS_FOR_VR,
   2631                 SystemSettingsProto.Screen.BRIGHTNESS_FOR_VR);
   2632         dumpSetting(s, p,
   2633                 Settings.System.SCREEN_BRIGHTNESS_MODE,
   2634                 SystemSettingsProto.Screen.BRIGHTNESS_MODE);
   2635         dumpSetting(s, p,
   2636                 Settings.System.SCREEN_AUTO_BRIGHTNESS_ADJ,
   2637                 SystemSettingsProto.Screen.AUTO_BRIGHTNESS_ADJ);
   2638         p.end(screenToken);
   2639 
   2640         dumpSetting(s, p,
   2641                 Settings.System.SETUP_WIZARD_HAS_RUN,
   2642                 SystemSettingsProto.SETUP_WIZARD_HAS_RUN);
   2643         dumpSetting(s, p,
   2644                 Settings.System.SHOW_BATTERY_PERCENT,
   2645                 SystemSettingsProto.SHOW_BATTERY_PERCENT);
   2646         dumpSetting(s, p,
   2647                 Settings.System.SHOW_GTALK_SERVICE_STATUS,
   2648                 SystemSettingsProto.SHOW_GTALK_SERVICE_STATUS);
   2649         // Settings.System.SHOW_PROCESSES intentionally excluded since it's deprecated.
   2650         // Settings.System.SHOW_WEB_SUGGESTIONS intentionally excluded since it's deprecated.
   2651 
   2652         final long sipToken = p.start(SystemSettingsProto.SIP);
   2653         dumpSetting(s, p,
   2654                 Settings.System.SIP_RECEIVE_CALLS,
   2655                 SystemSettingsProto.Sip.RECEIVE_CALLS);
   2656         dumpSetting(s, p,
   2657                 Settings.System.SIP_CALL_OPTIONS,
   2658                 SystemSettingsProto.Sip.CALL_OPTIONS);
   2659         dumpSetting(s, p,
   2660                 Settings.System.SIP_ALWAYS,
   2661                 SystemSettingsProto.Sip.ALWAYS);
   2662         dumpSetting(s, p,
   2663                 Settings.System.SIP_ADDRESS_ONLY,
   2664                 SystemSettingsProto.Sip.ADDRESS_ONLY);
   2665         // Settings.System.SIP_ASK_ME_EACH_TIME intentionally excluded since it's deprecated.
   2666         p.end(sipToken);
   2667 
   2668         dumpSetting(s, p,
   2669                 Settings.System.SOUND_EFFECTS_ENABLED,
   2670                 SystemSettingsProto.SOUND_EFFECTS_ENABLED);
   2671         // Settings.System.POWER_SOUNDS_ENABLED intentionally excluded since it's deprecated.
   2672         // Settings.System.DOCK_SOUNDS_ENABLED intentionally excluded since it's deprecated.
   2673         // Settings.System.LOW_BATTERY_SOUND intentionally excluded since it's deprecated.
   2674         // Settings.System.DESK_DOCK_SOUND intentionally excluded since it's deprecated.
   2675         // Settings.System.DESK_UNDOCK_SOUND intentionally excluded since it's deprecated.
   2676         // Settings.System.CAR_DOCK_SOUND intentionally excluded since it's deprecated.
   2677         // Settings.System.CAR_UNDOCK_SOUND intentionally excluded since it's deprecated.
   2678         // Settings.System.LOCK_SOUND intentionally excluded since it's deprecated.
   2679         // Settings.System.UNLOCK_SOUND intentionally excluded since it's deprecated.
   2680         dumpSetting(s, p,
   2681                 Settings.System.SYSTEM_LOCALES,
   2682                 SystemSettingsProto.SYSTEM_LOCALES);
   2683 
   2684         final long textToken = p.start(SystemSettingsProto.TEXT);
   2685         dumpSetting(s, p,
   2686                 Settings.System.TEXT_AUTO_REPLACE,
   2687                 SystemSettingsProto.Text.AUTO_REPLACE);
   2688         dumpSetting(s, p,
   2689                 Settings.System.TEXT_AUTO_CAPS,
   2690                 SystemSettingsProto.Text.AUTO_CAPS);
   2691         dumpSetting(s, p,
   2692                 Settings.System.TEXT_AUTO_PUNCTUATE,
   2693                 SystemSettingsProto.Text.AUTO_PUNCTUATE);
   2694         dumpSetting(s, p,
   2695                 Settings.System.TEXT_SHOW_PASSWORD,
   2696                 SystemSettingsProto.Text.SHOW_PASSWORD);
   2697         p.end(textToken);
   2698 
   2699         // Settings.System.AUTO_TIME intentionally excluded since it's deprecated.
   2700         // Settings.System.AUTO_TIME_ZONE intentionally excluded since it's deprecated.
   2701         dumpSetting(s, p,
   2702                 Settings.System.TIME_12_24,
   2703                 SystemSettingsProto.TIME_12_24);
   2704         dumpSetting(s, p,
   2705                 Settings.System.TTY_MODE,
   2706                 SystemSettingsProto.TTY_MODE);
   2707 
   2708         final long vibrateToken = p.start(SystemSettingsProto.VIBRATE);
   2709         dumpSetting(s, p,
   2710                 Settings.System.VIBRATE_ON,
   2711                 SystemSettingsProto.Vibrate.ON);
   2712         dumpSetting(s, p,
   2713                 Settings.System.VIBRATE_INPUT_DEVICES,
   2714                 SystemSettingsProto.Vibrate.INPUT_DEVICES);
   2715         dumpSetting(s, p,
   2716                 Settings.System.VIBRATE_IN_SILENT,
   2717                 SystemSettingsProto.Vibrate.IN_SILENT);
   2718         dumpSetting(s, p,
   2719                 Settings.System.VIBRATE_WHEN_RINGING,
   2720                 SystemSettingsProto.Vibrate.WHEN_RINGING);
   2721         p.end(vibrateToken);
   2722 
   2723         final long volumeToken = p.start(SystemSettingsProto.VOLUME);
   2724         dumpSetting(s, p,
   2725                 Settings.System.VOLUME_RING,
   2726                 SystemSettingsProto.Volume.RING);
   2727         dumpSetting(s, p,
   2728                 Settings.System.VOLUME_SYSTEM,
   2729                 SystemSettingsProto.Volume.SYSTEM);
   2730         dumpSetting(s, p,
   2731                 Settings.System.VOLUME_VOICE,
   2732                 SystemSettingsProto.Volume.VOICE);
   2733         dumpSetting(s, p,
   2734                 Settings.System.VOLUME_MUSIC,
   2735                 SystemSettingsProto.Volume.MUSIC);
   2736         dumpSetting(s, p,
   2737                 Settings.System.VOLUME_ALARM,
   2738                 SystemSettingsProto.Volume.ALARM);
   2739         dumpSetting(s, p,
   2740                 Settings.System.VOLUME_NOTIFICATION,
   2741                 SystemSettingsProto.Volume.NOTIFICATION);
   2742         dumpSetting(s, p,
   2743                 Settings.System.VOLUME_BLUETOOTH_SCO,
   2744                 SystemSettingsProto.Volume.BLUETOOTH_SCO);
   2745         dumpSetting(s, p,
   2746                 Settings.System.VOLUME_ACCESSIBILITY,
   2747                 SystemSettingsProto.Volume.ACCESSIBILITY);
   2748         dumpSetting(s, p,
   2749                 Settings.System.VOLUME_MASTER,
   2750                 SystemSettingsProto.Volume.MASTER);
   2751         dumpSetting(s, p,
   2752                 Settings.System.MASTER_MONO,
   2753                 SystemSettingsProto.Volume.MASTER_MONO);
   2754         dumpSetting(s, p,
   2755                 Settings.System.MODE_RINGER_STREAMS_AFFECTED,
   2756                 SystemSettingsProto.Volume.MODE_RINGER_STREAMS_AFFECTED);
   2757         dumpSetting(s, p,
   2758                 Settings.System.MUTE_STREAMS_AFFECTED,
   2759                 SystemSettingsProto.Volume.MUTE_STREAMS_AFFECTED);
   2760         dumpSetting(s, p,
   2761                 Settings.System.MASTER_BALANCE,
   2762                 SystemSettingsProto.Volume.MASTER_BALANCE);
   2763         p.end(volumeToken);
   2764 
   2765         dumpSetting(s, p,
   2766                 Settings.System.WHEN_TO_MAKE_WIFI_CALLS,
   2767                 SystemSettingsProto.WHEN_TO_MAKE_WIFI_CALLS);
   2768 
   2769         // Please insert new settings using the same order as in SecureSettingsProto.
   2770 
   2771         // The rest of the settings were moved to Settings.Secure, and are thus excluded here since
   2772         // they're deprecated from Settings.System.
   2773 
   2774         // Settings.System.STAY_ON_WHILE_PLUGGED_IN intentionally excluded since it's deprecated.
   2775         // Settings.System.AIRPLANE_MODE_ON intentionally excluded since it's deprecated.
   2776         // Settings.System.RADIO_BLUETOOTH intentionally excluded since it's just a constant.
   2777         // Settings.System.RADIO_WIFI intentionally excluded since it's just a constant.
   2778         // Settings.System.RADIO_WIMAX intentionally excluded since it's just a constant.
   2779         // Settings.System.RADIO_CELL intentionally excluded since it's just a constant.
   2780         // Settings.System.RADIO_NFC intentionally excluded since it's just a constant.
   2781         // Settings.System.AIRPLANE_MODE_RADIOS intentionally excluded since it's deprecated.
   2782         // Settings.System.AIRPLANE_MODE_TOGGLABLE_RADIOS intentionally excluded since it's deprecated.
   2783         // Settings.System.WIFI_SLEEP_POLICY intentionally excluded since it's deprecated.
   2784         // Settings.System.MODE_RINGER intentionally excluded since it's deprecated.
   2785         // Settings.System.WIFI_USE_STATIC_IP intentionally excluded since it's deprecated.
   2786         // Settings.System.WIFI_STATIC_IP intentionally excluded since it's deprecated.
   2787         // Settings.System.WIFI_STATIC_GATEWAY intentionally excluded since it's deprecated.
   2788         // Settings.System.WIFI_STATIC_NETMASK intentionally excluded since it's deprecated.
   2789         // Settings.System.WIFI_STATIC_DNS1 intentionally excluded since it's deprecated.
   2790         // Settings.System.WIFI_STATIC_DNS2 intentionally excluded since it's deprecated.
   2791         // Settings.System.LOCK_PATTERN_ENABLED intentionally excluded since it's deprecated.
   2792         // Settings.System.LOCK_PATTERN_VISIBLE intentionally excluded since it's deprecated.
   2793         // Settings.System.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED intentionally excluded since it's deprecated.
   2794         // Settings.System.DEBUG_APP intentionally excluded since it's deprecated.
   2795         // Settings.System.WAIT_FOR_DEBUGGER intentionally excluded since it's deprecated.
   2796         // Settings.System.DIM_SCREEN intentionally excluded since it's deprecated.
   2797         // Settings.System.ALWAYS_FINISH_ACTIVITIES intentionally excluded since it's deprecated.
   2798         // Settings.System.APPEND_FOR_LAST_AUDIBLE intentionally excluded since it hasn't been used since API 2.
   2799         // Settings.System.WALLPAPER_ACTIVITY intentionally excluded since it's deprecated.
   2800         // Settings.System.WINDOW_ANIMATION_SCALE intentionally excluded since it's deprecated.
   2801         // Settings.System.TRANSITION_ANIMATION_SCALE intentionally excluded since it's deprecated.
   2802         // Settings.System.ANIMATOR_ANIMATION_SCALE intentionally excluded since it's deprecated.
   2803 
   2804         // The rest of the settings were moved to Settings.Secure, and are thus excluded here since
   2805         // they're deprecated from Settings.System.
   2806 
   2807         // Please insert new settings using the same order as in SecureSettingsProto.
   2808         p.end(token);
   2809         // Please insert new settings using the same order as in SecureSettingsProto.
   2810     }
   2811 }
   2812