CarPropertyManager.SetPropertyCallback
public
static
interface
CarPropertyManager.SetPropertyCallback
android.car.hardware.property.CarPropertyManager.SetPropertyCallback |
A callback CarPropertyManager#setPropertiesAsync
when succeeded or failed.
Summary
Public methods | |
---|---|
abstract
void
|
onFailure(CarPropertyManager.PropertyAsyncError propertyAsyncError)
Method called when |
abstract
void
|
onSuccess(CarPropertyManager.SetPropertyResult setPropertyResult)
Method called when the |
Public methods
onFailure
public abstract void onFailure (CarPropertyManager.PropertyAsyncError propertyAsyncError)
Method called when SetPropertyRequest
returns an error.
Parameters | |
---|---|
propertyAsyncError |
CarPropertyManager.PropertyAsyncError |
onSuccess
public abstract void onSuccess (CarPropertyManager.SetPropertyResult setPropertyResult)
Method called when the SetPropertyRequest
successfully set the value.
This means: the set value request is successfully sent to vehicle
and
either the current property value is already the target value, or we have received a property update event indicating the value is updated to the target value.
If multiple clients set a property for the same area ID simultaneously with different values, the order is undefined. One possible case is that both requests are sent to the vehicle bus, which causes two property update events. As a result, the success callback would be called for both clients, but in an undefined order. This means that even if the success callback is called, it doesn't necessarily mean getting the property would return the same value you just set. Another client might have changed the value after you set it.
If only one requests is successfully processed by the vehicle bus, overwriting the
other request, then only one success callback would be called for one client. The other
client would get the failure callback with
CarPropertyManager#STATUS_ERROR_TIMEOUT
error code.
If multiple clients set a property for the same area ID simultaneously with the same value. The success callback for both clients would be called in an undefined order.
Parameters | |
---|---|
setPropertyResult |
CarPropertyManager.SetPropertyResult |