1package android.car { 2 3 public final class Car { 4 method public void connect() throws java.lang.IllegalStateException; 5 method public static android.car.Car createCar(android.content.Context, android.content.ServiceConnection, android.os.Handler); 6 method public static android.car.Car createCar(android.content.Context, android.content.ServiceConnection); 7 method public void disconnect(); 8 method public int getCarConnectionType(); 9 method public java.lang.Object getCarManager(java.lang.String) throws android.car.CarNotConnectedException; 10 method public boolean isConnected(); 11 method public boolean isConnecting(); 12 field public static final java.lang.String APP_FOCUS_SERVICE = "app_focus"; 13 field public static final java.lang.String AUDIO_SERVICE = "audio"; 14 field public static final int CONNECTION_TYPE_EMBEDDED = 5; // 0x5 15 field public static final java.lang.String INFO_SERVICE = "info"; 16 field public static final java.lang.String PACKAGE_SERVICE = "package"; 17 field public static final java.lang.String PERMISSION_CAR_CONTROL_AUDIO_VOLUME = "android.car.permission.CAR_CONTROL_AUDIO_VOLUME"; 18 field public static final java.lang.String PERMISSION_FUEL = "android.car.permission.CAR_FUEL"; 19 field public static final java.lang.String PERMISSION_MILEAGE = "android.car.permission.CAR_MILEAGE"; 20 field public static final java.lang.String PERMISSION_SPEED = "android.car.permission.CAR_SPEED"; 21 field public static final java.lang.String SENSOR_SERVICE = "sensor"; 22 field public static final int VERSION = 2; // 0x2 23 } 24 25 public final class CarAppFocusManager { 26 method public void abandonAppFocus(android.car.CarAppFocusManager.OnAppFocusOwnershipCallback, int); 27 method public void abandonAppFocus(android.car.CarAppFocusManager.OnAppFocusOwnershipCallback); 28 method public void addFocusListener(android.car.CarAppFocusManager.OnAppFocusChangedListener, int) throws android.car.CarNotConnectedException; 29 method public boolean isOwningFocus(android.car.CarAppFocusManager.OnAppFocusOwnershipCallback, int) throws android.car.CarNotConnectedException; 30 method public void removeFocusListener(android.car.CarAppFocusManager.OnAppFocusChangedListener, int); 31 method public void removeFocusListener(android.car.CarAppFocusManager.OnAppFocusChangedListener); 32 method public int requestAppFocus(int, android.car.CarAppFocusManager.OnAppFocusOwnershipCallback) throws android.car.CarNotConnectedException, java.lang.SecurityException; 33 field public static final int APP_FOCUS_REQUEST_FAILED = 0; // 0x0 34 field public static final int APP_FOCUS_REQUEST_SUCCEEDED = 1; // 0x1 35 field public static final int APP_FOCUS_TYPE_NAVIGATION = 1; // 0x1 36 field public static final int APP_FOCUS_TYPE_VOICE_COMMAND = 2; // 0x2 37 } 38 39 public static abstract interface CarAppFocusManager.OnAppFocusChangedListener { 40 method public abstract void onAppFocusChanged(int, boolean); 41 } 42 43 public static abstract interface CarAppFocusManager.OnAppFocusOwnershipCallback { 44 method public abstract void onAppFocusOwnershipGranted(int); 45 method public abstract void onAppFocusOwnershipLost(int); 46 } 47 48 public final class CarInfoManager { 49 method public java.lang.String getManufacturer() throws android.car.CarNotConnectedException; 50 method public java.lang.String getModel() throws android.car.CarNotConnectedException; 51 method public java.lang.String getModelYear() throws android.car.CarNotConnectedException; 52 method public java.lang.String getVehicleId() throws android.car.CarNotConnectedException; 53 } 54 55 public class CarNotConnectedException extends java.lang.Exception { 56 ctor public CarNotConnectedException(); 57 ctor public CarNotConnectedException(java.lang.String); 58 ctor public CarNotConnectedException(java.lang.String, java.lang.Throwable); 59 ctor public CarNotConnectedException(java.lang.Exception); 60 } 61 62} 63 64package android.car.app.menu { 65 66 public abstract class CarMenuCallbacks { 67 ctor public CarMenuCallbacks(); 68 method public abstract android.car.app.menu.RootMenu getRootMenu(android.os.Bundle); 69 method public abstract void onCarMenuClosed(); 70 method public abstract void onCarMenuClosing(); 71 method public abstract void onCarMenuOpened(); 72 method public abstract void onCarMenuOpening(); 73 method public abstract void onItemClicked(java.lang.String); 74 method public abstract boolean onItemLongClicked(java.lang.String); 75 method public abstract boolean onMenuClicked(); 76 method public abstract void subscribe(java.lang.String, android.car.app.menu.SubscriptionCallbacks); 77 method public abstract void unsubscribe(java.lang.String, android.car.app.menu.SubscriptionCallbacks); 78 } 79 80 public class CarMenuConstants { 81 ctor public CarMenuConstants(); 82 } 83 84 public static class CarMenuConstants.MenuItemConstants { 85 ctor public CarMenuConstants.MenuItemConstants(); 86 field public static final int FLAG_BROWSABLE = 1; // 0x1 87 field public static final int FLAG_FIRSTITEM = 2; // 0x2 88 field public static final java.lang.String KEY_EMPTY_PLACEHOLDER = "android.car.app.menu.empty_placeholder"; 89 field public static final java.lang.String KEY_FLAGS = "android.car.app.menu.flags"; 90 field public static final java.lang.String KEY_ID = "android.car.app.menu.id"; 91 field public static final java.lang.String KEY_LEFTICON = "android.car.app.menu.leftIcon"; 92 field public static final java.lang.String KEY_REMOTEVIEWS = "android.car.app.menu.remoteViews"; 93 field public static final java.lang.String KEY_RIGHTICON = "android.car.app.menu.rightIcon"; 94 field public static final java.lang.String KEY_RIGHTTEXT = "android.car.app.menu.rightText"; 95 field public static final java.lang.String KEY_TEXT = "android.car.app.menu.text"; 96 field public static final java.lang.String KEY_TITLE = "android.car.app.menu.title"; 97 field public static final java.lang.String KEY_WIDGET = "android.car.app.menu.widget"; 98 field public static final java.lang.String KEY_WIDGET_STATE = "android.car.app.menu.widget_state"; 99 field public static final int WIDGET_CHECKBOX = 1; // 0x1 100 field public static final int WIDGET_TEXT_VIEW = 2; // 0x2 101 } 102 103 public static abstract class CarMenuConstants.MenuItemConstants.MenuItemFlags implements java.lang.annotation.Annotation { 104 } 105 106 public static abstract class CarMenuConstants.MenuItemConstants.WidgetTypes implements java.lang.annotation.Annotation { 107 } 108 109 public abstract class CarUiEntry { 110 ctor public CarUiEntry(android.content.Context, android.content.Context); 111 method public abstract void closeDrawer(); 112 method public abstract android.view.View getContentView(); 113 method public abstract int getFragmentContainerId(); 114 method public abstract java.lang.CharSequence getSearchBoxText(); 115 method public abstract void hideMenuButton(); 116 method public abstract void hideTitle(); 117 method public abstract void onPause(); 118 method public abstract void onRestoreInstanceState(android.os.Bundle); 119 method public abstract void onResume(); 120 method public abstract void onSaveInstanceState(android.os.Bundle); 121 method public abstract void onStart(); 122 method public abstract void onStop(); 123 method public abstract void openDrawer(); 124 method public abstract void restoreMenuDrawable(); 125 method public abstract void setAutoLightDarkMode(); 126 method public abstract void setBackground(android.graphics.Bitmap); 127 method public abstract void setCarMenuCallbacks(android.car.app.menu.CarMenuCallbacks); 128 method public abstract void setDarkMode(); 129 method public abstract void setLightMode(); 130 method public abstract void setMenuButtonBitmap(android.graphics.Bitmap); 131 method public abstract void setMenuButtonColor(int); 132 method public abstract void setScrimColor(int); 133 method public abstract void setSearchBoxColors(int, int, int, int); 134 method public abstract void setSearchBoxEditListener(android.car.app.menu.SearchBoxEditListener); 135 method public abstract void setSearchBoxEndView(android.view.View); 136 method public abstract void setTitle(java.lang.CharSequence); 137 method public abstract void showMenu(java.lang.String, java.lang.String); 138 method public abstract void showSearchBox(android.view.View.OnClickListener); 139 method public abstract void showTitle(); 140 method public abstract void showToast(java.lang.String, long); 141 method public abstract android.widget.EditText startInput(java.lang.String, android.view.View.OnClickListener); 142 method public abstract void stopInput(); 143 field protected final android.content.Context mAppContext; 144 field protected final android.content.Context mUiLibContext; 145 } 146 147 public class RootMenu { 148 ctor public RootMenu(java.lang.String); 149 ctor public RootMenu(java.lang.String, android.os.Bundle); 150 method public android.os.Bundle getBundle(); 151 method public java.lang.String getId(); 152 } 153 154 public abstract class SearchBoxEditListener { 155 ctor public SearchBoxEditListener(); 156 method public abstract void onEdit(java.lang.String); 157 method public abstract void onSearch(java.lang.String); 158 } 159 160 public abstract class SubscriptionCallbacks { 161 ctor public SubscriptionCallbacks(); 162 method public abstract void onChildChanged(java.lang.String, android.os.Bundle); 163 method public abstract void onChildrenLoaded(java.lang.String, java.util.List<android.os.Bundle>); 164 method public abstract void onError(java.lang.String); 165 } 166 167} 168 169package android.car.content.pm { 170 171 public final class CarPackageManager { 172 method public boolean isActivityAllowedWhileDriving(java.lang.String, java.lang.String) throws android.car.CarNotConnectedException; 173 method public boolean isServiceAllowedWhileDriving(java.lang.String, java.lang.String) throws android.car.CarNotConnectedException; 174 } 175 176} 177 178package android.car.hardware { 179 180 public class CarSensorEvent implements android.os.Parcelable { 181 method public int describeContents(); 182 method public void writeToParcel(android.os.Parcel, int); 183 field public static final android.os.Parcelable.Creator<android.car.hardware.CarSensorEvent> CREATOR; 184 field public static final int DRIVE_STATUS_FULLY_RESTRICTED = 31; // 0x1f 185 field public static final int DRIVE_STATUS_LIMIT_MESSAGE_LEN = 16; // 0x10 186 field public static final int DRIVE_STATUS_NO_CONFIG = 8; // 0x8 187 field public static final int DRIVE_STATUS_NO_KEYBOARD_INPUT = 2; // 0x2 188 field public static final int DRIVE_STATUS_NO_VIDEO = 1; // 0x1 189 field public static final int DRIVE_STATUS_NO_VOICE_INPUT = 4; // 0x4 190 field public static final int DRIVE_STATUS_UNRESTRICTED = 0; // 0x0 191 field public static final int GEAR_DRIVE = 100; // 0x64 192 field public static final int GEAR_EIGHTH = 8; // 0x8 193 field public static final int GEAR_FIFTH = 5; // 0x5 194 field public static final int GEAR_FIRST = 1; // 0x1 195 field public static final int GEAR_FOURTH = 4; // 0x4 196 field public static final int GEAR_NEUTRAL = 0; // 0x0 197 field public static final int GEAR_NINTH = 9; // 0x9 198 field public static final int GEAR_PARK = 101; // 0x65 199 field public static final int GEAR_REVERSE = 102; // 0x66 200 field public static final int GEAR_SECOND = 2; // 0x2 201 field public static final int GEAR_SEVENTH = 7; // 0x7 202 field public static final int GEAR_SIXTH = 6; // 0x6 203 field public static final int GEAR_TENTH = 10; // 0xa 204 field public static final int GEAR_THIRD = 3; // 0x3 205 field public static final int IGNITION_STATE_ACC = 3; // 0x3 206 field public static final int IGNITION_STATE_LOCK = 1; // 0x1 207 field public static final int IGNITION_STATE_OFF = 2; // 0x2 208 field public static final int IGNITION_STATE_ON = 4; // 0x4 209 field public static final int IGNITION_STATE_START = 5; // 0x5 210 field public static final int IGNITION_STATE_UNDEFINED = 0; // 0x0 211 field public static final int INDEX_ENVIRONMENT_PRESSURE = 1; // 0x1 212 field public static final int INDEX_ENVIRONMENT_TEMPERATURE = 0; // 0x0 213 field public static final int INDEX_FUEL_LEVEL_IN_DISTANCE = 1; // 0x1 214 field public static final int INDEX_FUEL_LEVEL_IN_PERCENTILE = 0; // 0x0 215 field public static final int INDEX_FUEL_LOW_WARNING = 0; // 0x0 216 field public final float[] floatValues; 217 field public final int[] intValues; 218 field public int sensorType; 219 field public long timestamp; 220 } 221 222 public static class CarSensorEvent.EnvironmentData { 223 field public float pressure; 224 field public float temperature; 225 field public long timestamp; 226 } 227 228 public final class CarSensorManager { 229 method public android.car.hardware.CarSensorEvent getLatestSensorEvent(int) throws android.car.CarNotConnectedException; 230 method public int[] getSupportedSensors() throws android.car.CarNotConnectedException; 231 method public boolean isSensorSupported(int) throws android.car.CarNotConnectedException; 232 method public static boolean isSensorSupported(int[], int); 233 method public boolean registerListener(android.car.hardware.CarSensorManager.OnSensorChangedListener, int, int) throws android.car.CarNotConnectedException, java.lang.IllegalArgumentException; 234 method public void unregisterListener(android.car.hardware.CarSensorManager.OnSensorChangedListener); 235 method public void unregisterListener(android.car.hardware.CarSensorManager.OnSensorChangedListener, int); 236 field public static final int SENSOR_RATE_FAST = 1; // 0x1 237 field public static final int SENSOR_RATE_FASTEST = 0; // 0x0 238 field public static final int SENSOR_RATE_NORMAL = 3; // 0x3 239 field public static final int SENSOR_RATE_UI = 2; // 0x2 240 field public static final int SENSOR_TYPE_CAR_SPEED = 2; // 0x2 241 field public static final int SENSOR_TYPE_DRIVING_STATUS = 11; // 0xb 242 field public static final int SENSOR_TYPE_ENVIRONMENT = 12; // 0xc 243 field public static final int SENSOR_TYPE_FUEL_LEVEL = 5; // 0x5 244 field public static final int SENSOR_TYPE_GEAR = 7; // 0x7 245 field public static final int SENSOR_TYPE_IGNITION_STATE = 22; // 0x16 246 field public static final int SENSOR_TYPE_NIGHT = 9; // 0x9 247 field public static final int SENSOR_TYPE_ODOMETER = 4; // 0x4 248 field public static final int SENSOR_TYPE_PARKING_BRAKE = 6; // 0x6 249 field public static final int SENSOR_TYPE_RPM = 3; // 0x3 250 field public static final int SENSOR_TYPE_VENDOR_EXTENSION_END = 1879048191; // 0x6fffffff 251 } 252 253 public static abstract interface CarSensorManager.OnSensorChangedListener { 254 method public abstract void onSensorChanged(android.car.hardware.CarSensorEvent); 255 } 256 257} 258 259package android.car.media { 260 261 public final class CarAudioManager { 262 method public void abandonAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, android.media.AudioAttributes); 263 method public android.media.AudioAttributes getAudioAttributesForCarUsage(int) throws android.car.CarNotConnectedException; 264 method public int getStreamMaxVolume(int) throws android.car.CarNotConnectedException; 265 method public int getStreamMinVolume(int) throws android.car.CarNotConnectedException; 266 method public int getStreamVolume(int) throws android.car.CarNotConnectedException; 267 method public int requestAudioFocus(android.media.AudioManager.OnAudioFocusChangeListener, android.media.AudioAttributes, int, int) throws android.car.CarNotConnectedException, java.lang.IllegalArgumentException; 268 method public void setStreamVolume(int, int, int) throws android.car.CarNotConnectedException; 269 field public static final int CAR_AUDIO_USAGE_ALARM = 6; // 0x6 270 field public static final int CAR_AUDIO_USAGE_DEFAULT = 0; // 0x0 271 field public static final int CAR_AUDIO_USAGE_MUSIC = 1; // 0x1 272 field public static final int CAR_AUDIO_USAGE_NAVIGATION_GUIDANCE = 3; // 0x3 273 field public static final int CAR_AUDIO_USAGE_NOTIFICATION = 7; // 0x7 274 field public static final int CAR_AUDIO_USAGE_RADIO = 2; // 0x2 275 field public static final int CAR_AUDIO_USAGE_SYSTEM_SAFETY_ALERT = 9; // 0x9 276 field public static final int CAR_AUDIO_USAGE_SYSTEM_SOUND = 8; // 0x8 277 field public static final int CAR_AUDIO_USAGE_VOICE_CALL = 4; // 0x4 278 field public static final int CAR_AUDIO_USAGE_VOICE_COMMAND = 5; // 0x5 279 } 280 281} 282 283package android.car.settings { 284 285 public class CarSettings { 286 ctor public CarSettings(); 287 } 288 289 public static final class CarSettings.Global { 290 ctor public CarSettings.Global(); 291 field public static final java.lang.String KEY_GARAGE_MODE_ENABLED = "android.car.GARAGE_MODE_ENABLED"; 292 field public static final java.lang.String KEY_GARAGE_MODE_MAINTENANCE_WINDOW = "android.car.GARAGE_MODE_MAINTENANCE_WINDOW"; 293 field public static final java.lang.String KEY_GARAGE_MODE_WAKE_UP_TIME = "android.car.GARAGE_MODE_WAKE_UP_TIME"; 294 } 295 296} 297 298