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 import android.annotation.SystemApi; 20 21 /** 22 * System-level, car-related settings. 23 * 24 * @hide 25 */ 26 @SystemApi 27 public class CarSettings { 28 CarSettings()29 private CarSettings() { 30 throw new UnsupportedOperationException("this class only provide constants"); 31 } 32 33 /** 34 * Global car settings, containing preferences that always apply identically 35 * to all defined users. Applications can read these but are not allowed to write; 36 * like the "Secure" settings, these are for preferences that the user must 37 * explicitly modify through the system UI or specialized APIs for those values. 38 * 39 * <p>To read/write the global car settings, use {@link android.provider.Settings.Global} 40 * with the keys defined here. 41 * 42 * @hide 43 */ 44 public static final class Global { 45 Global()46 private Global() { 47 throw new UnsupportedOperationException("this class only provide constants"); 48 } 49 50 /** 51 * Whether default restrictions for users have been set. 52 * 53 * @hide 54 */ 55 public static final String DEFAULT_USER_RESTRICTIONS_SET = 56 "android.car.DEFAULT_USER_RESTRICTIONS_SET"; 57 58 /** 59 * Developer settings String used to explicitly disable the instrumentation service (when 60 * set to {@code "true"}. 61 * 62 * @hide 63 */ 64 public static final String DISABLE_INSTRUMENTATION_SERVICE = 65 "android.car.DISABLE_INSTRUMENTATION_SERVICE"; 66 67 /** 68 * Developer settings String used to explicitly enable the user switch message when 69 * set to {@code "true"}. 70 * 71 * @hide 72 */ 73 public static final String ENABLE_USER_SWITCH_DEVELOPER_MESSAGE = 74 "android.car.ENABLE_USER_SWITCH_DEVELOPER_MESSAGE"; 75 76 /** 77 * User id of the last foreground user 78 * 79 * @hide 80 */ 81 public static final String LAST_ACTIVE_USER_ID = 82 "android.car.LAST_ACTIVE_USER_ID"; 83 84 /** 85 * User id of the last persistent (i.e, not counting ephemeral guests) foreground user 86 * 87 * @hide 88 */ 89 public static final String LAST_ACTIVE_PERSISTENT_USER_ID = 90 "android.car.LAST_ACTIVE_PERSISTENT_USER_ID"; 91 92 /** 93 * Defines global runtime overrides to system bar policy. 94 * 95 * See {@link com.android.systemui.wm.BarControlPolicy} for value format. 96 * 97 * @hide 98 */ 99 public static final String SYSTEM_BAR_VISIBILITY_OVERRIDE = 100 "android.car.SYSTEM_BAR_VISIBILITY_OVERRIDE"; 101 } 102 103 /** 104 * Default garage mode wake up time 00:00 105 * 106 * @hide 107 */ 108 public static final int[] DEFAULT_GARAGE_MODE_WAKE_UP_TIME = {0, 0}; 109 110 /** 111 * Default garage mode maintenance window 10 mins. 112 * 113 * @hide 114 */ 115 public static final int DEFAULT_GARAGE_MODE_MAINTENANCE_WINDOW = 10 * 60 * 1000; // 10 mins 116 117 /** 118 * @hide 119 */ 120 @SystemApi 121 public static final class Secure { 122 Secure()123 private Secure() { 124 throw new UnsupportedOperationException("this class only provide constants"); 125 } 126 127 /** 128 * Key to indicate whether audio focus requests for 129 * {@link android.hardware.automotive.audiocontrol.V1_0.ContextNumber.NAVIGATION} should 130 * be rejected if focus is currently held by 131 * {@link android.hardware.automotive.audiocontrol.V1_0.ContextNumber.CALL}. 132 * <p>The value is a boolean (1 or 0) where: 133 * <ul> 134 * <li>1 indicates {@code NAVIGATION} should be rejected when a {@code CALL} is in progress. 135 * <li>0 indicates {@code NAVIGATION} and {@code CALL} should be allowed to hold focus 136 * concurrently. 137 * </ul> 138 * 139 * <p>Recommended {@code false} as default value. 140 * 141 * @hide 142 */ 143 @SystemApi 144 public static final String KEY_AUDIO_FOCUS_NAVIGATION_REJECTED_DURING_CALL = 145 "android.car.KEY_AUDIO_FOCUS_NAVIGATION_REJECTED_DURING_CALL"; 146 147 /** 148 * Key to indicate if mute state should be persisted across boot cycles. 149 * <p>The value is a boolean (1 or 0) where: 150 * <ul> 151 * <li>1 indicates volume group mute states should be persisted across boot cycles. 152 * <li>0 indicates volume group mute states should not be persisted across boot cycles. 153 * </ul> 154 * 155 * @hide 156 */ 157 @SystemApi 158 public static final String KEY_AUDIO_PERSIST_VOLUME_GROUP_MUTE_STATES = 159 "android.car.KEY_AUDIO_PERSIST_VOLUME_GROUP_MUTE_STATES"; 160 161 /** 162 * Key for a list of devices to automatically connect on Bluetooth A2DP Sink profile 163 * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy} 164 * @hide 165 */ 166 public static final String KEY_BLUETOOTH_A2DP_SINK_DEVICES = 167 "android.car.KEY_BLUETOOTH_A2DP_SINK_DEVICES"; 168 169 /** 170 * Key for a list of devices to automatically connect on Bluetooth PAN profile 171 * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy} 172 * @hide 173 */ 174 public static final String KEY_BLUETOOTH_PAN_DEVICES = 175 "android.car.KEY_BLUETOOTH_PAN_DEVICES"; 176 177 /** 178 * Key for a list of devices to automatically connect on Bluetooth HFP Client profile 179 * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy} 180 * @hide 181 */ 182 public static final String KEY_BLUETOOTH_HFP_CLIENT_DEVICES = 183 "android.car.KEY_BLUETOOTH_HFP_CLIENT_DEVICES"; 184 185 /** 186 * Key for a list of devices to automatically connect on Bluetooth MAP Client profile 187 * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy} 188 * @hide 189 */ 190 public static final String KEY_BLUETOOTH_MAP_CLIENT_DEVICES = 191 "android.car.KEY_BLUETOOTH_MAP_CLIENT_DEVICES"; 192 193 /** 194 * Key for a list of devices to automatically connect on Bluetooth PBAP Client profile 195 * Written to and read by {@link com.android.car.BluetoothDeviceConnectionPolicy} 196 * @hide 197 */ 198 public static final String KEY_BLUETOOTH_PBAP_CLIENT_DEVICES = 199 "android.car.KEY_BLUETOOTH_PBAP_CLIENT_DEVICES"; 200 201 /** 202 * Key for storing temporarily-disconnected devices and profiles. 203 * Read and written by {@link com.android.car.BluetoothDeviceConnectionPolicy}. 204 * @hide 205 */ 206 public static final String KEY_BLUETOOTH_PROFILES_INHIBITED = 207 "android.car.BLUETOOTH_PROFILES_INHIBITED"; 208 209 /** 210 * Key to enable / disable rotary key event filtering. When enabled, a USB keyboard can be 211 * used as a stand-in for a rotary controller. 212 * @hide 213 */ 214 public static final String KEY_ROTARY_KEY_EVENT_FILTER = 215 "android.car.ROTARY_KEY_EVENT_FILTER"; 216 217 /** 218 * Key to enable / disable initial notice screen that will be shown for all user-starting 219 * moments including cold boot, wake up from suspend, and user switching. 220 * The value is boolean (1 or 0). 221 * @hide 222 */ 223 @SystemApi 224 public static final String KEY_ENABLE_INITIAL_NOTICE_SCREEN_TO_USER = 225 "android.car.ENABLE_INITIAL_NOTICE_SCREEN_TO_USER"; 226 227 /** 228 * Key to indicate Setup Wizard is in progress. It differs from USER_SETUP_COMPLETE in 229 * that this flag can be reset to 0 in deferred Setup Wizard flow. 230 * The value is boolean (1 or 0). 231 * @hide 232 */ 233 @SystemApi 234 public static final String KEY_SETUP_WIZARD_IN_PROGRESS = 235 "android.car.SETUP_WIZARD_IN_PROGRESS"; 236 } 237 } 238