CarPropertyManager.CarPropertyEventCallback
public
static
interface
CarPropertyManager.CarPropertyEventCallback
android.car.hardware.property.CarPropertyManager.CarPropertyEventCallback |
Application registers CarPropertyEventCallback
object to receive updates and changes
to subscribed Vehicle specific properties.
Summary
Public methods | |
---|---|
abstract
void
|
onChangeEvent(CarPropertyValue value)
Called when a property is updated |
default
void
|
onErrorEvent(int propId, int areaId, int errorCode)
Called when an error is detected when setting a property. |
abstract
void
|
onErrorEvent(int propId, int zone)
Called when an error is detected when setting a property. |
Public methods
onChangeEvent
public abstract void onChangeEvent (CarPropertyValue value)
Called when a property is updated
Parameters | |
---|---|
value |
CarPropertyValue : Property that has been updated. |
onErrorEvent
public void onErrorEvent (int propId, int areaId, int errorCode)
Called when an error is detected when setting a property.
Clients which changed the property value in the areaId most recently will receive this callback. If multiple clients set a property for the same area id simultaneously, which one takes precedence is undefined. Typically, the last set operation (in the order that they are issued to car's ECU) overrides the previous set operations. The delivered error reflects the error happened in the last set operation.
Parameters | |
---|---|
propId |
int : Property ID which is detected an error. |
areaId |
int : AreaId which is detected an error. |
errorCode |
int : Error code is raised in the car.
Value is CarPropertyManager.CAR_SET_PROPERTY_ERROR_CODE_TRY_AGAIN , CarPropertyManager.CAR_SET_PROPERTY_ERROR_CODE_INVALID_ARG , CarPropertyManager.CAR_SET_PROPERTY_ERROR_CODE_PROPERTY_NOT_AVAILABLE , CarPropertyManager.CAR_SET_PROPERTY_ERROR_CODE_ACCESS_DENIED , or CarPropertyManager.CAR_SET_PROPERTY_ERROR_CODE_UNKNOWN |
onErrorEvent
public abstract void onErrorEvent (int propId, int zone)
Called when an error is detected when setting a property.
Parameters | |
---|---|
propId |
int : Property ID which is detected an error. |
zone |
int : Zone which is detected an error. |
See also: