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