AreaIdConfig
public
final
class
AreaIdConfig
extends Object
implements
Parcelable
java.lang.Object | |
↳ | android.car.hardware.property.AreaIdConfig<T> |
Represents area ID specific configuration information for a vehicle property.
Summary
Inherited constants |
---|
Fields | |
---|---|
public
static
final
Creator<AreaIdConfig<Object>> |
CREATOR
|
Public methods | |
---|---|
int
|
describeContents()
|
int
|
getAccess()
Return the access type of the car property at the current areaId. |
int
|
getAreaId()
Returns the area ID for this configuration. |
T
|
getMaxValue()
This method is deprecated.
use |
T
|
getMinValue()
This method is deprecated.
use |
List<T>
|
getSupportedEnumValues()
This method is deprecated.
use |
boolean
|
hasMaxSupportedValue()
Whether [propertyId, areaId] has max supported value specified. |
boolean
|
hasMinSupportedValue()
Whether [propertyId, areaId] has min supported value specified. |
boolean
|
hasSupportedValuesList()
Whether [propertyId, areaId] has supported value list specified. |
boolean
|
isVariableUpdateRateSupported()
Returns whether variable update rate is supported. |
String
|
toString()
|
void
|
writeToParcel(Parcel dest, int flags)
|
Inherited methods | |
---|---|
Fields
Public methods
describeContents
public int describeContents ()
Returns | |
---|---|
int |
getAccess
public int getAccess ()
Return the access type of the car property at the current areaId.
The access type could be one of the following:
CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_NONE
CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_READ
CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_WRITE
CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_READ_WRITE
Returns | |
---|---|
int |
the access type of the car property at the current areaId.
Value is CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_NONE , CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_READ , CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_WRITE , or CarPropertyConfig.VEHICLE_PROPERTY_ACCESS_READ_WRITE |
getAreaId
public int getAreaId ()
Returns the area ID for this configuration.
Returns | |
---|---|
int |
area ID for this configuration. |
getMaxValue
public T getMaxValue ()
This method is deprecated.
use CarPropertyManager.getMinMaxSupportedValue
instead.
Returns the maximum supported value for the getAreaId()
reported by vehicle
hardware at boot time. This value does not change even though the hardware may report a
different value after boot. This value may not represent the currently supported max value.
Use CarPropertyManager.getMinMaxSupportedValue
for more accurate information.
Returns | |
---|---|
T |
maximum value supported for the getAreaId() at boot time. Will return
null if no maximum value supported. |
getMinValue
public T getMinValue ()
This method is deprecated.
use CarPropertyManager.getMinMaxSupportedValue
instead.
Returns the minimum supported value for the getAreaId()
reported by vehicle
hardware at boot time. This value does not change even though the hardware may report a
different value after boot. This value may not represent the currently supported min value.
Use CarPropertyManager.getMinMaxSupportedValue
for more accurate information.
Returns | |
---|---|
T |
minimum value supported for the getAreaId() at boot time. Will return
null if no minimum value supported. |
getSupportedEnumValues
public List<T> getSupportedEnumValues ()
This method is deprecated.
use CarPropertyManager.getSupportedValuesList
instead.
Returns the supported enum values for the getAreaId()
reported by vehicle
hardware at boot time. This list does not change even though the hardware may report a
different list after boot. This list may not represent the currently supported enum values.
Use CarPropertyManager.getSupportedValuesList
for more accurate information.
Returns | |
---|---|
List<T> |
supported enum values for the getAreaId() at boot time. If this list is
empty, no enums are supported for this area at boot time. |
hasMaxSupportedValue
public boolean hasMaxSupportedValue ()
Whether [propertyId, areaId] has max supported value specified.
If this returns true
, it means the hardware specifies a min supported value for
this property. In normal cases, ERROR(CarPropertyManager.getMinMaxSupportedValue()/android.car.hardware.property.CarPropertyManager#getMinMaxSupportedValue() CarPropertyManager.getMinMaxSupportedValue())
will
return a structure whose
MinMaxSupportedValue.getMaxValue()
method returns a non-null
result.
In non-normal (error) cases, MinMaxSupportedValue.getMaxValue()
may still return null
.
If this returns false
,
MinMaxSupportedValue.getMaxValue()
always returns null
.
Unless otherwise specified in ERROR(/VehiclePropertyIds)
documentation, this function
returns false
for any system properties whose type is not int32, int64 or float.
For certain properties, e.g. EV_BRAKE_REGENERATION_LEVEL
, this always return
true
. Check VehiclePropertyIds
documentation for detail.
Returns | |
---|---|
boolean |
hasMinSupportedValue
public boolean hasMinSupportedValue ()
Whether [propertyId, areaId] has min supported value specified.
If this returns true
, it means the hardware specifies a min supported value for
this property. In normal cases, ERROR(CarPropertyManager.getMinMaxSupportedValue()/android.car.hardware.property.CarPropertyManager#getMinMaxSupportedValue() CarPropertyManager.getMinMaxSupportedValue())
will
return a structure whose
MinMaxSupportedValue.getMinValue()
method returns a non-null result.
In non-normal (error) cases, MinMaxSupportedValue.getMinValue()
may still return null
.
If this returns false
,
MinMaxSupportedValue.getMinValue()
always returns null
.
Unless otherwise specified in ERROR(/VehiclePropertyIds)
documentation, this function
returns false
for any system properties whose type is not int32, int64 or float.
For certain properties, e.g. EV_BRAKE_REGENERATION_LEVEL
, this always return
true
. Check VehiclePropertyIds
documentation for detail.
Returns | |
---|---|
boolean |
hasSupportedValuesList
public boolean hasSupportedValuesList ()
Whether [propertyId, areaId] has supported value list specified.
If this returns true
, it means the hardware specifies supported value list for
this property. In normal cases, ERROR(CarPropertyManager.getSupportedValuesList()/android.car.hardware.property.CarPropertyManager#getSupportedValuesList() CarPropertyManager.getSupportedValuesList())
will not
return null
. In non-normal (error) cases, it may return null
.
If this returns false
, ERROR(CarPropertyManager.getSupportedValuesList()/android.car.hardware.property.CarPropertyManager#getSupportedValuesList() CarPropertyManager.getSupportedValuesList())
always
returns null
.
The supported value list is the superset for both the input value for writable property and the output value for readable property.
For certain properties, e.g. GEAR_SELECTION
, this always returns true
.
Check VehiclePropertyIds
documentation for detail.
Returns | |
---|---|
boolean |
isVariableUpdateRateSupported
public boolean isVariableUpdateRateSupported ()
Returns whether variable update rate is supported.
If this returns false
, variable update rate is always disabled for this area ID.
If this returns true
, variable update rate will be disabled if client calls
Subscription.Builder.setVariableUpdateRateEnabled
with false
, or enabled
otherwise.
Returns | |
---|---|
boolean |
whether variable update rate is supported. |
toString
public String toString ()
Returns | |
---|---|
String |
writeToParcel
public void writeToParcel (Parcel dest, int flags)
Parameters | |
---|---|
dest |
Parcel |
flags |
int |