1/*
2 * Copyright (C) 2017 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17syntax = "proto2";
18package android.providers.settings;
19
20option java_multiple_files = true;
21
22import "frameworks/base/core/proto/android/providers/settings/common.proto";
23import "frameworks/base/core/proto/android/privacy.proto";
24
25// Note: it's a conscious decision to add each setting as a separate field. This
26// allows annotating each setting with its own privacy tag.
27message SystemSettingsProto {
28    option (android.msg_privacy).dest = DEST_EXPLICIT;
29
30    repeated SettingsOperationProto historical_operations = 1;
31
32    optional SettingProto advanced_settings = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
33
34    message Alarm {
35        option (android.msg_privacy).dest = DEST_EXPLICIT;
36
37        // "alarm_alert" in code.
38        optional SettingProto default_uri = 1;
39        optional SettingProto alert_cache = 2;
40    }
41    optional Alarm alarm = 3;
42
43    message Bluetooth {
44        option (android.msg_privacy).dest = DEST_EXPLICIT;
45
46        // Whether remote devices may discover and/or connect to this device:
47        // 2 -- discoverable and connectable
48        // 1 -- connectable but not discoverable
49        // 0 -- neither connectable nor discoverable
50        optional SettingProto discoverability = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
51        optional SettingProto discoverability_timeout_secs = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
52    }
53    optional Bluetooth bluetooth = 4;
54
55    reserved 5; // date_format is not used
56
57    optional SettingProto display_color_mode = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
58
59    message DevOptions {
60        option (android.msg_privacy).dest = DEST_EXPLICIT;
61
62        // Show pointer location on screen? 0 = no, 1 = yes. "pointer_location
63        // in code.
64        optional SettingProto pointer_location = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
65        optional SettingProto show_touches = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
66        // Log raw orientation data from {@link
67        // com.android.server.policy.WindowOrientationListener} for use with the
68        // orientationplot.py tool.
69        // 0 = no, 1 = yes
70        optional SettingProto window_orientation_listener_log = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
71        optional SettingProto show_key_presses = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
72    }
73    optional DevOptions developer_options = 7;
74
75    message DtmfTone {
76        option (android.msg_privacy).dest = DEST_EXPLICIT;
77
78        // "dtmf_tone_when_dialing" in code.
79        optional SettingProto play_when_dialing = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
80        // "dtmf_tone_type_when_dialing" in code.
81        optional SettingProto type_played_when_dialing = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
82    }
83    optional DtmfTone dtmf_tone = 8;
84
85    optional SettingProto egg_mode = 9 [ (android.privacy).dest = DEST_AUTOMATIC ];
86    optional SettingProto end_button_behavior = 10 [ (android.privacy).dest = DEST_AUTOMATIC ];
87    optional SettingProto font_scale = 11 [ (android.privacy).dest = DEST_AUTOMATIC ];
88
89    message HapticFeedback {
90        option (android.msg_privacy).dest = DEST_EXPLICIT;
91
92        optional SettingProto enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
93        optional SettingProto intensity = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
94    }
95    optional HapticFeedback haptic_feedback = 12;
96
97    // Whether the hearing aid is enabled. The value is boolean (1 or 0).
98    optional SettingProto hearing_aid = 13 [ (android.privacy).dest = DEST_AUTOMATIC ];
99    optional SettingProto lock_to_app_enabled = 14 [ (android.privacy).dest = DEST_AUTOMATIC ];
100
101    message Lockscreen {
102        option (android.msg_privacy).dest = DEST_EXPLICIT;
103
104        optional SettingProto sounds_enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
105        optional SettingProto disabled = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
106    }
107    optional Lockscreen lockscreen = 15;
108
109    // The system default media button event receiver.
110    optional SettingProto media_button_receiver = 16;
111
112    message Notification {
113        option (android.msg_privacy).dest = DEST_EXPLICIT;
114
115        optional SettingProto sound = 1;
116        optional SettingProto sound_cache = 2;
117        optional SettingProto light_pulse = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
118        optional SettingProto vibration_intensity = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
119        optional SettingProto camera_flash_notification = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
120        optional SettingProto screen_flash_notification = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
121        optional SettingProto screen_flash_notification_color_global = 7 [ (android.privacy).dest = DEST_AUTOMATIC ];
122    }
123    optional Notification notification = 17;
124
125    message Pointer {
126        option (android.msg_privacy).dest = DEST_EXPLICIT;
127
128        optional SettingProto pointer_fill_style = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
129        optional SettingProto pointer_scale = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
130    }
131    optional Pointer pointer = 37;
132    optional SettingProto pointer_speed = 18 [ (android.privacy).dest = DEST_AUTOMATIC ];
133
134    message Ringtone {
135        option (android.msg_privacy).dest = DEST_EXPLICIT;
136
137        // "ringtone" in code. The system-wide default ringtone URI.
138        optional SettingProto default_uri = 1;
139        optional SettingProto cache = 2;
140    }
141    optional Ringtone ringtone = 19;
142
143    message Rotation {
144        option (android.msg_privacy).dest = DEST_EXPLICIT;
145
146        // Control whether the accelerometer will be used to change screen
147        // orientation.  If 0, it will not be used unless explicitly requested
148        // by the application; if 1, it will be used by default unless
149        // explicitly disabled by the application.
150        optional SettingProto accelerometer_rotation = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
151        // Default screen rotation when no other policy applies.
152        // When accelerometer_rotation is zero and no on-screen Activity expresses a
153        // preference, this rotation value will be used. Must be one of the
154        // {@link android.view.Surface#ROTATION_0 Surface rotation constants}.
155        optional SettingProto user_rotation = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
156        // Control whether the rotation lock toggle in the System UI should be hidden.
157        // Typically this is done for accessibility purposes to make it harder for
158        // the user to accidentally toggle the rotation lock while the display rotation
159        // has been locked for accessibility.
160        // If 0, then rotation lock toggle is not hidden for accessibility (although it may be
161        // unavailable for other reasons).  If 1, then the rotation lock toggle is hidden.
162        optional SettingProto hide_rotation_lock_toggle_for_accessibility = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
163    }
164    optional Rotation rotation = 20;
165
166    reserved 21; // rtt_calling_mode moved to Settings.Secure
167
168    message Screen {
169        option (android.msg_privacy).dest = DEST_EXPLICIT;
170
171        optional SettingProto off_timeout = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
172        optional SettingProto brightness = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
173        optional SettingProto brightness_for_vr = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
174        optional SettingProto brightness_mode = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
175        optional SettingProto auto_brightness_adj = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
176        optional SettingProto brightness_float = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
177        optional SettingProto brightness_for_vr_float = 7 [ (android.privacy).dest = DEST_AUTOMATIC ];
178    }
179    optional Screen screen = 22;
180
181    optional SettingProto setup_wizard_has_run = 23 [ (android.privacy).dest = DEST_AUTOMATIC ];
182    optional SettingProto show_battery_percent = 24 [ (android.privacy).dest = DEST_AUTOMATIC ];
183    optional SettingProto show_gtalk_service_status = 25 [ (android.privacy).dest = DEST_AUTOMATIC ];
184
185    message Sip {
186        option (android.msg_privacy).dest = DEST_EXPLICIT;
187
188        optional SettingProto receive_calls = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
189        optional SettingProto call_options = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
190        optional SettingProto always = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
191        optional SettingProto address_only = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
192    }
193    optional Sip sip = 26;
194
195    optional SettingProto sound_effects_enabled = 27 [ (android.privacy).dest = DEST_AUTOMATIC ];
196    optional SettingProto system_locales = 28 [ (android.privacy).dest = DEST_AUTOMATIC ];
197
198    message Text {
199        option (android.msg_privacy).dest = DEST_EXPLICIT;
200
201        optional SettingProto auto_replace = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
202        optional SettingProto auto_caps = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
203        optional SettingProto auto_punctuate = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
204        optional SettingProto show_password = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
205    }
206    optional Text text = 29;
207
208    optional SettingProto time_12_24 = 30 [ (android.privacy).dest = DEST_AUTOMATIC ];
209
210    message Touchpad {
211        option (android.msg_privacy).dest = DEST_EXPLICIT;
212
213        optional SettingProto natural_scrolling = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
214        optional SettingProto pointer_speed = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
215        optional SettingProto right_click_zone = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
216        optional SettingProto tap_to_click = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
217        optional SettingProto tap_dragging = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
218    }
219    optional Touchpad touchpad = 36;
220
221    optional SettingProto tty_mode = 31 [ (android.privacy).dest = DEST_AUTOMATIC ];
222
223    message Vibrate {
224        option (android.msg_privacy).dest = DEST_EXPLICIT;
225
226        optional SettingProto on = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
227        optional SettingProto input_devices = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
228        // Whether silent mode should allow vibration feedback. This is used
229        // internally in AudioService and the Sound settings activity to coordinate
230        // decoupling of vibrate and silent modes. This setting will likely be
231        // removed in a future release with support for audio/vibe feedback
232        // profiles.
233        // Not used anymore. On devices with vibrator, the user explicitly selects
234        // silent or vibrate mode. Kept for use by legacy database upgrade code in
235        // DatabaseHelper.
236        optional SettingProto in_silent = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
237        optional SettingProto when_ringing = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
238
239        optional SettingProto alarm_intensity = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
240        optional SettingProto media_intensity = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
241        optional SettingProto ring_intensity = 7 [ (android.privacy).dest = DEST_AUTOMATIC ];
242        // notification_intensity is already logged at Notification.vibration_intensity
243        // haptic_feedback_intensity is already logged at HapticFeedback.intensity
244    }
245    optional Vibrate vibrate = 32;
246
247    message Volume {
248        option (android.msg_privacy).dest = DEST_EXPLICIT;
249
250        optional SettingProto ring = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
251        optional SettingProto system = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
252        optional SettingProto voice = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
253        optional SettingProto music = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
254        optional SettingProto alarm = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
255        optional SettingProto notification = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
256        optional SettingProto bluetooth_sco = 7 [ (android.privacy).dest = DEST_AUTOMATIC ];
257        optional SettingProto accessibility = 8 [ (android.privacy).dest = DEST_AUTOMATIC ];
258        optional SettingProto master = 9 [ (android.privacy).dest = DEST_AUTOMATIC ];
259        optional SettingProto master_mono = 10 [ (android.privacy).dest = DEST_AUTOMATIC ];
260        // Determines which streams are affected by ringer mode changes. The stream
261        // type's bit will be set to 1 if it should be muted when going into an
262        // inaudible ringer mode.
263        optional SettingProto mode_ringer_streams_affected = 11 [ (android.privacy).dest = DEST_AUTOMATIC ];
264        // Which streams are affected by mute. The stream type's bit should be set
265        // to 1 if it should be muted when a mute request is received.
266        optional SettingProto mute_streams_affected = 12 [ (android.privacy).dest = DEST_AUTOMATIC ];
267        // Master balance (float -1.f = 100% left, 0.f = dead center, 1.f = 100% right).
268        optional SettingProto master_balance = 13 [ (android.privacy).dest = DEST_AUTOMATIC ];
269    }
270    optional Volume volume = 33;
271
272    optional SettingProto when_to_make_wifi_calls = 34 [ (android.privacy).dest = DEST_AUTOMATIC ];
273
274    optional SettingProto apply_ramping_ringer = 35 [ (android.privacy).dest = DEST_AUTOMATIC ];
275
276    // Please insert fields in alphabetical order and group them into messages
277    // if possible (to avoid reaching the method limit).
278    // Next tag = 38;
279}
280