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.util.ArraySet;
20 
21 import java.util.Arrays;
22 import java.util.Set;
23 
24 /**
25  * Contains the list of prefixes for namespaces in which any flag can be written with adb.
26  * <p>
27  * A security review is required for any prefix that's added to this list. To add to
28  * the list, create a change and tag the OWNER. In the change description, include a
29  * description of the flag's functionality, and a justification for why it needs to be
30  * allowlisted.
31  */
32 final class WritableNamespacePrefixes {
33     public static final Set<String> ALLOWLIST =
34             new ArraySet<String>(Arrays.asList(
35                 "app_compat_overrides",
36                 "game_overlay",
37                 "namespace1",
38                 "accessibility",
39                 "activity_manager",
40                 "activity_manager_native_boot",
41                 "adaptive_charging",
42                 "adservices",
43                 "aiai_controlled_releases",
44                 "alarm_manager",
45                 "app_cloning",
46                 "app_compat",
47                 "app_compat_overrides",
48                 "app_hibernation",
49                 "app_standby",
50                 "appsearch",
51                 "arc_app_compat",
52                 "astrea_controlled_releases",
53                 "attention_manager_service",
54                 "auto_pin_confirmation",
55                 "autofill",
56                 "backup_and_restore",
57                 "base",
58                 "battery_saver",
59                 "biometrics",
60                 "bluetooth",
61                 "bluetooth_native",
62                 "camera_native",
63                 "captive_portal_login",
64                 "car",
65                 "cellular_security",
66                 "clipboard",
67                 "codegen_feature_flag_extractor",
68                 "companion",
69                 "configuration",
70                 "connectivity",
71                 "connectivity_thermal_power_manager",
72                 "constrain_display_apis",
73                 "content_capture",
74                 "credential_manager",
75                 "device_idle",
76                 "device_personalization_services",
77                 "device_policy_manager",
78                 "devicelock",
79                 "display_manager",
80                 "dropbox",
81                 "edgetpu_native",
82                 "exo",
83                 "flipendo",
84                 "game_driver",
85                 "game_overlay",
86                 "gantry",
87                 "halyard_demo",
88                 "haptics",
89                 "hdmi_control",
90                 "health_fitness",
91                 "input",
92                 "input_method",
93                 "input_native",
94                 "input_native_boot",
95                 "intelligence_bubbles",
96                 "interaction_jank_monitor",
97                 "ipsec",
98                 "jobscheduler",
99                 "kiwi",
100                 "latency_tracker",
101                 "launcher",
102                 "leaked_animator",
103                 "lmkd_native",
104                 "location",
105                 "logcat_manager",
106                 "low_power_standby",
107                 "media",
108                 "media_better_together",
109                 "media_native",
110                 "memory_safety_native",
111                 "memory_safety_native_boot",
112                 "mglru_native",
113                 "nearby",
114                 "netd_native",
115                 "nnapi_native",
116                 "notification_assistant",
117                 "odad",
118                 "on_device_abuse",
119                 "on_device_personalization",
120                 "oslo",
121                 "ota",
122                 "package_manager_service",
123                 "permissions",
124                 "privacy",
125                 "private_compute_services",
126                 "profcollect_native_boot",
127                 "remote_auth",
128                 "remote_key_provisioning_native",
129                 "rollback",
130                 "rollback_boot",
131                 "rotation_resolver",
132                 "runtime",
133                 "runtime_native",
134                 "runtime_native_boot",
135                 "sdk_sandbox",
136                 "settings_stats",
137                 "shared",
138                 "shared_native",
139                 "shared_native_boot",
140                 "statsd_java",
141                 "statsd_java_boot",
142                 "statsd_native",
143                 "statsd_native_boot",
144                 "storage_native_boot",
145                 "surface_flinger_native_boot",
146                 "swcodec_native",
147                 "system_scheduler",
148                 "system_server_watchdog",
149                 "system_time",
150                 "systemui",
151                 "tare",
152                 "telephony",
153                 "testing",
154                 "tethering",
155                 "text",
156                 "textclassifier",
157                 "touchflow_native",
158                 "tv_hdr_output_control",
159                 "twoshay_native",
160                 "uwb",
161                 "vcn",
162                 "vendor_system_native",
163                 "vendor_system_native_boot",
164                 "virtualization_framework_native",
165                 "vpn",
166                 "wallpaper_content",
167                 "wear",
168                 "wearable_sensing",
169                 "widget",
170                 "wifi",
171                 "window_manager",
172                 "window_manager_native_boot",
173                 "wrong"
174             ));
175 }
176