Merge "Add picture and sound profile notification for manage media profile" into main
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/StatusCode.aidl b/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/StatusCode.aidl
index f7e8c5a..8651c30 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/StatusCode.aidl
+++ b/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/StatusCode.aidl
@@ -45,4 +45,5 @@
   NOT_AVAILABLE_SPEED_HIGH = 8,
   NOT_AVAILABLE_POOR_VISIBILITY = 9,
   NOT_AVAILABLE_SAFETY = 10,
+  NOT_AVAILABLE_SUBSYSTEM_NOT_CONNECTED = 11,
 }
diff --git a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/VehiclePropertyStatus.aidl b/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/VehiclePropertyStatus.aidl
index 642ce83..cc88e70 100644
--- a/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/VehiclePropertyStatus.aidl
+++ b/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/current/android/hardware/automotive/vehicle/VehiclePropertyStatus.aidl
@@ -36,5 +36,12 @@
 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 */,
 }
diff --git a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/StatusCode.aidl b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/StatusCode.aidl
index fd4b199..3fb4532 100644
--- a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/StatusCode.aidl
+++ b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/StatusCode.aidl
@@ -96,4 +96,11 @@
      * 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,
 }
diff --git a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehiclePropertyStatus.aidl b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehiclePropertyStatus.aidl
index 400e256..4b1dcdb 100644
--- a/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehiclePropertyStatus.aidl
+++ b/automotive/vehicle/aidl/android/hardware/automotive/vehicle/VehiclePropertyStatus.aidl
@@ -22,9 +22,15 @@
 @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
      * implementation (e.g. hardware or driver). It MUST NOT be used to
@@ -34,8 +40,45 @@
      * 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.
      */
-    UNAVAILABLE = 0x01,
-    /** There is an error with this property. */
+    NOT_AVAILABLE_GENERAL = 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,
 }
diff --git a/nfc/aidl/Android.bp b/nfc/aidl/Android.bp
index b34e4f2..1ffd274 100644
--- a/nfc/aidl/Android.bp
+++ b/nfc/aidl/Android.bp
@@ -33,8 +33,9 @@
             enabled: false,
         },
         java: {
-            sdk_version: "module_current",
             enabled: false,
+            sdk_version: "module_current",
+            min_sdk_version: "35",
         },
         ndk: {
             enabled: true,
@@ -42,6 +43,7 @@
                 "//apex_available:platform",
                 "com.android.nfcservices",
             ],
+            min_sdk_version: "35",
         },
         rust: {
             enabled: true,