CURRENT_GEAR
What it is
Current gear. In non-manual case, selected gear may not match the current gear. For example, if the selected gear is GEAR_DRIVE, the current gear will be one of GEAR_1, GEAR_2 etc, which reflects the actual gear the transmission is currently running in.
{@code VehicleAreaConfig.HasSupportedValueInfo.hasSupportedValuesList} for the global area ID (0) must be {@code true}.
{@code getSupportedValuesList} for [GEAR_SELECTION, areaId=0] must return a {@code SupportedValuesListResult} that contains non-null {@code supportedValuesList}.
The supported values list must represent the list of supported gears for this vehicle. For example, for an automatic transmission, this list can be {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_PARK, GEAR_1, GEAR_2,...} and for manual transmission the list can be {GEAR_NEUTRAL, GEAR_REVERSE, GEAR_1, GEAR_2,...}. This list need not be the same as that of the supported gears reported in GEAR_SELECTION.
For backward compatibility, config array for this property must be a list of values same as the supported values at boot-time.
How the ID is built
A property ID is a 32-bit value packing four fields. Reading 0x11400401 apart:
| Field | Mask | Value | Means |
|---|---|---|---|
| Group | 0xf0000000 | 0x10000000 | SYSTEM |
| Area | 0x0f000000 | 0x01000000 | GLOBAL |
| Type | 0x00ff0000 | 0x00400000 | INT32 |
| Ordinal | 0x0000ffff | 0x00000401 | 0x401 |
Reading it from an app
CarPropertyManager mgr = (CarPropertyManager)
car.getCarManager(Car.PROPERTY_SERVICE);
int value =
mgr.getIntProperty(VehiclePropertyIds.CURRENT_GEAR, 0);This property is read-only — writes are rejected. It fires a callback whenever the value changes.

