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.hardware.cabin; 18 19 import android.annotation.IntDef; 20 import android.annotation.SystemApi; 21 import android.car.Car; 22 import android.car.CarManagerBase; 23 import android.car.CarNotConnectedException; 24 import android.car.hardware.CarPropertyConfig; 25 import android.car.hardware.CarPropertyValue; 26 import android.car.hardware.property.CarPropertyManager; 27 import android.content.Context; 28 import android.os.Handler; 29 import android.os.IBinder; 30 import android.util.ArraySet; 31 32 import java.lang.annotation.Retention; 33 import java.lang.annotation.RetentionPolicy; 34 import java.lang.ref.WeakReference; 35 import java.util.Arrays; 36 import java.util.Collection; 37 import java.util.List; 38 39 /** 40 * API for controlling Cabin system in cars. 41 * Most Car Cabin properties have both a MOVE and POSITION parameter associated with them. 42 * 43 * The MOVE parameter will start moving the device in the indicated direction. Magnitude 44 * indicates relative speed. For instance, setting the WINDOW_MOVE parameter to +1 rolls 45 * the window down. Setting it to +2 (if available) will roll it down faster. 46 * 47 * POSITION parameter will move the device to the desired position. For instance, if the 48 * WINDOW_POS has a range of 0-100, setting this parameter to 50 will open the window 49 * halfway. Depending upon the initial position, the window may move up or down to the 50 * 50% value. 51 * 52 * One or both of the MOVE/POSITION parameters may be implemented depending upon the 53 * capability of the hardware. 54 * @hide 55 */ 56 @SystemApi 57 public final class CarCabinManager implements CarManagerBase { 58 private final static boolean DBG = false; 59 private final static String TAG = "CarCabinManager"; 60 private final CarPropertyManager mCarPropertyMgr; 61 private final ArraySet<CarCabinEventCallback> mCallbacks = new ArraySet<>(); 62 private CarPropertyEventListenerToBase mListenerToBase = null; 63 64 /** Door properties are zoned by VehicleAreaDoor */ 65 /** 66 * door position, int type 67 * Max value indicates fully open, min value (0) indicates fully closed. 68 * 69 * Some vehicles (minivans) can open the door electronically. Hence, the ability 70 * to write this property. 71 */ 72 public static final int ID_DOOR_POS = 0x16400b00; 73 /** door move, int type 74 * Positive values open the door, negative values close it. 75 */ 76 public static final int ID_DOOR_MOVE = 0x16400b01; 77 /** door lock, bool type 78 * 'true' indicates door is locked. 79 */ 80 public static final int ID_DOOR_LOCK = 0x16200b02; 81 82 /** Mirror properties are zoned by VehicleAreaMirror */ 83 /** 84 * mirror z position, int type 85 * Positive value indicates tilt upwards, negative value tilt downwards. 86 */ 87 public static final int ID_MIRROR_Z_POS = 0x14400b40; 88 /** mirror z move, int type 89 * Positive value tilts the mirror upwards, negative value tilts downwards. 90 */ 91 public static final int ID_MIRROR_Z_MOVE = 0x14400b41; 92 /** 93 * mirror y position, int type 94 * Positive value indicates tilt right, negative value tilt left 95 */ 96 public static final int ID_MIRROR_Y_POS = 0x14400b42; 97 /** mirror y move, int type 98 * Positive value tilts the mirror right, negative value tilts left. 99 */ 100 public static final int ID_MIRROR_Y_MOVE = 0x14400b43; 101 /** 102 * mirror lock, bool type 103 * True indicates mirror positions are locked and not changeable. 104 */ 105 public static final int ID_MIRROR_LOCK = 0x11200b44; 106 /** 107 * mirror fold, bool type 108 * True indicates mirrors are folded. 109 */ 110 public static final int ID_MIRROR_FOLD = 0x11200b45; 111 112 /** Seat properties are zoned by VehicleAreaSeat */ 113 /** 114 * seat memory select, int type 115 * This parameter selects the memory preset to use to select the seat position. 116 * The minValue is always 1, and the maxValue determines the number of seat 117 * positions available. 118 * 119 * For instance, if the driver's seat has 3 memory presets, the maxValue will be 3. 120 * When the user wants to select a preset, the desired preset number (1, 2, or 3) 121 * is set. 122 */ 123 public static final int ID_SEAT_MEMORY_SELECT = 0x15400b80; 124 /** 125 * seat memory set, int type 126 * This setting allows the user to save the current seat position settings into 127 * the selected preset slot. The maxValue for each seat position shall match 128 * the maxValue for VEHICLE_PROPERTY_SEAT_MEMORY_SELECT. 129 */ 130 public static final int ID_SEAT_MEMORY_SET = 0x15400b81; 131 /** 132 * seat belt buckled, bool type 133 * True indicates belt is buckled. 134 */ 135 public static final int ID_SEAT_BELT_BUCKLED = 0x15200b82; 136 /** 137 * seat belt height position, int type 138 * Adjusts the shoulder belt anchor point. 139 * Max value indicates highest position. 140 * Min value indicates lowest position. 141 */ 142 public static final int ID_SEAT_BELT_HEIGHT_POS = 0x15400b83; 143 /** seat belt height move, int type 144 * Adjusts the shoulder belt anchor point. 145 * Positive value moves towards highest point. 146 * Negative value moves towards lowest point. 147 */ 148 public static final int ID_SEAT_BELT_HEIGHT_MOVE = 0x15400b84; 149 /** 150 * seat fore/aft position, int type 151 * Sets the seat position forward (closer to steering wheel) and backwards. 152 * Max value indicates closest to wheel, min value indicates most rearward position. 153 */ 154 public static final int ID_SEAT_FORE_AFT_POS = 0x15400b85; 155 /** 156 * seat fore/aft move, int type 157 * Positive value moves seat forward (closer to steering wheel). 158 * Negative value moves seat rearward. 159 */ 160 public static final int ID_SEAT_FORE_AFT_MOVE = 0x15400b86; 161 /** 162 * seat backrest angle #1 position, int type 163 * Backrest angle 1 is the actuator closest to the bottom of the seat. 164 * Max value indicates angling forward towards the steering wheel. 165 * Min value indicates full recline. 166 */ 167 public static final int ID_SEAT_BACKREST_ANGLE_1_POS = 0x15400b87; 168 /** seat backrest angle #1 move, int type 169 * Backrest angle 1 is the actuator closest to the bottom of the seat. 170 * Positive value angles seat towards the steering wheel. 171 * Negatie value angles away from steering wheel. 172 */ 173 public static final int ID_SEAT_BACKREST_ANGLE_1_MOVE = 0x15400b88; 174 /** 175 * seat backrest angle #2 position, int type 176 * Backrest angle 2 is the next actuator up from the bottom of the seat. 177 * Max value indicates angling forward towards the steering wheel. 178 * Min value indicates full recline. 179 */ 180 public static final int ID_SEAT_BACKREST_ANGLE_2_POS = 0x15400b89; 181 /** seat backrest angle #2 move, int type 182 * Backrest angle 2 is the next actuator up from the bottom of the seat. 183 * Positive value tilts forward towards the steering wheel. 184 * Negative value tilts backwards. 185 */ 186 public static final int ID_SEAT_BACKREST_ANGLE_2_MOVE = 0x15400b8a; 187 /** 188 * seat height position, int type 189 * Sets the seat height. 190 * Max value indicates highest position. 191 * Min value indicates lowest position. 192 */ 193 public static final int ID_SEAT_HEIGHT_POS = 0x15400b8b; 194 /** seat height move, int type 195 * Sets the seat height. 196 * Positive value raises the seat. 197 * Negative value lowers the seat. 198 * */ 199 public static final int ID_SEAT_HEIGHT_MOVE = 0x15400b8c; 200 /** 201 * seat depth position, int type 202 * Sets the seat depth, distance from back rest to front edge of seat. 203 * Max value indicates longest depth position. 204 * Min value indicates shortest position. 205 */ 206 public static final int ID_SEAT_DEPTH_POS = 0x15400b8d; 207 /** seat depth move, int type 208 * Adjusts the seat depth, distance from back rest to front edge of seat. 209 * Positive value increases the distance from back rest to front edge of seat. 210 * Negative value decreases this distance. 211 */ 212 public static final int ID_SEAT_DEPTH_MOVE = 0x15400b8e; 213 /** 214 * seat tilt position, int type 215 * Sets the seat tilt. 216 * Max value indicates front edge of seat higher than back edge. 217 * Min value indicates front edge of seat lower than back edge. 218 */ 219 public static final int ID_SEAT_TILT_POS = 0x15400b8f; 220 /** seat tilt move, int type 221 * Adjusts the seat tilt. 222 * Positive value lifts front edge of seat higher than back edge. 223 * Negative value lowers front edge of seat in relation to back edge. 224 */ 225 public static final int ID_SEAT_TILT_MOVE = 0x15400b90; 226 /** 227 * seat lumbar fore/aft position, int type 228 * Pushes the lumbar support forward and backwards. 229 * Max value indicates most forward position. 230 * Min value indicates most rearward position. 231 */ 232 public static final int ID_SEAT_LUMBAR_FORE_AFT_POS = 0x15400b91; 233 /** seat lumbar fore/aft move, int type 234 * Adjusts the lumbar support forwards and backwards. 235 * Positive value moves lumbar support forward. 236 * Negative value moves lumbar support rearward. 237 */ 238 public static final int ID_SEAT_LUMBAR_FORE_AFT_MOVE = 0x15400b92; 239 /** 240 * seat lumbar side support position, int type 241 * Sets the amount of lateral lumbar support. 242 * Max value indicates widest lumbar setting (i.e. least support) 243 * Min value indicates thinnest lumbar setting. 244 */ 245 public static final int ID_SEAT_LUMBAR_SIDE_SUPPORT_POS = 0x15400b93; 246 /** seat lumbar side support move, int type 247 * Adjusts the amount of lateral lumbar support. 248 * Positive value widens the lumbar area. 249 * Negative value makes the lumbar area thinner. 250 */ 251 public static final int ID_SEAT_LUMBAR_SIDE_SUPPORT_MOVE = 0x15400b94; 252 /** 253 * seat headrest height position, int type 254 * Sets the headrest height. 255 * Max value indicates tallest setting. 256 * Min value indicates shortest setting. 257 */ 258 public static final int ID_SEAT_HEADREST_HEIGHT_POS = 0x15400b95; 259 /** seat headrest height move, int type 260 * Postive value moves the headrest higher. 261 * Negative value moves the headrest lower. 262 */ 263 public static final int ID_SEAT_HEADREST_HEIGHT_MOVE = 0x15400b96; 264 /** 265 * seat headrest angle position, int type 266 * Sets the angle of the headrest. 267 * Max value indicates most upright angle. 268 * Min value indicates shallowest headrest angle. 269 */ 270 public static final int ID_SEAT_HEADREST_ANGLE_POS = 0x15400b97; 271 /** seat headrest angle move, int type 272 * Adjusts the angle of the headrest. 273 * Positive value angles headrest towards most upright angle. 274 * Negative value angles headrest towards shallowest headrest angle. 275 */ 276 public static final int ID_SEAT_HEADREST_ANGLE_MOVE = 0x15400b98; 277 /** 278 * seat headrest fore/aft position, int type 279 * Sets the headrest forwards and backwards. 280 * Max value indicates position closest to front of car. 281 * Min value indicates position closest to rear of car. 282 */ 283 public static final int ID_SEAT_HEADREST_FORE_AFT_POS = 0x15400b99; 284 /** seat headrest fore/aft move, int type 285 * Adjsuts the headrest forwards and backwards. 286 * Positive value moves the headrest closer to front of car. 287 * Negative value moves the headrest closer to rear of car. 288 */ 289 public static final int ID_SEAT_HEADREST_FORE_AFT_MOVE = 0x15400b9a; 290 291 /** Window properties are zoned by VehicleAreaWindow */ 292 /** 293 * window position, int type 294 * Max = window down / open. 295 * Min = window up / closed. 296 */ 297 public static final int ID_WINDOW_POS = 0x13400bc0; 298 /** window move, int type 299 * Positive value moves window down / opens window. 300 * Negative value moves window up / closes window. 301 */ 302 public static final int ID_WINDOW_MOVE = 0x13400bc1; 303 /** 304 * window lock, bool type 305 * True indicates windows are locked and can't be moved. 306 */ 307 public static final int ID_WINDOW_LOCK = 0x13400bc4; 308 309 /** @hide */ 310 @IntDef({ 311 ID_DOOR_POS, 312 ID_DOOR_MOVE, 313 ID_DOOR_LOCK, 314 ID_MIRROR_Z_POS, 315 ID_MIRROR_Z_MOVE, 316 ID_MIRROR_Y_POS, 317 ID_MIRROR_Y_MOVE, 318 ID_MIRROR_LOCK, 319 ID_MIRROR_FOLD, 320 ID_SEAT_MEMORY_SELECT, 321 ID_SEAT_MEMORY_SET, 322 ID_SEAT_BELT_BUCKLED, 323 ID_SEAT_BELT_HEIGHT_POS, 324 ID_SEAT_BELT_HEIGHT_MOVE, 325 ID_SEAT_FORE_AFT_POS, 326 ID_SEAT_FORE_AFT_MOVE, 327 ID_SEAT_BACKREST_ANGLE_1_POS, 328 ID_SEAT_BACKREST_ANGLE_1_MOVE, 329 ID_SEAT_BACKREST_ANGLE_2_POS, 330 ID_SEAT_BACKREST_ANGLE_2_MOVE, 331 ID_SEAT_HEIGHT_POS, 332 ID_SEAT_HEIGHT_MOVE, 333 ID_SEAT_DEPTH_POS, 334 ID_SEAT_DEPTH_MOVE, 335 ID_SEAT_TILT_POS, 336 ID_SEAT_TILT_MOVE, 337 ID_SEAT_LUMBAR_FORE_AFT_POS, 338 ID_SEAT_LUMBAR_FORE_AFT_MOVE, 339 ID_SEAT_LUMBAR_SIDE_SUPPORT_POS, 340 ID_SEAT_LUMBAR_SIDE_SUPPORT_MOVE, 341 ID_SEAT_HEADREST_HEIGHT_POS, 342 ID_SEAT_HEADREST_HEIGHT_MOVE, 343 ID_SEAT_HEADREST_ANGLE_POS, 344 ID_SEAT_HEADREST_ANGLE_MOVE, 345 ID_SEAT_HEADREST_FORE_AFT_POS, 346 ID_SEAT_HEADREST_FORE_AFT_MOVE, 347 ID_WINDOW_POS, 348 ID_WINDOW_MOVE, 349 ID_WINDOW_LOCK 350 }) 351 @Retention(RetentionPolicy.SOURCE) 352 public @interface PropertyId {} 353 private final ArraySet<Integer> mCabinPropertyIds = new ArraySet<>(Arrays.asList(new Integer[]{ 354 ID_DOOR_POS, 355 ID_DOOR_MOVE, 356 ID_DOOR_LOCK, 357 ID_MIRROR_Z_POS, 358 ID_MIRROR_Z_MOVE, 359 ID_MIRROR_Y_POS, 360 ID_MIRROR_Y_MOVE, 361 ID_MIRROR_LOCK, 362 ID_MIRROR_FOLD, 363 ID_SEAT_MEMORY_SELECT, 364 ID_SEAT_MEMORY_SET, 365 ID_SEAT_BELT_BUCKLED, 366 ID_SEAT_BELT_HEIGHT_POS, 367 ID_SEAT_BELT_HEIGHT_MOVE, 368 ID_SEAT_FORE_AFT_POS, 369 ID_SEAT_FORE_AFT_MOVE, 370 ID_SEAT_BACKREST_ANGLE_1_POS, 371 ID_SEAT_BACKREST_ANGLE_1_MOVE, 372 ID_SEAT_BACKREST_ANGLE_2_POS, 373 ID_SEAT_BACKREST_ANGLE_2_MOVE, 374 ID_SEAT_HEIGHT_POS, 375 ID_SEAT_HEIGHT_MOVE, 376 ID_SEAT_DEPTH_POS, 377 ID_SEAT_DEPTH_MOVE, 378 ID_SEAT_TILT_POS, 379 ID_SEAT_TILT_MOVE, 380 ID_SEAT_LUMBAR_FORE_AFT_POS, 381 ID_SEAT_LUMBAR_FORE_AFT_MOVE, 382 ID_SEAT_LUMBAR_SIDE_SUPPORT_POS, 383 ID_SEAT_LUMBAR_SIDE_SUPPORT_MOVE, 384 ID_SEAT_HEADREST_HEIGHT_POS, 385 ID_SEAT_HEADREST_HEIGHT_MOVE, 386 ID_SEAT_HEADREST_ANGLE_POS, 387 ID_SEAT_HEADREST_ANGLE_MOVE, 388 ID_SEAT_HEADREST_FORE_AFT_POS, 389 ID_SEAT_HEADREST_FORE_AFT_MOVE, 390 ID_WINDOW_POS, 391 ID_WINDOW_MOVE, 392 ID_WINDOW_LOCK 393 })); 394 395 /** 396 * Application registers CarCabinEventCallback object to receive updates and changes to 397 * subscribed Car Cabin properties. 398 */ 399 public interface CarCabinEventCallback { 400 /** 401 * Called when a property is updated 402 * @param value Property that has been updated. 403 */ onChangeEvent(CarPropertyValue value)404 void onChangeEvent(CarPropertyValue value); 405 406 /** 407 * Called when an error is detected with a property 408 * @param propertyId 409 * @param zone 410 */ onErrorEvent(@ropertyId int propertyId, int zone)411 void onErrorEvent(@PropertyId int propertyId, int zone); 412 } 413 414 private static class CarPropertyEventListenerToBase implements 415 CarPropertyManager.CarPropertyEventListener{ 416 private final WeakReference<CarCabinManager> mManager; 417 CarPropertyEventListenerToBase(CarCabinManager manager)418 public CarPropertyEventListenerToBase(CarCabinManager manager) { 419 mManager = new WeakReference<>(manager); 420 } 421 422 @Override onChangeEvent(CarPropertyValue value)423 public void onChangeEvent(CarPropertyValue value) { 424 CarCabinManager manager = mManager.get(); 425 if (manager != null) { 426 manager.handleOnChangeEvent(value); 427 } 428 } 429 430 @Override onErrorEvent(int propertyId, int zone)431 public void onErrorEvent(int propertyId, int zone) { 432 CarCabinManager manager = mManager.get(); 433 if (manager != null) { 434 manager.handleOnErrorEvent(propertyId, zone); 435 } 436 } 437 } 438 handleOnChangeEvent(CarPropertyValue value)439 private void handleOnChangeEvent(CarPropertyValue value) { 440 Collection<CarCabinEventCallback> callbacks; 441 synchronized (this) { 442 callbacks = new ArraySet<>(mCallbacks); 443 } 444 for (CarCabinEventCallback l: callbacks) { 445 l.onChangeEvent(value); 446 } 447 } 448 handleOnErrorEvent(int propertyId, int zone)449 private void handleOnErrorEvent(int propertyId, int zone) { 450 Collection<CarCabinEventCallback> listeners; 451 synchronized (this) { 452 listeners = new ArraySet<>(mCallbacks); 453 } 454 if (!listeners.isEmpty()) { 455 for (CarCabinEventCallback l: listeners) { 456 l.onErrorEvent(propertyId, zone); 457 } 458 } 459 } 460 461 /** 462 * Get an instance of CarCabinManager 463 * 464 * Should not be obtained directly by clients, use {@link Car#getCarManager(String)} instead. 465 * @param service 466 * @param context 467 * @param handler 468 * @hide 469 */ CarCabinManager(IBinder service, Context context, Handler handler)470 public CarCabinManager(IBinder service, Context context, Handler handler) { 471 mCarPropertyMgr = new CarPropertyManager(service, handler, DBG, TAG); 472 } 473 474 /** 475 * All properties in CarCabinManager are zoned. 476 * @param propertyId 477 * @return true if property is a zoned type 478 */ isZonedProperty(@ropertyId int propertyId)479 public static boolean isZonedProperty(@PropertyId int propertyId) { 480 return true; 481 } 482 483 /** 484 * Implement wrappers for contained CarPropertyManagerBase object 485 * @param callback 486 * @throws CarNotConnectedException 487 */ registerCallback(CarCabinEventCallback callback)488 public synchronized void registerCallback(CarCabinEventCallback callback) throws 489 CarNotConnectedException { 490 if (mCallbacks.isEmpty()) { 491 mListenerToBase = new CarPropertyEventListenerToBase(this); 492 } 493 List<CarPropertyConfig> configs = getPropertyList(); 494 for (CarPropertyConfig c : configs) { 495 // Register each individual propertyId 496 mCarPropertyMgr.registerListener(mListenerToBase, c.getPropertyId(), 0); 497 } 498 mCallbacks.add(callback); 499 500 501 } 502 503 /** 504 * Stop getting property updates for the given callback. If there are multiple registrations for 505 * this listener, all listening will be stopped. 506 * @param callback 507 */ unregisterCallback(CarCabinEventCallback callback)508 public synchronized void unregisterCallback(CarCabinEventCallback callback) 509 throws CarNotConnectedException { 510 mCallbacks.remove(callback); 511 List<CarPropertyConfig> configs = getPropertyList(); 512 for (CarPropertyConfig c : configs) { 513 // Register each individual propertyId 514 mCarPropertyMgr.unregisterListener(mListenerToBase, c.getPropertyId()); 515 } 516 if (mCallbacks.isEmpty()) { 517 mListenerToBase = null; 518 } 519 } 520 521 /** 522 * Get list of properties represented by CarCabinManager for this car. 523 * @return List of CarPropertyConfig objects available via Car Cabin Manager. 524 * @throws CarNotConnectedException if the connection to the car service has been lost. 525 */ getPropertyList()526 public List<CarPropertyConfig> getPropertyList() throws CarNotConnectedException { 527 return mCarPropertyMgr.getPropertyList(mCabinPropertyIds); 528 } 529 530 /** 531 * Get value of boolean property 532 * @param propertyId 533 * @param area 534 * @return value of requested boolean property 535 * @throws CarNotConnectedException 536 */ getBooleanProperty(@ropertyId int propertyId, int area)537 public boolean getBooleanProperty(@PropertyId int propertyId, int area) 538 throws CarNotConnectedException { 539 return mCarPropertyMgr.getBooleanProperty(propertyId, area); 540 } 541 542 /** 543 * Get value of float property 544 * @param propertyId 545 * @param area 546 * @return value of requested float property 547 * @throws CarNotConnectedException 548 */ getFloatProperty(@ropertyId int propertyId, int area)549 public float getFloatProperty(@PropertyId int propertyId, int area) 550 throws CarNotConnectedException { 551 return mCarPropertyMgr.getFloatProperty(propertyId, area); 552 } 553 554 /** 555 * Get value of integer property 556 * @param propertyId 557 * @param area 558 * @return value of requested integer property 559 * @throws CarNotConnectedException 560 */ getIntProperty(@ropertyId int propertyId, int area)561 public int getIntProperty(@PropertyId int propertyId, int area) 562 throws CarNotConnectedException { 563 return mCarPropertyMgr.getIntProperty(propertyId, area); 564 } 565 566 /** 567 * Set the value of a boolean property 568 * @param propertyId 569 * @param area 570 * @param val 571 * @throws CarNotConnectedException 572 */ setBooleanProperty(@ropertyId int propertyId, int area, boolean val)573 public void setBooleanProperty(@PropertyId int propertyId, int area, boolean val) 574 throws CarNotConnectedException { 575 if (mCabinPropertyIds.contains(propertyId)) { 576 mCarPropertyMgr.setBooleanProperty(propertyId, area, val); 577 } 578 } 579 580 /** 581 * Set the value of a float property 582 * @param propertyId 583 * @param area 584 * @param val 585 * @throws CarNotConnectedException 586 */ setFloatProperty(@ropertyId int propertyId, int area, float val)587 public void setFloatProperty(@PropertyId int propertyId, int area, float val) 588 throws CarNotConnectedException { 589 if (mCabinPropertyIds.contains(propertyId)) { 590 mCarPropertyMgr.setFloatProperty(propertyId, area, val); 591 } 592 } 593 594 /** 595 * Set the value of an integer property 596 * @param propertyId 597 * @param area 598 * @param val 599 * @throws CarNotConnectedException 600 */ setIntProperty(@ropertyId int propertyId, int area, int val)601 public void setIntProperty(@PropertyId int propertyId, int area, int val) 602 throws CarNotConnectedException { 603 if (mCabinPropertyIds.contains(propertyId)) { 604 mCarPropertyMgr.setIntProperty(propertyId, area, val); 605 } 606 } 607 608 /** @hide */ 609 @Override onCarDisconnected()610 public void onCarDisconnected() { 611 mCarPropertyMgr.onCarDisconnected(); 612 } 613 } 614