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