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          * DEPRECATED. Will be removed in Q. Key for when to wake up to run garage mode.
36          * @deprecated not used by GarageMode anymore. Will be removed in Q.
37          */
38         @Deprecated
39         public static final String KEY_GARAGE_MODE_WAKE_UP_TIME =
40                 "android.car.GARAGE_MODE_WAKE_UP_TIME";
41         /**
42          * DEPRECATED. Will be removed in Q. Key for whether garage mode is enabled.
43          * @deprecated not used by GarageMode anymore. Will be removed in Q.
44          */
45         @Deprecated
46         public static final String KEY_GARAGE_MODE_ENABLED = "android.car.GARAGE_MODE_ENABLED";
47 
48         /**
49          * DEPRECATED. Will be removed in Q. Key for garage mode maintenance window.
50          * @deprecated not used by GarageMode anymore. Will be removed in Q.
51          */
52         @Deprecated
53         public static final String KEY_GARAGE_MODE_MAINTENANCE_WINDOW =
54                 "android.car.GARAGE_MODE_MAINTENANCE_WINDOW";
55 
56         /**
57          * Key for default user id to boot into.
58          *
59          * @hide
60          */
61         public static final String DEFAULT_USER_ID_TO_BOOT_INTO =
62                 "android.car.DEFAULT_BOOT_INTO_USER_ID";
63 
64         /**
65          * Key for user id that is last logged in to.
66          *
67          * @hide
68          */
69         public static final String LAST_ACTIVE_USER_ID =
70                 "android.car.LAST_ACTIVE_USER_ID";
71 
72         /**
73          * Whether default restrictions for users have been set.
74          *
75          * @hide
76          */
77         public static final String DEFAULT_USER_RESTRICTIONS_SET =
78                 "android.car.DEFAULT_USER_RESTRICTIONS_SET";
79 
80         /**
81          * Developer settings String used to explicitly enable the user switch message when
82          * set to {@code "true"}.
83          *
84          * @hide
85          */
86         public static final String ENABLE_USER_SWITCH_DEVELOPER_MESSAGE =
87                 "android.car.ENABLE_USER_SWITCH_DEVELOPER_MESSAGE";
88     }
89 
90     /**
91      * Default garage mode wake up time 00:00
92      *
93      * @hide
94      */
95     public static final int[] DEFAULT_GARAGE_MODE_WAKE_UP_TIME = {0, 0};
96 
97     /**
98      * Default garage mode maintenance window 10 mins.
99      *
100      * @hide
101      */
102     public static final int DEFAULT_GARAGE_MODE_MAINTENANCE_WINDOW = 10 * 60 * 1000; // 10 mins
103 
104     /**
105      * @hide
106      */
107     public static final class Secure {
108 
109         /**
110          * Key for a list of devices to automatically connect on Bluetooth A2DP Sink profile
111          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
112          * @hide
113          */
114         public static final String KEY_BLUETOOTH_A2DP_SINK_DEVICES =
115                 "android.car.KEY_BLUETOOTH_A2DP_SINK_DEVICES";
116 
117         /**
118          * Key for a list of devices to automatically connect on Bluetooth PAN profile
119          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
120          * @hide
121          */
122         public static final String KEY_BLUETOOTH_PAN_DEVICES =
123                 "android.car.KEY_BLUETOOTH_PAN_DEVICES";
124 
125         /**
126          * Key for a list of devices to automatically connect on Bluetooth HFP Client profile
127          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
128          * @hide
129          */
130         public static final String KEY_BLUETOOTH_HFP_CLIENT_DEVICES =
131                 "android.car.KEY_BLUETOOTH_HFP_CLIENT_DEVICES";
132 
133         /**
134          * Key for a list of devices to automatically connect on Bluetooth MAP Client profile
135          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
136          * @hide
137          */
138         public static final String KEY_BLUETOOTH_MAP_CLIENT_DEVICES =
139                 "android.car.KEY_BLUETOOTH_MAP_CLIENT_DEVICES";
140 
141         /**
142          * Key for a list of devices to automatically connect on Bluetooth PBAP Client profile
143          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
144          * @hide
145          */
146         public static final String KEY_BLUETOOTH_PBAP_CLIENT_DEVICES =
147                 "android.car.KEY_BLUETOOTH_PBAP_CLIENT_DEVICES";
148 
149         /**
150          * Key for storing temporarily-disconnected devices and profiles.
151          * Read and written by {@link com.android.car.BluetoothDeviceConnectionPolicy}.
152          * @hide
153          */
154         public static final String KEY_BLUETOOTH_PROFILES_INHIBITED =
155                 "android.car.BLUETOOTH_PROFILES_INHIBITED";
156 
157         /**
158          * Key to enable / disable initial notice screen that will be shown for all user-starting
159          * moments including cold boot, wake up from suspend, and user switching.
160          * The value is boolean (1 or 0).
161          * @hide
162          */
163         public static final String KEY_ENABLE_INITIAL_NOTICE_SCREEN_TO_USER =
164                 "android.car.ENABLE_INITIAL_NOTICE_SCREEN_TO_USER";
165 
166         /**
167          * Key to indicate Setup Wizard is in progress. It differs from USER_SETUP_COMPLETE in
168          * that this flag can be reset to 0 in deferred Setup Wizard flow.
169          * The value is boolean (1 or 0).
170          * @hide
171          */
172         public static final String KEY_SETUP_WIZARD_IN_PROGRESS =
173                 "android.car.SETUP_WIZARD_IN_PROGRESS";
174     }
175 }
176