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/libs/incident/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    optional SettingProto date_format = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
56    optional SettingProto display_color_mode = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
57
58    message DevOptions {
59        option (android.msg_privacy).dest = DEST_EXPLICIT;
60
61        // Show pointer location on screen? 0 = no, 1 = yes. "pointer_location
62        // in code.
63        optional SettingProto pointer_location = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
64        optional SettingProto show_touches = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
65        // Log raw orientation data from {@link
66        // com.android.server.policy.WindowOrientationListener} for use with the
67        // orientationplot.py tool.
68        // 0 = no, 1 = yes
69        optional SettingProto window_orientation_listener_log = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
70    }
71    optional DevOptions developer_options = 7;
72
73    message DtmfTone {
74        option (android.msg_privacy).dest = DEST_EXPLICIT;
75
76        // "dtmf_tone_when_dialing" in code.
77        optional SettingProto play_when_dialing = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
78        // "dtmf_tone_type_when_dialing" in code.
79        optional SettingProto type_played_when_dialing = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
80    }
81    optional DtmfTone dtmf_tone = 8;
82
83    optional SettingProto egg_mode = 9 [ (android.privacy).dest = DEST_AUTOMATIC ];
84    optional SettingProto end_button_behavior = 10 [ (android.privacy).dest = DEST_AUTOMATIC ];
85    optional SettingProto font_scale = 11 [ (android.privacy).dest = DEST_AUTOMATIC ];
86
87    message HapticFeedback {
88        option (android.msg_privacy).dest = DEST_EXPLICIT;
89
90        optional SettingProto enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
91        optional SettingProto intensity = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
92    }
93    optional HapticFeedback haptic_feedback = 12;
94
95    // Whether the hearing aid is enabled. The value is boolean (1 or 0).
96    optional SettingProto hearing_aid = 13 [ (android.privacy).dest = DEST_AUTOMATIC ];
97    optional SettingProto lock_to_app_enabled = 14 [ (android.privacy).dest = DEST_AUTOMATIC ];
98
99    message Lockscreen {
100        option (android.msg_privacy).dest = DEST_EXPLICIT;
101
102        optional SettingProto sounds_enabled = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
103        optional SettingProto disabled = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
104    }
105    optional Lockscreen lockscreen = 15;
106
107    // The system default media button event receiver.
108    optional SettingProto media_button_receiver = 16;
109
110    message Notification {
111        option (android.msg_privacy).dest = DEST_EXPLICIT;
112
113        optional SettingProto sound = 1;
114        optional SettingProto sound_cache = 2;
115        optional SettingProto light_pulse = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
116        optional SettingProto vibration_intensity = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
117    }
118    optional Notification notification = 17;
119
120    optional SettingProto pointer_speed = 18 [ (android.privacy).dest = DEST_AUTOMATIC ];
121
122    message Ringtone {
123        option (android.msg_privacy).dest = DEST_EXPLICIT;
124
125        // "ringtone" in code. The system-wide default ringtone URI.
126        optional SettingProto default_uri = 1;
127        optional SettingProto cache = 2;
128    }
129    optional Ringtone ringtone = 19;
130
131    message Rotation {
132        option (android.msg_privacy).dest = DEST_EXPLICIT;
133
134        // Control whether the accelerometer will be used to change screen
135        // orientation.  If 0, it will not be used unless explicitly requested
136        // by the application; if 1, it will be used by default unless
137        // explicitly disabled by the application.
138        optional SettingProto accelerometer_rotation = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
139        // Default screen rotation when no other policy applies.
140        // When accelerometer_rotation is zero and no on-screen Activity expresses a
141        // preference, this rotation value will be used. Must be one of the
142        // {@link android.view.Surface#ROTATION_0 Surface rotation constants}.
143        optional SettingProto user_rotation = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
144        // Control whether the rotation lock toggle in the System UI should be hidden.
145        // Typically this is done for accessibility purposes to make it harder for
146        // the user to accidentally toggle the rotation lock while the display rotation
147        // has been locked for accessibility.
148        // If 0, then rotation lock toggle is not hidden for accessibility (although it may be
149        // unavailable for other reasons).  If 1, then the rotation lock toggle is hidden.
150        optional SettingProto hide_rotation_lock_toggle_for_accessibility = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
151    }
152    optional Rotation rotation = 20;
153
154    reserved 21; // rtt_calling_mode moved to Settings.Secure
155
156    message Screen {
157        option (android.msg_privacy).dest = DEST_EXPLICIT;
158
159        optional SettingProto off_timeout = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
160        optional SettingProto brightness = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
161        optional SettingProto brightness_for_vr = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
162        optional SettingProto brightness_mode = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
163        optional SettingProto auto_brightness_adj = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
164    }
165    optional Screen screen = 22;
166
167    optional SettingProto setup_wizard_has_run = 23 [ (android.privacy).dest = DEST_AUTOMATIC ];
168    optional SettingProto show_battery_percent = 24 [ (android.privacy).dest = DEST_AUTOMATIC ];
169    optional SettingProto show_gtalk_service_status = 25 [ (android.privacy).dest = DEST_AUTOMATIC ];
170
171    message Sip {
172        option (android.msg_privacy).dest = DEST_EXPLICIT;
173
174        optional SettingProto receive_calls = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
175        optional SettingProto call_options = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
176        optional SettingProto always = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
177        optional SettingProto address_only = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
178    }
179    optional Sip sip = 26;
180
181    optional SettingProto sound_effects_enabled = 27 [ (android.privacy).dest = DEST_AUTOMATIC ];
182    optional SettingProto system_locales = 28 [ (android.privacy).dest = DEST_AUTOMATIC ];
183
184    message Text {
185        option (android.msg_privacy).dest = DEST_EXPLICIT;
186
187        optional SettingProto auto_replace = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
188        optional SettingProto auto_caps = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
189        optional SettingProto auto_punctuate = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
190        optional SettingProto show_password = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
191    }
192    optional Text text = 29;
193
194    optional SettingProto time_12_24 = 30 [ (android.privacy).dest = DEST_AUTOMATIC ];
195    optional SettingProto tty_mode = 31 [ (android.privacy).dest = DEST_AUTOMATIC ];
196
197    message Vibrate {
198        option (android.msg_privacy).dest = DEST_EXPLICIT;
199
200        optional SettingProto on = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
201        optional SettingProto input_devices = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
202        // Whether silent mode should allow vibration feedback. This is used
203        // internally in AudioService and the Sound settings activity to coordinate
204        // decoupling of vibrate and silent modes. This setting will likely be
205        // removed in a future release with support for audio/vibe feedback
206        // profiles.
207        // Not used anymore. On devices with vibrator, the user explicitly selects
208        // silent or vibrate mode. Kept for use by legacy database upgrade code in
209        // DatabaseHelper.
210        optional SettingProto in_silent = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
211        optional SettingProto when_ringing = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
212    }
213    optional Vibrate vibrate = 32;
214
215    message Volume {
216        option (android.msg_privacy).dest = DEST_EXPLICIT;
217
218        optional SettingProto ring = 1 [ (android.privacy).dest = DEST_AUTOMATIC ];
219        optional SettingProto system = 2 [ (android.privacy).dest = DEST_AUTOMATIC ];
220        optional SettingProto voice = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
221        optional SettingProto music = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
222        optional SettingProto alarm = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
223        optional SettingProto notification = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
224        optional SettingProto bluetooth_sco = 7 [ (android.privacy).dest = DEST_AUTOMATIC ];
225        optional SettingProto accessibility = 8 [ (android.privacy).dest = DEST_AUTOMATIC ];
226        optional SettingProto master = 9 [ (android.privacy).dest = DEST_AUTOMATIC ];
227        optional SettingProto master_mono = 10 [ (android.privacy).dest = DEST_AUTOMATIC ];
228        // Determines which streams are affected by ringer mode changes. The stream
229        // type's bit will be set to 1 if it should be muted when going into an
230        // inaudible ringer mode.
231        optional SettingProto mode_ringer_streams_affected = 11 [ (android.privacy).dest = DEST_AUTOMATIC ];
232        // Which streams are affected by mute. The stream type's bit should be set
233        // to 1 if it should be muted when a mute request is received.
234        optional SettingProto mute_streams_affected = 12 [ (android.privacy).dest = DEST_AUTOMATIC ];
235    }
236    optional Volume volume = 33;
237
238    optional SettingProto when_to_make_wifi_calls = 34 [ (android.privacy).dest = DEST_AUTOMATIC ];
239
240    // Please insert fields in alphabetical order and group them into messages
241    // if possible (to avoid reaching the method limit).
242    // Next tag = 35;
243}
244