Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1af171d7 authored by Yu Shan's avatar Yu Shan Committed by Android (Google) Code Review
Browse files

Merge "Define detailed not available status." into main

parents 24ec653b ecf6999c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -45,4 +45,5 @@ enum StatusCode {
  NOT_AVAILABLE_SPEED_HIGH = 8,
  NOT_AVAILABLE_POOR_VISIBILITY = 9,
  NOT_AVAILABLE_SAFETY = 10,
  NOT_AVAILABLE_SUBSYSTEM_NOT_CONNECTED = 11,
}
+7 −0
Original line number Diff line number Diff line
@@ -36,5 +36,12 @@ package android.hardware.automotive.vehicle;
enum VehiclePropertyStatus {
  AVAILABLE = 0x00,
  UNAVAILABLE = 0x01,
  NOT_AVAILABLE_GENERAL = 0x01,
  ERROR = 0x02,
  NOT_AVAILABLE_DISABLED = (0x1000 | 0x01) /* 4097 */,
  NOT_AVAILABLE_SPEED_LOW = (0x1000 | 0x02) /* 4098 */,
  NOT_AVAILABLE_SPEED_HIGH = (0x1000 | 0x03) /* 4099 */,
  NOT_AVAILABLE_POOR_VISIBILITY = (0x1000 | 0x04) /* 4100 */,
  NOT_AVAILABLE_SAFETY = (0x1000 | 0x05) /* 4101 */,
  NOT_AVAILABLE_SUBSYSTEM_NOT_CONNECTED = (0x1000 | 0x06) /* 4102 */,
}
+7 −0
Original line number Diff line number Diff line
@@ -96,4 +96,11 @@ enum StatusCode {
     * operation such as closing a trunk door, etc.
     */
    NOT_AVAILABLE_SAFETY = 10,
    /**
     * The feature cannot be accessed because the sub-system for the feature is
     * not connected.
     *
     * E.g. trailer light state is not available when the trailer is detached.
     */
    NOT_AVAILABLE_SUBSYSTEM_NOT_CONNECTED = 11,
}
+46 −3
Original line number Diff line number Diff line
@@ -22,8 +22,14 @@ package android.hardware.automotive.vehicle;
@VintfStability
@Backing(type="int")
enum VehiclePropertyStatus {
    /** Property is available and behaving normally */
    /**
     * Property is available and behaving normally
     */
    AVAILABLE = 0x00,
    /**
     * Same as {@link #NOT_AVAILABLE_GENERAL}.
     */
    UNAVAILABLE = 0x01,
    /**
     * A property in this state is not available for reading and writing.  This
     * is a transient state that depends on the availability of the underlying
@@ -34,8 +40,45 @@ enum VehiclePropertyStatus {
     * this state MAY return NOT_AVAILABLE. The HAL implementation MUST ignore
     * the value of the status field when writing a property value coming from
     * Android.
     *
     * This represents a general not-available status. If more detailed info is
     * known, a more specific not-available status should be used instead.
     */
    NOT_AVAILABLE_GENERAL = 0x01,
    /**
     * There is an error with this property.
     */
    UNAVAILABLE = 0x01,
    /** There is an error with this property. */
    ERROR = 0x02,
    // All NOT_AVAILABLE_XXX status starts with 0x1000.
    /**
     * The property is not available because the underlying feature is disabled.
     */
    NOT_AVAILABLE_DISABLED = 0x1000 | 0x01,
    /**
     * The property is not available because the vehicle speed is too low.
     */
    NOT_AVAILABLE_SPEED_LOW = 0x1000 | 0x02,
    /**
     * The property is not available because the vehicle speed is too high.
     */
    NOT_AVAILABLE_SPEED_HIGH = 0x1000 | 0x03,
    /**
     * The property is not available because of bad camera or sensor visibility. Examples
     * might be bird poop blocking the camera or a bumper cover blocking an ultrasonic sensor.
     */
    NOT_AVAILABLE_POOR_VISIBILITY = 0x1000 | 0x04,
    /**
     * The property cannot be accessed due to safety reasons. Eg. System could be
     * in a faulty state, an object or person could be blocking the requested
     * operation such as closing a trunk door, etc.
     */
    NOT_AVAILABLE_SAFETY = 0x1000 | 0x05,
    /**
     * The property is not available because the sub-system for the feature is
     * not connected.
     *
     * E.g. the trailer light property is in this state if the trailer is not
     * attached.
     */
    NOT_AVAILABLE_SUBSYSTEM_NOT_CONNECTED = 0x1000 | 0x06,
}