• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 
17 package android.car.settings;
18 
19 /**
20  * System level car related settings.
21  */
22 public 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 
50     /**
51      * Default garage mode wake up time 00:00
52      *
53      * @hide
54      */
55     public static final int[] DEFAULT_GARAGE_MODE_WAKE_UP_TIME = {0, 0};
56 
57     /**
58      * Default garage mode maintenance window 10 mins.
59      *
60      * @hide
61      */
62     public static final int DEFAULT_GARAGE_MODE_MAINTENANCE_WINDOW = 10 * 60 * 1000; // 10 mins
63 
64     /**
65      * Id for user that is set as default to boot into.
66      *
67      * @hide
68      */
69     public static final int DEFAULT_USER_ID_TO_BOOT_INTO = 10; // Default to first created user.
70 
71     /**
72      * Id for user that is last logged in to.
73      *
74      * @hide
75      */
76     public static final int LAST_ACTIVE_USER_ID = 10; // Default to first created user.
77 
78     /**
79      * @hide
80      */
81     public static final class Secure {
82 
83         /**
84          * Key for a list of devices to automatically connect on Bluetooth A2dp/Avrcp profiles
85          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
86          * @hide
87          */
88         public static final String KEY_BLUETOOTH_AUTOCONNECT_MUSIC_DEVICES =
89                 "android.car.BLUETOOTH_AUTOCONNECT_MUSIC_DEVICES";
90         /**
91          * Key for a list of devices to automatically connect on Bluetooth HFP & PBAP profiles
92          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
93          *
94          * @hide
95          */
96         public static final String KEY_BLUETOOTH_AUTOCONNECT_PHONE_DEVICES =
97                 "android.car.BLUETOOTH_AUTOCONNECT_PHONE_DEVICES";
98 
99         /**
100          * Key for a list of devices to automatically connect on Bluetooth MAP profile
101          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
102          * @hide
103          */
104         public static final String KEY_BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICES =
105                 "android.car.BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICES";
106 
107         /**
108          * Key for a list of devices to automatically connect on Bluetooth PAN profile
109          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
110          * @hide
111          */
112         public static final String KEY_BLUETOOTH_AUTOCONNECT_NETWORK_DEVICES =
113                 "android.car.BLUETOOTH_AUTOCONNECT_NETWORK_DEVICES";
114 
115         /**
116          * Key for setting primary Music Device
117          * Written to by a client with {@link android.Manifest.permission#BLUETOOTH_ADMIN}
118          * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
119          * @hide
120          */
121         public static final String KEY_BLUETOOTH_AUTOCONNECT_MUSIC_DEVICE_PRIORITY_0 =
122                 "android.car.BLUETOOTH_AUTOCONNECT_MUSIC_DEVICE_PRIORITY_0";
123 
124         /**
125          * Key for setting secondary Music Device
126          * Written to by a client with {@link android.Manifest.permission#BLUETOOTH_ADMIN}
127          * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
128          * @hide
129          */
130         public static final String KEY_BLUETOOTH_AUTOCONNECT_MUSIC_DEVICE_PRIORITY_1 =
131                 "android.car.BLUETOOTH_AUTOCONNECT_MUSIC_DEVICE_PRIORITY_1";
132 
133         /**
134          * Key for setting Primary Phone Device
135          * Written to by a client with {@link android.Manifest.permission#BLUETOOTH_ADMIN}
136          * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
137          * @hide
138          */
139         public static final String KEY_BLUETOOTH_AUTOCONNECT_PHONE_DEVICE_PRIORITY_0 =
140                 "android.car.BLUETOOTH_AUTOCONNECT_PHONE_DEVICE_PRIORITY_0";
141 
142         /**
143          * Key for setting Secondary Phone Device
144          * Written to by a client with {@link android.Manifest.permission#BLUETOOTH_ADMIN}
145          * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
146          * @hide
147          */
148         public static final String KEY_BLUETOOTH_AUTOCONNECT_PHONE_DEVICE_PRIORITY_1 =
149                 "android.car.BLUETOOTH_AUTOCONNECT_PHONE_DEVICE_PRIORITY_1";
150 
151         /**
152          * Key for setting Primary Messaging Device
153          * Written to by a client with {@link android.Manifest.permission#BLUETOOTH_ADMIN}
154          * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
155          * @hide
156          */
157         public static final String KEY_BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICE_PRIORITY_0 =
158                 "android.car.BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICE_PRIORITY_0";
159 
160         /**
161          * Key for setting Secondary Messaging Device
162          * Written to by a client with {@link android.Manifest.permission#BLUETOOTH_ADMIN}
163          * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
164          * @hide
165          */
166         public static final String KEY_BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICE_PRIORITY_1 =
167                 "android.car.BLUETOOTH_AUTOCONNECT_MESSAGING_DEVICE_PRIORITY_1";
168 
169         /**
170          * Key for setting Primary Network Device
171          * Written to by a client with {@link com.android.car.Manifest.permission.BLUETOOTH_ADMIN}
172          * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
173          * @hide
174          */
175         public static final String KEY_BLUETOOTH_AUTOCONNECT_NETWORK_DEVICE_PRIORITY_0 =
176                 "android.car.BLUETOOTH_AUTOCONNECT_NETWORK_DEVICE_PRIORITY_0";
177 
178         /**
179          * Key for setting Secondary Network Device
180          * Written to by a client with {@link com.android.car.Manifest.permission.BLUETOOTH_ADMIN}
181          * Read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
182          * @hide
183          */
184         public static final String KEY_BLUETOOTH_AUTOCONNECT_NETWORK_DEVICE_PRIORITY_1 =
185                 "android.car.BLUETOOTH_AUTOCONNECT_NETWORK_DEVICE_PRIORITY_1";
186 
187 
188     }
189 }
190