• 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          * 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     /**
82      * Default garage mode wake up time 00:00
83      *
84      * @hide
85      */
86     public static final int[] DEFAULT_GARAGE_MODE_WAKE_UP_TIME = {0, 0};
87 
88     /**
89      * Default garage mode maintenance window 10 mins.
90      *
91      * @hide
92      */
93     public static final int DEFAULT_GARAGE_MODE_MAINTENANCE_WINDOW = 10 * 60 * 1000; // 10 mins
94 
95     /**
96      * @hide
97      */
98     public static final class Secure {
99 
100         /**
101          * Key for a list of devices to automatically connect on Bluetooth A2DP Sink profile
102          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
103          * @hide
104          */
105         public static final String KEY_BLUETOOTH_A2DP_SINK_DEVICES =
106                 "android.car.KEY_BLUETOOTH_A2DP_SINK_DEVICES";
107 
108         /**
109          * Key for a list of devices to automatically connect on Bluetooth PAN profile
110          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
111          * @hide
112          */
113         public static final String KEY_BLUETOOTH_PAN_DEVICES =
114                 "android.car.KEY_BLUETOOTH_PAN_DEVICES";
115 
116         /**
117          * Key for a list of devices to automatically connect on Bluetooth HFP Client profile
118          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
119          * @hide
120          */
121         public static final String KEY_BLUETOOTH_HFP_CLIENT_DEVICES =
122                 "android.car.KEY_BLUETOOTH_HFP_CLIENT_DEVICES";
123 
124         /**
125          * Key for a list of devices to automatically connect on Bluetooth MAP Client profile
126          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
127          * @hide
128          */
129         public static final String KEY_BLUETOOTH_MAP_CLIENT_DEVICES =
130                 "android.car.KEY_BLUETOOTH_MAP_CLIENT_DEVICES";
131 
132         /**
133          * Key for a list of devices to automatically connect on Bluetooth PBAP Client profile
134          * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy}
135          * @hide
136          */
137         public static final String KEY_BLUETOOTH_PBAP_CLIENT_DEVICES =
138                 "android.car.KEY_BLUETOOTH_PBAP_CLIENT_DEVICES";
139 
140         /**
141          * Key for storing temporarily-disconnected devices and profiles.
142          * Read and written by {@link com.android.car.BluetoothDeviceConnectionPolicy}.
143          * @hide
144          */
145         public static final String KEY_BLUETOOTH_PROFILES_INHIBITED =
146                 "android.car.BLUETOOTH_PROFILES_INHIBITED";
147     }
148 }
149