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<T> value)
Called when a property is updated |
default
void
|
onErrorEvent(int propertyId, int areaId, int errorCode)
Called when an error is detected when setting a property. |
abstract
void
|
onErrorEvent(int propertyId, int areaId)
Called when an error is detected when setting a property. |
Public methods
onChangeEvent
public abstract void onChangeEvent (CarPropertyValue<T> value)
Called when a property is updated
Parameters | |
---|---|
value |
CarPropertyValue : the new value of the property |
onErrorEvent
public void onErrorEvent (int propertyId, 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 | |
---|---|
propertyId |
int : the property ID which is detected an error |
areaId |
int : the area ID which is detected an error |
errorCode |
int : the 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 propertyId, int areaId)
Called when an error is detected when setting a property.
Parameters | |
---|---|
propertyId |
int : the property ID which has detected an error |
areaId |
int : the area ID which has detected an error |
See also: