1/*
2 * Copyright (C) 2016 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
17package android.car.settings;
18
19/**
20 * System level car related settings.
21 */
22public class CarSettings {
23
24    /**
25     * Global car settings, containing preferences that always apply identically
26     * to all defined users.  Applications can read these but are not allowed to write;
27     * like the "Secure" settings, these are for preferences that the user must
28     * explicitly modify through the system UI or specialized APIs for those values.
29     *
30     * To read/write the global car settings, use {@link android.provider.Settings.Global}
31     * with the keys defined here.
32     */
33    public static final class Global {
34        /**
35         * Key for when to wake up to run garage mode.
36         */
37        public static final String KEY_GARAGE_MODE_WAKE_UP_TIME =
38                "android.car.GARAGE_MODE_WAKE_UP_TIME";
39        /**
40         * Key for whether garage mode is enabled.
41         */
42        public static final String KEY_GARAGE_MODE_ENABLED = "android.car.GARAGE_MODE_ENABLED";
43        /**
44         * Key for garage mode maintenance window.
45         */
46        public static final String KEY_GARAGE_MODE_MAINTENANCE_WINDOW =
47                "android.car.GARAGE_MODE_MAINTENANCE_WINDOW";
48        /**
49         * Key for music volume. This is used internally, changing this value will not change the
50         * volume.
51         *
52         * @hide
53         */
54        public static final String KEY_VOLUME_MUSIC = "android.car.VOLUME_MUSIC";
55        /**
56         * Key for navigation volume. This is used internally, changing this value will not change
57         * the volume.
58         *
59         * @hide
60         */
61        public static final String KEY_VOLUME_NAVIGATION = "android.car.VOLUME_NAVIGATION";
62        /**
63         * Key for voice command volume. This is used internally, changing this value will
64         * not change the volume.
65         *
66         * @hide
67         */
68        public static final String KEY_VOLUME_VOICE_COMMAND = "android.car.VOLUME_VOICE_COMMAND";
69        /**
70         * Key for call volume. This is used internally, changing this value will not change the
71         * volume.
72         *
73         * @hide
74         */
75        public static final String KEY_VOLUME_CALL = "android.car.VOLUME_CALL";
76        /**
77         * Key for phone ring volume. This is used internally, changing this value will not change
78         * the volume.
79         *
80         * @hide
81         */
82        public static final String KEY_VOLUME_RINGTONE = "android.car.VOLUME_RINGTONE";
83        /**
84         * Key for alarm volume. This is used internally, changing this value will not change the
85         * volume.
86         *
87         * @hide
88         */
89        public static final String KEY_VOLUME_ALARM = "android.car.VOLUME_ALARM";
90        /**
91         * Key for notification volume. This is used internally, changing this value will not change
92         * the volume.
93         *
94         * @hide
95         */
96        public static final String KEY_VOLUME_NOTIFICATION = "android.car.VOLUME_NOTIFICATION";
97        /**
98         * Key for safety alert volume. This is used internally, changing this value will not
99         * change the volume.
100         *
101         * @hide
102         */
103        public static final String KEY_VOLUME_SAFETY_ALERT = "android.car.VOLUME_SAFETY_ALERT";
104        /**
105         * Key for cd volume. This is used internally, changing this value will not change the
106         * volume.
107         *
108         * @hide
109         */
110        public static final String KEY_VOLUME_CD_ROM = "android.car.VOLUME_CD_ROM";
111        /**
112         * Key for aux volume. This is used internally, changing this value will not change the
113         * volume.
114         *
115         * @hide
116         */
117        public static final String KEY_VOLUME_AUX = "android.car.VOLUME_AUX";
118        /**
119         * Key for system volume. This is used internally, changing this value will not change the
120         * volume.
121         *
122         * @hide
123         */
124        public static final String KEY_VOLUME_SYSTEM_SOUND = "android.car.VOLUME_SYSTEM";
125        /**
126         * Key for radio volume. This is used internally, changing this value will not change the
127         * volume.
128         *
129         * @hide
130         */
131        public static final String KEY_VOLUME_RADIO = "android.car.VOLUME_RADIO";
132    }
133
134    /**
135     * Default garage mode wake up time 00:00
136     *
137     * @hide
138     */
139    public static final int[] DEFAULT_GARAGE_MODE_WAKE_UP_TIME = {0, 0};
140
141    /**
142     * Default garage mode maintenance window 10 mins.
143     *
144     * @hide
145     */
146    public static final int DEFAULT_GARAGE_MODE_MAINTENANCE_WINDOW = 10 * 60 * 1000; // 10 mins
147
148    /**
149     * @hide
150     */
151    public static final class Secure {
152
153        /**
154         * Key for a list of devices to automatically connect on Bluetooth A2dp/Avrcp profiles
155         * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
156         * @hide
157         */
158        public static final String KEY_BLUETOOTH_AUTOCONNECT_MUSIC_DEVICES =
159                "android.car.BLUETOOTH_AUTOCONNECT_MUSIC_DEVICES";
160        /**
161         * Key for a list of devices to automatically connect on Bluetooth HFP & PBAP profiles
162         * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
163         *
164         * @hide
165         */
166        public static final String KEY_BLUETOOTH_AUTOCONNECT_PHONE_DEVICES =
167                "android.car.BLUETOOTH_AUTOCONNECT_PHONE_DEVICES";
168
169        /**
170         * Key for a list of devices to automatically connect on Bluetooth MAP profile
171         * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
172         * @hide
173         */
174        public static final String KEY_BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICES =
175                "android.car.BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICES";
176
177        /**
178         * Key for setting primary Music Device
179         * Written to by a client with {@link com.android.car.Manifest.permission.BLUETOOTH_ADMIN}
180         * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
181         * @hide
182         */
183        public static final String KEY_BLUETOOTH_AUTOCONNECT_MUSIC_DEVICE_PRIORITY_0 =
184                "android.car.BLUETOOTH_AUTOCONNECT_MUSIC_DEVICE_PRIORITY_0";
185
186        /**
187         * Key for setting secondary Music Device
188         * Written to by a client with {@link com.android.car.Manifest.permission.BLUETOOTH_ADMIN}
189         * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
190         * @hide
191         */
192        public static final String KEY_BLUETOOTH_AUTOCONNECT_MUSIC_DEVICE_PRIORITY_1 =
193                "android.car.BLUETOOTH_AUTOCONNECT_MUSIC_DEVICE_PRIORITY_1";
194
195        /**
196         * Key for setting Primary Phone Device
197         * Written to by a client with {@link com.android.car.Manifest.permission.BLUETOOTH_ADMIN}
198         * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
199         * @hide
200         */
201        public static final String KEY_BLUETOOTH_AUTOCONNECT_PHONE_DEVICE_PRIORITY_0 =
202                "android.car.BLUETOOTH_AUTOCONNECT_PHONE_DEVICE_PRIORITY_0";
203
204        /**
205         * Key for setting Secondary Phone Device
206         * Written to by a client with {@link com.android.car.Manifest.permission.BLUETOOTH_ADMIN}
207         * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
208         * @hide
209         */
210        public static final String KEY_BLUETOOTH_AUTOCONNECT_PHONE_DEVICE_PRIORITY_1 =
211                "android.car.BLUETOOTH_AUTOCONNECT_PHONE_DEVICE_PRIORITY_1";
212
213        /**
214         * Key for setting Primary Messaging Device
215         * Written to by a client with {@link com.android.car.Manifest.permission.BLUETOOTH_ADMIN}
216         * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
217         * @hide
218         */
219        public static final String KEY_BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICE_PRIORITY_0 =
220                "android.car.BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICE_PRIORITY_0";
221
222        /**
223         * Key for setting Secondary Messaging Device
224         * Written to by a client with {@link com.android.car.Manifest.permission.BLUETOOTH_ADMIN}
225         * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
226         * @hide
227         */
228        public static final String KEY_BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICE_PRIORITY_1 =
229                "android.car.BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICE_PRIORITY_1";
230
231    }
232}
233