Merge "Skip OUTPUT_INSUFFICIENT_SIZE test for zero-sized output."
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 1af439a..edde1cb 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -72,3 +72,11 @@
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.cas@1.0*)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.cas@1.0*)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/vintf/manifest/android.hardware.cas@1.0*)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/init/android.hardware.configstore@1.2-service.rc)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/bin/hw/android.hardware.configstore@1.2-service)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/etc/seccomp_policy/configstore.policy)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/apex/com.android.media.swcodec/lib64/android.hardware.configstore@1.2.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/vndk-Q/android.hardware.configstore@1.2.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib64/android.hardware.configstore@1.2.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/vndk-Q/android.hardware.configstore@1.2.so)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/android.hardware.configstore@1.2.so)
diff --git a/atrace/1.0/Android.bp b/atrace/1.0/Android.bp
index f7c9078..4d73cfd 100644
--- a/atrace/1.0/Android.bp
+++ b/atrace/1.0/Android.bp
@@ -13,10 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Status",
-        "TracingCategory",
-    ],
     gen_java: true,
 }
 
diff --git a/audio/2.0/Android.bp b/audio/2.0/Android.bp
index d6e481f..3495b1a 100644
--- a/audio/2.0/Android.bp
+++ b/audio/2.0/Android.bp
@@ -21,16 +21,6 @@
         "android.hardware.audio.effect@2.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "AudioDrain",
-        "DeviceAddress",
-        "MessageQueueFlagBits",
-        "MmapBufferInfo",
-        "MmapPosition",
-        "ParameterValue",
-        "Result",
-        "TimeSpec",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/audio/4.0/Android.bp b/audio/4.0/Android.bp
index 6e217d9..b97fe01 100644
--- a/audio/4.0/Android.bp
+++ b/audio/4.0/Android.bp
@@ -21,27 +21,6 @@
         "android.hardware.audio.effect@4.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "AudioDrain",
-        "AudioFrequencyResponsePoint",
-        "AudioMicrophoneChannelMapping",
-        "AudioMicrophoneCoordinate",
-        "AudioMicrophoneDirectionality",
-        "AudioMicrophoneLocation",
-        "DeviceAddress",
-        "MessageQueueFlagBits",
-        "MicrophoneInfo",
-        "MmapBufferFlag",
-        "MmapBufferInfo",
-        "MmapPosition",
-        "ParameterValue",
-        "PlaybackTrackMetadata",
-        "RecordTrackMetadata",
-        "Result",
-        "SinkMetadata",
-        "SourceMetadata",
-        "TimeSpec",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/audio/5.0/Android.bp b/audio/5.0/Android.bp
index 7c2db1d..f6ac2eb 100644
--- a/audio/5.0/Android.bp
+++ b/audio/5.0/Android.bp
@@ -22,23 +22,6 @@
         "android.hidl.base@1.0",
         "android.hidl.safe_union@1.0",
     ],
-    types: [
-        "AudioDrain",
-        "AudioFrequencyResponsePoint",
-        "AudioMicrophoneChannelMapping",
-        "AudioMicrophoneCoordinate",
-        "AudioMicrophoneDirectionality",
-        "AudioMicrophoneLocation",
-        "MessageQueueFlagBits",
-        "MicrophoneDirection",
-        "MicrophoneInfo",
-        "MmapBufferFlag",
-        "MmapBufferInfo",
-        "MmapPosition",
-        "ParameterValue",
-        "Result",
-        "TimeSpec",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/audio/5.0/config/audio_policy_configuration.xsd b/audio/5.0/config/audio_policy_configuration.xsd
index ee3a437..c580b25 100644
--- a/audio/5.0/config/audio_policy_configuration.xsd
+++ b/audio/5.0/config/audio_policy_configuration.xsd
@@ -42,7 +42,7 @@
                 <xs:element name="globalConfiguration" type="globalConfiguration"/>
                 <xs:element name="modules" type="modules" maxOccurs="unbounded"/>
                 <xs:element name="volumes" type="volumes" maxOccurs="unbounded"/>
-                <xs:element name="surroundSound" type="surroundSound" />
+                <xs:element name="surroundSound" type="surroundSound" minOccurs="0" />
             </xs:sequence>
             <xs:attribute name="version" type="version"/>
         </xs:complexType>
diff --git a/audio/common/2.0/Android.bp b/audio/common/2.0/Android.bp
index 878b594..a64548f 100644
--- a/audio/common/2.0/Android.bp
+++ b/audio/common/2.0/Android.bp
@@ -9,39 +9,6 @@
     srcs: [
         "types.hal",
     ],
-    types: [
-        "AudioChannelMask",
-        "AudioConfig",
-        "AudioDevice",
-        "AudioFormat",
-        "AudioGain",
-        "AudioGainConfig",
-        "AudioGainMode",
-        "AudioHandleConsts",
-        "AudioInputFlag",
-        "AudioInterleave",
-        "AudioMixLatencyClass",
-        "AudioMode",
-        "AudioOffloadInfo",
-        "AudioOutputFlag",
-        "AudioPort",
-        "AudioPortConfig",
-        "AudioPortConfigDeviceExt",
-        "AudioPortConfigMask",
-        "AudioPortConfigSessionExt",
-        "AudioPortDeviceExt",
-        "AudioPortMixExt",
-        "AudioPortRole",
-        "AudioPortSessionExt",
-        "AudioPortType",
-        "AudioSessionConsts",
-        "AudioSource",
-        "AudioStreamType",
-        "AudioUsage",
-        "FixedChannelCount",
-        "ThreadInfo",
-        "Uuid",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/audio/common/4.0/Android.bp b/audio/common/4.0/Android.bp
index 9b737dc..cd504e5 100644
--- a/audio/common/4.0/Android.bp
+++ b/audio/common/4.0/Android.bp
@@ -9,39 +9,6 @@
     srcs: [
         "types.hal",
     ],
-    types: [
-        "AudioChannelMask",
-        "AudioConfig",
-        "AudioContentType",
-        "AudioDevice",
-        "AudioFormat",
-        "AudioGain",
-        "AudioGainConfig",
-        "AudioGainMode",
-        "AudioHandleConsts",
-        "AudioInputFlag",
-        "AudioMixLatencyClass",
-        "AudioMode",
-        "AudioOffloadInfo",
-        "AudioOutputFlag",
-        "AudioPort",
-        "AudioPortConfig",
-        "AudioPortConfigDeviceExt",
-        "AudioPortConfigMask",
-        "AudioPortConfigSessionExt",
-        "AudioPortDeviceExt",
-        "AudioPortMixExt",
-        "AudioPortRole",
-        "AudioPortSessionExt",
-        "AudioPortType",
-        "AudioSessionConsts",
-        "AudioSource",
-        "AudioStreamType",
-        "AudioUsage",
-        "FixedChannelCount",
-        "ThreadInfo",
-        "Uuid",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/audio/common/5.0/Android.bp b/audio/common/5.0/Android.bp
index 86d9354..66c6fe8 100644
--- a/audio/common/5.0/Android.bp
+++ b/audio/common/5.0/Android.bp
@@ -12,44 +12,6 @@
     interfaces: [
         "android.hidl.safe_union@1.0",
     ],
-    types: [
-        "AudioChannelMask",
-        "AudioConfig",
-        "AudioContentType",
-        "AudioDevice",
-        "AudioFormat",
-        "AudioGain",
-        "AudioGainConfig",
-        "AudioGainMode",
-        "AudioHandleConsts",
-        "AudioInputFlag",
-        "AudioMixLatencyClass",
-        "AudioMode",
-        "AudioOffloadInfo",
-        "AudioOutputFlag",
-        "AudioPort",
-        "AudioPortConfig",
-        "AudioPortConfigDeviceExt",
-        "AudioPortConfigMask",
-        "AudioPortConfigSessionExt",
-        "AudioPortDeviceExt",
-        "AudioPortMixExt",
-        "AudioPortRole",
-        "AudioPortSessionExt",
-        "AudioPortType",
-        "AudioSessionConsts",
-        "AudioSource",
-        "AudioStreamType",
-        "AudioUsage",
-        "DeviceAddress",
-        "FixedChannelCount",
-        "PlaybackTrackMetadata",
-        "RecordTrackMetadata",
-        "SinkMetadata",
-        "SourceMetadata",
-        "ThreadInfo",
-        "Uuid",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/audio/common/5.0/types.hal b/audio/common/5.0/types.hal
index 8f8a888..0a8d75b 100644
--- a/audio/common/5.0/types.hal
+++ b/audio/common/5.0/types.hal
@@ -416,9 +416,9 @@
     OUT_2POINT1POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
                          OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT |
                          OUT_LOW_FREQUENCY),
-    OUT_3POINT0POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_CENTER | OUT_FRONT_RIGHT |
+    OUT_3POINT0POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER |
                          OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT),
-    OUT_3POINT1POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_CENTER | OUT_FRONT_RIGHT |
+    OUT_3POINT1POINT2 = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER |
                         OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT |
                         OUT_LOW_FREQUENCY),
     OUT_QUAD     = (OUT_FRONT_LEFT | OUT_FRONT_RIGHT |
@@ -517,7 +517,23 @@
     INDEX_MASK_5 = INDEX_HDR | ((1 << 5) - 1),
     INDEX_MASK_6 = INDEX_HDR | ((1 << 6) - 1),
     INDEX_MASK_7 = INDEX_HDR | ((1 << 7) - 1),
-    INDEX_MASK_8 = INDEX_HDR | ((1 << 8) - 1)
+    INDEX_MASK_8 = INDEX_HDR | ((1 << 8) - 1),
+    INDEX_MASK_9 = INDEX_HDR | ((1 << 9) - 1),
+    INDEX_MASK_10 = INDEX_HDR | ((1 << 10) - 1),
+    INDEX_MASK_11 = INDEX_HDR | ((1 << 11) - 1),
+    INDEX_MASK_12 = INDEX_HDR | ((1 << 12) - 1),
+    INDEX_MASK_13 = INDEX_HDR | ((1 << 13) - 1),
+    INDEX_MASK_14 = INDEX_HDR | ((1 << 14) - 1),
+    INDEX_MASK_15 = INDEX_HDR | ((1 << 15) - 1),
+    INDEX_MASK_16 = INDEX_HDR | ((1 << 16) - 1),
+    INDEX_MASK_17 = INDEX_HDR | ((1 << 17) - 1),
+    INDEX_MASK_18 = INDEX_HDR | ((1 << 18) - 1),
+    INDEX_MASK_19 = INDEX_HDR | ((1 << 19) - 1),
+    INDEX_MASK_20 = INDEX_HDR | ((1 << 20) - 1),
+    INDEX_MASK_21 = INDEX_HDR | ((1 << 21) - 1),
+    INDEX_MASK_22 = INDEX_HDR | ((1 << 22) - 1),
+    INDEX_MASK_23 = INDEX_HDR | ((1 << 23) - 1),
+    INDEX_MASK_24 = INDEX_HDR | ((1 << 24) - 1),
 };
 
 /**
diff --git a/audio/effect/2.0/Android.bp b/audio/effect/2.0/Android.bp
index c4f8b06..2dd1a0c 100644
--- a/audio/effect/2.0/Android.bp
+++ b/audio/effect/2.0/Android.bp
@@ -27,20 +27,6 @@
         "android.hardware.audio.common@2.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "AudioBuffer",
-        "EffectAuxChannelsConfig",
-        "EffectBufferAccess",
-        "EffectBufferConfig",
-        "EffectConfig",
-        "EffectConfigParameters",
-        "EffectDescriptor",
-        "EffectFeature",
-        "EffectFlags",
-        "EffectOffloadParameter",
-        "MessageQueueFlagBits",
-        "Result",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/audio/effect/4.0/Android.bp b/audio/effect/4.0/Android.bp
index e7676a9..2c32bcb 100644
--- a/audio/effect/4.0/Android.bp
+++ b/audio/effect/4.0/Android.bp
@@ -27,20 +27,6 @@
         "android.hardware.audio.common@4.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "AudioBuffer",
-        "EffectAuxChannelsConfig",
-        "EffectBufferAccess",
-        "EffectBufferConfig",
-        "EffectConfig",
-        "EffectConfigParameters",
-        "EffectDescriptor",
-        "EffectFeature",
-        "EffectFlags",
-        "EffectOffloadParameter",
-        "MessageQueueFlagBits",
-        "Result",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/audio/effect/5.0/Android.bp b/audio/effect/5.0/Android.bp
index 78b950e..32fe652 100644
--- a/audio/effect/5.0/Android.bp
+++ b/audio/effect/5.0/Android.bp
@@ -28,20 +28,6 @@
         "android.hidl.base@1.0",
         "android.hidl.safe_union@1.0",
     ],
-    types: [
-        "AudioBuffer",
-        "EffectAuxChannelsConfig",
-        "EffectBufferAccess",
-        "EffectBufferConfig",
-        "EffectConfig",
-        "EffectConfigParameters",
-        "EffectDescriptor",
-        "EffectFeature",
-        "EffectFlags",
-        "EffectOffloadParameter",
-        "MessageQueueFlagBits",
-        "Result",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/automotive/audiocontrol/1.0/Android.bp b/automotive/audiocontrol/1.0/Android.bp
index 9335a6c..7c51cf7 100644
--- a/automotive/audiocontrol/1.0/Android.bp
+++ b/automotive/audiocontrol/1.0/Android.bp
@@ -13,9 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "ContextNumber",
-    ],
     gen_java: true,
 }
 
diff --git a/automotive/evs/1.0/Android.bp b/automotive/evs/1.0/Android.bp
index f620eb5..3ac67ea 100644
--- a/automotive/evs/1.0/Android.bp
+++ b/automotive/evs/1.0/Android.bp
@@ -16,13 +16,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "BufferDesc",
-        "CameraDesc",
-        "DisplayDesc",
-        "DisplayState",
-        "EvsResult",
-    ],
     gen_java: true,
 }
 
diff --git a/automotive/vehicle/2.0/Android.bp b/automotive/vehicle/2.0/Android.bp
index f64028c..4163879 100644
--- a/automotive/vehicle/2.0/Android.bp
+++ b/automotive/vehicle/2.0/Android.bp
@@ -14,61 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "DiagnosticFloatSensorIndex",
-        "DiagnosticIntegerSensorIndex",
-        "EvConnectorType",
-        "FuelType",
-        "Obd2CommonIgnitionMonitors",
-        "Obd2CompressionIgnitionMonitors",
-        "Obd2FuelSystemStatus",
-        "Obd2FuelType",
-        "Obd2IgnitionMonitorKind",
-        "Obd2SecondaryAirStatus",
-        "Obd2SparkIgnitionMonitors",
-        "PortLocationType",
-        "StatusCode",
-        "SubscribeFlags",
-        "SubscribeOptions",
-        "VehicleApPowerStateConfigFlag",
-        "VehicleApPowerStateReport",
-        "VehicleApPowerStateReq",
-        "VehicleApPowerStateReqIndex",
-        "VehicleApPowerStateShutdownParam",
-        "VehicleArea",
-        "VehicleAreaConfig",
-        "VehicleAreaDoor",
-        "VehicleAreaMirror",
-        "VehicleAreaSeat",
-        "VehicleAreaWheel",
-        "VehicleAreaWindow",
-        "VehicleDisplay",
-        "VehicleGear",
-        "VehicleHvacFanDirection",
-        "VehicleHwKeyInputAction",
-        "VehicleIgnitionState",
-        "VehicleLightState",
-        "VehicleLightSwitch",
-        "VehicleOilLevel",
-        "VehiclePropConfig",
-        "VehiclePropValue",
-        "VehicleProperty",
-        "VehiclePropertyAccess",
-        "VehiclePropertyChangeMode",
-        "VehiclePropertyGroup",
-        "VehiclePropertyStatus",
-        "VehiclePropertyType",
-        "VehicleTurnSignal",
-        "VehicleUnit",
-        "VmsAvailabilityStateIntegerValuesIndex",
-        "VmsBaseMessageIntegerValuesIndex",
-        "VmsMessageType",
-        "VmsMessageWithLayerAndPublisherIdIntegerValuesIndex",
-        "VmsMessageWithLayerIntegerValuesIndex",
-        "VmsOfferingMessageIntegerValuesIndex",
-        "VmsPublisherInformationIntegerValuesIndex",
-        "VmsSubscriptionsStateIntegerValuesIndex",
-    ],
     gen_java: true,
 }
 
diff --git a/automotive/vehicle/2.0/types.hal b/automotive/vehicle/2.0/types.hal
index 3efaaec..435e19c 100644
--- a/automotive/vehicle/2.0/types.hal
+++ b/automotive/vehicle/2.0/types.hal
@@ -989,6 +989,7 @@
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:READ_WRITE
+     * @data_enum VehicleUnit
      */
     HVAC_TEMPERATURE_DISPLAY_UNITS = (
         0x050E
@@ -2433,7 +2434,7 @@
     ERROR = 4,
 };
 
-enum VehicleApPowerStateConfigFlag : int32_t /* NOTE: type is guessed */ {
+enum VehicleApPowerStateConfigFlag : int32_t {
     /**
      * AP can enter deep sleep state. If not set, AP will always shutdown from
      * VehicleApPowerState#SHUTDOWN_PREPARE power state.
diff --git a/biometrics/face/1.0/Android.bp b/biometrics/face/1.0/Android.bp
index 0f8c6e6..222a09e 100644
--- a/biometrics/face/1.0/Android.bp
+++ b/biometrics/face/1.0/Android.bp
@@ -14,15 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "FaceAcquiredInfo",
-        "FaceError",
-        "Feature",
-        "OptionalBool",
-        "OptionalUint64",
-        "Status",
-        "UserHandle",
-    ],
     gen_java: true,
 }
 
diff --git a/biometrics/face/1.0/IBiometricsFace.hal b/biometrics/face/1.0/IBiometricsFace.hal
index 0499c5d..cd368fa 100644
--- a/biometrics/face/1.0/IBiometricsFace.hal
+++ b/biometrics/face/1.0/IBiometricsFace.hal
@@ -53,6 +53,10 @@
      * returning to the idle state. Calling this method with the same userId
      * should have no effect on the state machine.
      *
+     * Note that onLockoutChanged() MUST be invoked by the implementation in
+     * response to a user change in order to update the framework with the
+     * timeout of the new user (or 0 if the user is not locked out).
+     *
      * @param userId A non-negative user identifier that must be unique and
      *     persistent for a given user.
      * @param storePath filesystem path to the template storage directory.
@@ -61,19 +65,22 @@
     setActiveUser(int32_t userId, string storePath) generates (Status status);
 
     /**
-     * Begins a secure transaction request, e.g. enrollment.
+     * Begins a secure transaction request, e.g. enroll() or resetLockout().
      *
      * Generates a unique and cryptographically secure random token used to
      * indicate the start of a secure transaction. generateChallenge() and
-     * revokeChallenge() specify a pin/pattern/password cleared time window where
-     * the secure transaction is allowed.
+     * revokeChallenge() specify a window where the resulting HAT that is
+     * generated in response to checking the user's PIN/pattern/password
+     * can be used to verify/perform a secure transaction.
      *
-     * generateChallenge() generates a challenge which must then be wrapped by the
+     * generateChallenge() generates a challenge which must then be wrapped by
      * gatekeeper after verifying a successful strong authentication attempt,
      * which generates a Hardware Authentication Token. The challenge prevents
-     * spoofing and replay attacks and ensures that we only update a user’s face
-     * template if the operation was preceded by some kind of strong credential
-     * confirmation (e.g. device password).
+     * spoofing and replay attacks and ensures that only a transaction backed
+     * by a user authentication (PIN/pattern/password) can proceed.
+     *
+     * The implementation should be tolerant of revokeChallenge() being invoked
+     * after timeout has expired.
      *
      * @param challengeTimeoutSec A timeout in seconds, after which the driver
      *     must invalidate the challenge. This is to prevent bugs or crashes in
@@ -81,35 +88,35 @@
      * @return result, with its "value" parameter representing a "challenge": a
      *     unique and cryptographically secure random token.
      */
-    @callflow(next={"enroll", "revokeChallenge", "setFeatureDisabled"})
+    @callflow(next={"enroll", "revokeChallenge", "setFeature"})
     generateChallenge(uint32_t challengeTimeoutSec)
         generates (OptionalUint64 result);
 
     /**
      * Enrolls a user's face.
      *
-     * Note that this interface permits implementations where multiple faces can
-     * be enrolled for a single user. However, allowing multiple faces to be
-     * enrolled can be a severe security vulnerability and hence, most
-     * implementations must ensure that only a single face be enrolled at a
-     * given time. Multi-enrollment must only be used where there is a clear
-     * necessity for a shared use case, e.g. TVs or cars.
-     *
-     * Note that the Hardware Authentication Token must still be valid after
-     * this call, and must be explicitly invalidated by a call to
-     * revokeChallenge(). This allows clients to immediately reattempt
-     * enrollment (for example, if a user wasn’t satisfied with their enrollment)
-     * without having to go through another strong authentication flow.
+     * Note that the Hardware Authentication Token must be valid for the
+     * duration of enrollment and thus should be explicitly invalidated by a
+     * call to revokeChallenge() when enrollment is complete, to reduce the
+     * window of opportunity to re-use the challenge and HAT. For example,
+     * Settings calls generateChallenge() once to allow the user to enroll one
+     * or more faces or toggle secure settings without having to re-enter the
+     * PIN/pattern/password. Once the user completes the operation, Settings
+     * invokes revokeChallenge() to close the transaction. If the HAT is expired,
+     * the implementation must invoke onError with UNABLE_TO_PROCESS.
      *
      * This method triggers the IBiometricsFaceClientCallback#onEnrollResult()
      * method.
      *
      * @param hat A valid Hardware Authentication Token, generated as a result
      *     of a generateChallenge() challenge being wrapped by the gatekeeper
-     *     after a sucessful strong authentication request.
-     * @param timeoutSec A timeout in seconds, after which this enrollment
-     *     attempt is cancelled. Note that the client still needs to
-     *     call revokeChallenge() to terminate the enrollment session.
+     *     after a successful strong authentication request.
+     * @param timeoutSec A timeout in seconds, after which this enroll
+     *     attempt is cancelled. Note that the framework can continue
+     *     enrollment by calling this again with a valid HAT. This timeout is
+     *     expected to be used to limit power usage if the device becomes idle
+     *     during enrollment. The implementation is expected to send
+     *     ERROR_TIMEOUT if this happens.
      * @param disabledFeatures A list of features to be disabled during
      *     enrollment. Note that all features are enabled by default.
      * @return status The status of this method call.
@@ -122,8 +129,8 @@
      * Finishes the secure transaction by invalidating the challenge generated
      * by generateChallenge().
      *
-     * Clients must call this method once enrollment is complete, and the user's
-     * face template no longer needs to be updated.
+     * Clients must call this method once the secure transaction (e.g. enroll
+     * or setFeature) is completed. See generateChallenge().
      *
      * @return status The status of this method call.
      */
@@ -131,33 +138,43 @@
     revokeChallenge() generates (Status status);
 
     /**
-     * Requires all subsequent enroll/authenticate calls to use the feature.
-     * This method does not affect enroll, which has its own feature list.
-     *
      * Changes the state of previous enrollment setting. Because this may
      * decrease security, the user must enter their password before this method
      * is invoked (see @param HAT). The driver must verify the HAT before
-     * changing any feature state.
+     * changing any feature state. This method must return ILLEGAL_ARGUMENT if
+     * the HAT or faceId is invalid. This must only be invoked after
+     * setActiveUser() is called.
+     *
      * Note: In some cases it may not be possible to change the state of this
      * flag without re-enrolling. For example, if the user didn't provide
      * attention during the original enrollment. This flag reflects the same
      * persistent state as the one passed to enroll().
      *
+     * Note: This call may block for a short amount of time (few hundred
+     * milliseconds). Clients are expected to invoke this asynchronously if it
+     * takes much longer than the above limit. Also note that the result is
+     * returned solely through Status (and not onError).
+     *
      * @param feature The feature to be enabled or disabled.
      * @param enabled True to enable the feature, false to disable.
      * @param hat A valid Hardware Authentication Token, generated as a result
      *     of getChallenge().
+     * @param faceId the ID of the enrollment returned by enroll() for the
+     *     feature to update.
      * @return status The status of this method call.
      */
-    setFeature(Feature feature, bool enabled, vec<uint8_t> hat)
+    setFeature(Feature feature, bool enabled, vec<uint8_t> hat, uint32_t faceId)
         generates(Status status);
 
     /**
-     * Retrieves the current state of the feature.
+     * Retrieves the current state of the feature. If the faceId is invalid,
+     * the implementation must return ILLEGAL_ARGUMENT.
      *
-     * @return enabled True if the feature is enabled, false if disabled.
+     * @param faceId the ID of the enrollment returned by enroll().
+     * @return result with the value set to true if the feature is enabled,
+     *     false if disabled.
      */
-    getFeature(Feature feature) generates (bool enabled);
+    getFeature(Feature feature, uint32_t faceId) generates (OptionalBool result);
 
     /**
      * Returns an identifier associated with the current face set.
@@ -176,7 +193,7 @@
     getAuthenticatorId() generates (OptionalUint64 result);
 
     /**
-     * Cancels a pending enrollment or authentication request.
+     * Cancels the current enroll, authenticate, remove, or enumerate operation.
      *
      * @return status The status of this method call.
      */
@@ -241,8 +258,12 @@
     /**
      * Reset lockout for the current user.
      *
+     * Note: This call may block for a short amount of time (few hundred
+     * milliseconds). Clients are expected to invoke this asynchronously if it
+     * takes much longer than the above limit.
+     *
      * @param hat A valid Hardware Authentication Token, generated when the
-     *     user authenticates with Pin/Pattern/Pass. When the Hardware
+     *     user authenticates with PIN/pattern/pass. When the Hardware
      *     Authentication Token is verified, lockout must be reset and
      *     onLockoutChanged must be called with duration 0.
      * @return status The status of this method call.
diff --git a/biometrics/face/1.0/IBiometricsFaceClientCallback.hal b/biometrics/face/1.0/IBiometricsFaceClientCallback.hal
index c9dd0e2..969bc68 100644
--- a/biometrics/face/1.0/IBiometricsFaceClientCallback.hal
+++ b/biometrics/face/1.0/IBiometricsFaceClientCallback.hal
@@ -39,7 +39,7 @@
      * A callback invoked when a face has been successfully authenticated.
      *
      * @param deviceId A unique id associated with the HAL implementation
-     *     service that processed this autentication attempt.
+     *     service that processed this authentication attempt.
      * @param faceId The id of the face template that passed the authentication
      *     challenge.
      * @param userId The active user id for the authenticated face.
diff --git a/biometrics/face/1.0/types.hal b/biometrics/face/1.0/types.hal
index b5db966..8c4a4e9 100644
--- a/biometrics/face/1.0/types.hal
+++ b/biometrics/face/1.0/types.hal
@@ -82,13 +82,14 @@
 enum FaceError : int32_t {
 
     /**
-     * A hardware error has occured that cannot be resolved. Try again later.
+     * A hardware error has occurred that cannot be resolved. Try again later.
      */
     HW_UNAVAILABLE = 1,
 
     /**
-     * The current enroll or authenticate operation could not be completed;
-     * the sensor was unable to process the current image.
+     * The current enroll or authenticate operation could not be completed,
+     * e.g. the sensor was unable to process the current image or the HAT was
+     * invalid.
      */
     UNABLE_TO_PROCESS = 2,
 
@@ -97,6 +98,11 @@
      * prevent programs from blocking the face HAL indefinitely. The timeout is
      * framework and sensor-specific, but is generally on the order of 30
      * seconds.
+
+     * The timeout is a device-specific time meant to optimize power. For
+     * example after 30 seconds of searching for a face it can be use to
+     * indicate that the implementation is no longer looking and the framework
+     * should restart the operation on the next user interaction.
      */
     TIMEOUT = 3,
 
@@ -108,8 +114,8 @@
 
     /**
      * The current operation has been cancelled. This may happen if a new
-     * request (authenticate, remove) is initiated while an on-going operation
-     * is in progress, or if cancel() was called.
+     * request (authenticate, remove, enumerate, enroll) is initiated while
+     * an on-going operation is in progress, or if cancel() was called.
      */
     CANCELED = 5,
 
@@ -357,7 +363,7 @@
 
 /**
  * Result structure with an addition bool field. See documentation in
- * getRequireAttention() for usage of the value.
+ * getFeature() for usage of the value.
  */
 struct OptionalBool {
     /**
diff --git a/configstore/1.2/vts/functional/Android.bp b/biometrics/face/1.0/vts/functional/Android.bp
similarity index 66%
rename from configstore/1.2/vts/functional/Android.bp
rename to biometrics/face/1.0/vts/functional/Android.bp
index 5f1eca6..fa68c4e 100644
--- a/configstore/1.2/vts/functional/Android.bp
+++ b/biometrics/face/1.0/vts/functional/Android.bp
@@ -1,5 +1,5 @@
 //
-// Copyright (C) 2018 The Android Open Source Project
+// Copyright (C) 2019 The Android Open Source Project
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
@@ -15,13 +15,10 @@
 //
 
 cc_test {
-    name: "VtsHalConfigstoreV1_2TargetTest",
+    name: "VtsHalBiometricsFaceV1_0TargetTest",
     defaults: ["VtsHalTargetTestDefaults"],
-    srcs: ["VtsHalConfigstoreV1_2TargetTest.cpp"],
-    static_libs: [
-        "android.hardware.configstore@1.0",
-        "android.hardware.configstore@1.1",
-        "android.hardware.configstore@1.2",
-    ],
+    srcs: ["VtsHalBiometricsFaceV1_0TargetTest.cpp"],
+    static_libs: ["android.hardware.biometrics.face@1.0"],
+    test_suites: ["general-tests"],
 }
 
diff --git a/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp b/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp
new file mode 100644
index 0000000..795a1ae
--- /dev/null
+++ b/biometrics/face/1.0/vts/functional/VtsHalBiometricsFaceV1_0TargetTest.cpp
@@ -0,0 +1,439 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "face_hidl_test"
+
+#include <VtsHalHidlTargetTestBase.h>
+#include <VtsHalHidlTargetTestEnvBase.h>
+#include <android-base/logging.h>
+#include <android-base/properties.h>
+#include <android/hardware/biometrics/face/1.0/IBiometricsFace.h>
+#include <android/hardware/biometrics/face/1.0/IBiometricsFaceClientCallback.h>
+#include <hidl/HidlSupport.h>
+#include <hidl/HidlTransportSupport.h>
+#include <utils/Condition.h>
+
+#include <cinttypes>
+#include <cstdint>
+#include <future>
+#include <utility>
+
+using android::Condition;
+using android::Mutex;
+using android::sp;
+using android::base::GetUintProperty;
+using android::hardware::hidl_vec;
+using android::hardware::Return;
+using android::hardware::biometrics::face::V1_0::FaceAcquiredInfo;
+using android::hardware::biometrics::face::V1_0::FaceError;
+using android::hardware::biometrics::face::V1_0::Feature;
+using android::hardware::biometrics::face::V1_0::IBiometricsFace;
+using android::hardware::biometrics::face::V1_0::IBiometricsFaceClientCallback;
+using android::hardware::biometrics::face::V1_0::OptionalBool;
+using android::hardware::biometrics::face::V1_0::OptionalUint64;
+using android::hardware::biometrics::face::V1_0::Status;
+
+namespace {
+
+const uint32_t kTimeout = 3;
+const std::chrono::seconds kTimeoutInSeconds = std::chrono::seconds(kTimeout);
+const uint32_t kUserId = 99;
+const uint32_t kFaceId = 5;
+const char kTmpDir[] = "/data/system/users/0/facedata";
+const int kIterations = 1000;
+
+const auto kAssertCallbackIsSet = [](const OptionalUint64& res) {
+    ASSERT_EQ(Status::OK, res.status);
+    // Makes sure the "deviceId" represented by "res.value" is not 0.
+    // 0 would mean the HIDL is not available.
+    ASSERT_NE(0UL, res.value);
+};
+
+// Wait for a callback to occur (signaled by the given future) up to the
+// provided timeout. If the future is invalid or the callback does not come
+// within the given time, returns false.
+template <class ReturnType>
+bool waitForCallback(std::future<ReturnType> future,
+                     std::chrono::milliseconds timeout = kTimeoutInSeconds) {
+    auto expiration = std::chrono::system_clock::now() + timeout;
+    EXPECT_TRUE(future.valid());
+    if (future.valid()) {
+        std::future_status status = future.wait_until(expiration);
+        EXPECT_NE(std::future_status::timeout, status) << "Timed out waiting for callback";
+        if (status == std::future_status::ready) {
+            return true;
+        }
+    }
+    return false;
+}
+
+// Base callback implementation that just logs all callbacks by default
+class FaceCallbackBase : public IBiometricsFaceClientCallback {
+  public:
+    Return<void> onEnrollResult(uint64_t, uint32_t, int32_t, uint32_t) override {
+        ALOGD("Enroll callback called.");
+        return Return<void>();
+    }
+
+    Return<void> onAuthenticated(uint64_t, uint32_t, int32_t, const hidl_vec<uint8_t>&) override {
+        ALOGD("Authenticated callback called.");
+        return Return<void>();
+    }
+
+    Return<void> onAcquired(uint64_t, int32_t, FaceAcquiredInfo, int32_t) override {
+        ALOGD("Acquired callback called.");
+        return Return<void>();
+    }
+
+    Return<void> onError(uint64_t, int32_t, FaceError, int32_t) override {
+        ALOGD("Error callback called.");
+        EXPECT_TRUE(false);  // fail any test that triggers an error
+        return Return<void>();
+    }
+
+    Return<void> onRemoved(uint64_t, uint32_t, int32_t, uint32_t) override {
+        ALOGD("Removed callback called.");
+        return Return<void>();
+    }
+
+    Return<void> onEnumerate(uint64_t, const hidl_vec<uint32_t>&, int32_t /* userId */) override {
+        ALOGD("Enumerate callback called.");
+        return Return<void>();
+    }
+
+    Return<void> onLockoutChanged(uint64_t) override {
+        ALOGD("LockoutChanged callback called.");
+        return Return<void>();
+    }
+};
+
+class EnumerateCallback : public FaceCallbackBase {
+  public:
+    Return<void> onEnumerate(uint64_t, const hidl_vec<uint32_t>&, int32_t) override {
+        promise.set_value();
+        return Return<void>();
+    }
+
+    std::promise<void> promise;
+};
+
+class ErrorCallback : public FaceCallbackBase {
+  public:
+    ErrorCallback(bool filterErrors = false, FaceError errorType = FaceError::HW_UNAVAILABLE)
+        : filterErrors(filterErrors), errorType(errorType), hasError(false) {}
+
+    Return<void> onError(uint64_t, int32_t, FaceError error, int32_t) override {
+        if ((filterErrors && errorType == error) || !filterErrors) {
+            hasError = true;
+            this->error = error;
+            promise.set_value();
+        }
+        return Return<void>();
+    }
+
+    bool filterErrors;
+    FaceError errorType;
+    bool hasError;
+    FaceError error;
+    std::promise<void> promise;
+};
+
+class RemoveCallback : public FaceCallbackBase {
+  public:
+    explicit RemoveCallback(int32_t userId) : removeUserId(userId) {}
+
+    Return<void> onRemoved(uint64_t, uint32_t, int32_t userId, uint32_t remaining) override {
+        EXPECT_EQ(removeUserId, userId);
+        promise.set_value();
+        if (remaining == 0UL) {
+            promise.set_value();
+        }
+        return Return<void>();
+    }
+
+    int32_t removeUserId;
+    std::promise<void> promise;
+};
+
+class LockoutChangedCallback : public FaceCallbackBase {
+  public:
+    Return<void> onLockoutChanged(uint64_t duration) override {
+        this->hasDuration = true;
+        this->duration = duration;
+        promise.set_value();
+        return Return<void>();
+    }
+    bool hasDuration;
+    uint64_t duration;
+    std::promise<void> promise;
+};
+
+// Test environment for Face HIDL HAL.
+class FaceHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
+  public:
+    // get the test environment singleton
+    static FaceHidlEnvironment* Instance() {
+        static FaceHidlEnvironment* instance = new FaceHidlEnvironment;
+        return instance;
+    }
+
+    void registerTestServices() override { registerTestService<IBiometricsFace>(); }
+};
+
+class FaceHidlTest : public ::testing::VtsHalHidlTargetTestBase {
+  public:
+    void SetUp() override {
+        mService = ::testing::VtsHalHidlTargetTestBase::getService<IBiometricsFace>(
+                FaceHidlEnvironment::Instance()->getServiceName<IBiometricsFace>());
+        ASSERT_FALSE(mService == nullptr);
+        Return<Status> res = mService->setActiveUser(kUserId, kTmpDir);
+        ASSERT_EQ(Status::OK, static_cast<Status>(res));
+    }
+
+    void TearDown() override {}
+
+    sp<IBiometricsFace> mService;
+};
+
+// The service should be reachable.
+TEST_F(FaceHidlTest, ConnectTest) {
+    sp<FaceCallbackBase> cb = new FaceCallbackBase();
+    mService->setCallback(cb, kAssertCallbackIsSet);
+}
+
+// Starting the service with null callback should succeed.
+TEST_F(FaceHidlTest, ConnectNullTest) {
+    mService->setCallback(nullptr, kAssertCallbackIsSet);
+}
+
+// generateChallenge should always return a unique, cryptographically secure,
+// non-zero number.
+TEST_F(FaceHidlTest, GenerateChallengeTest) {
+    std::map<uint64_t, int> m;
+    for (int i = 0; i < kIterations; ++i) {
+        mService->generateChallenge(kTimeout, [&m](const OptionalUint64& res) {
+            ASSERT_EQ(Status::OK, res.status);
+            EXPECT_NE(0UL, res.value);
+            m[res.value]++;
+            EXPECT_EQ(1UL, m[res.value]);
+        });
+    }
+}
+
+// enroll with an invalid (all zeroes) HAT should fail.
+TEST_F(FaceHidlTest, EnrollZeroHatTest) {
+    sp<ErrorCallback> cb = new ErrorCallback();
+    mService->setCallback(cb, kAssertCallbackIsSet);
+
+    hidl_vec<uint8_t> token(69);
+    for (size_t i = 0; i < 69; i++) {
+        token[i] = 0;
+    }
+
+    Return<Status> res = mService->enroll(token, kTimeout, {});
+    ASSERT_EQ(Status::OK, static_cast<Status>(res));
+
+    // At least one call to onError should occur
+    ASSERT_TRUE(waitForCallback(cb->promise.get_future()));
+    ASSERT_TRUE(cb->hasError);
+}
+
+// enroll with an invalid HAT should fail.
+TEST_F(FaceHidlTest, EnrollGarbageHatTest) {
+    sp<ErrorCallback> cb = new ErrorCallback();
+    mService->setCallback(cb, kAssertCallbackIsSet);
+
+    // Filling HAT with invalid data
+    hidl_vec<uint8_t> token(69);
+    for (size_t i = 0; i < 69; ++i) {
+        token[i] = i;
+    }
+
+    Return<Status> res = mService->enroll(token, kTimeout, {});
+    ASSERT_EQ(Status::OK, static_cast<Status>(res));
+
+    // At least one call to onError should occur
+    ASSERT_TRUE(waitForCallback(cb->promise.get_future()));
+    ASSERT_TRUE(cb->hasError);
+}
+
+// setFeature with an invalid (all zeros) HAT should fail.
+TEST_F(FaceHidlTest, SetFeatureZeroHatTest) {
+    sp<ErrorCallback> cb = new ErrorCallback();
+    mService->setCallback(cb, kAssertCallbackIsSet);
+
+    hidl_vec<uint8_t> token(69);
+    for (size_t i = 0; i < 69; i++) {
+        token[i] = 0;
+    }
+
+    Return<Status> res = mService->setFeature(Feature::REQUIRE_DIVERSITY, false, token, 0);
+    ASSERT_EQ(Status::ILLEGAL_ARGUMENT, static_cast<Status>(res));
+}
+
+// setFeature with an invalid HAT should fail.
+TEST_F(FaceHidlTest, SetFeatureGarbageHatTest) {
+    sp<ErrorCallback> cb = new ErrorCallback();
+    mService->setCallback(cb, kAssertCallbackIsSet);
+
+    // Filling HAT with invalid data
+    hidl_vec<uint8_t> token(69);
+    for (size_t i = 0; i < 69; ++i) {
+        token[i] = i;
+    }
+
+    Return<Status> res = mService->setFeature(Feature::REQUIRE_DIVERSITY, false, token, 0);
+    ASSERT_EQ(Status::ILLEGAL_ARGUMENT, static_cast<Status>(res));
+}
+
+void assertGetFeatureFails(sp<IBiometricsFace> service, int faceId, Feature feature) {
+    std::promise<void> promise;
+
+    // Features cannot be retrieved for invalid faces.
+    Return<void> res = service->getFeature(feature, faceId, [&promise](const OptionalBool& result) {
+        ASSERT_EQ(Status::ILLEGAL_ARGUMENT, result.status);
+        promise.set_value();
+    });
+    ASSERT_TRUE(waitForCallback(promise.get_future()));
+}
+
+TEST_F(FaceHidlTest, GetFeatureRequireAttentionTest) {
+    assertGetFeatureFails(mService, 0 /* faceId */, Feature::REQUIRE_ATTENTION);
+}
+
+TEST_F(FaceHidlTest, GetFeatureRequireDiversityTest) {
+    assertGetFeatureFails(mService, 0 /* faceId */, Feature::REQUIRE_DIVERSITY);
+}
+
+// revokeChallenge should always return within the timeout
+TEST_F(FaceHidlTest, RevokeChallengeTest) {
+    sp<FaceCallbackBase> cb = new FaceCallbackBase();
+    mService->setCallback(cb, kAssertCallbackIsSet);
+
+    auto start = std::chrono::system_clock::now();
+    mService->revokeChallenge();
+    auto elapsed = std::chrono::system_clock::now() - start;
+    ASSERT_GE(kTimeoutInSeconds, elapsed);
+}
+
+// The call to getAuthenticatorId should succeed.
+TEST_F(FaceHidlTest, GetAuthenticatorIdTest) {
+    mService->getAuthenticatorId(
+            [](const OptionalUint64& res) { ASSERT_EQ(Status::OK, res.status); });
+}
+
+// The call to enumerate should succeed.
+TEST_F(FaceHidlTest, EnumerateTest) {
+    sp<EnumerateCallback> cb = new EnumerateCallback();
+    mService->setCallback(cb, kAssertCallbackIsSet);
+    Return<Status> res = mService->enumerate();
+    ASSERT_EQ(Status::OK, static_cast<Status>(res));
+    ASSERT_TRUE(waitForCallback(cb->promise.get_future()));
+}
+
+// The call to remove should succeed for any faceId
+TEST_F(FaceHidlTest, RemoveFaceTest) {
+    sp<ErrorCallback> cb = new ErrorCallback();
+    mService->setCallback(cb, kAssertCallbackIsSet);
+
+    // Remove a face
+    Return<Status> res = mService->remove(kFaceId);
+    ASSERT_EQ(Status::OK, static_cast<Status>(res));
+}
+
+// Remove should accept 0 to delete all faces
+TEST_F(FaceHidlTest, RemoveAllFacesTest) {
+    sp<ErrorCallback> cb = new ErrorCallback();
+    mService->setCallback(cb, kAssertCallbackIsSet);
+
+    // Remove all faces
+    Return<Status> res = mService->remove(0);
+    ASSERT_EQ(Status::OK, static_cast<Status>(res));
+}
+
+// Active user should successfully set to a writable location.
+TEST_F(FaceHidlTest, SetActiveUserTest) {
+    // Create an active user
+    Return<Status> res = mService->setActiveUser(2, kTmpDir);
+    ASSERT_EQ(Status::OK, static_cast<Status>(res));
+
+    // Reset active user
+    res = mService->setActiveUser(kUserId, kTmpDir);
+    ASSERT_EQ(Status::OK, static_cast<Status>(res));
+}
+
+// Active user should fail to set to an unwritable location.
+TEST_F(FaceHidlTest, SetActiveUserUnwritableTest) {
+    // Create an active user to an unwritable location (device root dir)
+    Return<Status> res = mService->setActiveUser(3, "/");
+    ASSERT_NE(Status::OK, static_cast<Status>(res));
+
+    // Reset active user
+    res = mService->setActiveUser(kUserId, kTmpDir);
+    ASSERT_EQ(Status::OK, static_cast<Status>(res));
+}
+
+// Active user should fail to set to a null location.
+TEST_F(FaceHidlTest, SetActiveUserNullTest) {
+    // Create an active user to a null location.
+    Return<Status> res = mService->setActiveUser(4, nullptr);
+    ASSERT_NE(Status::OK, static_cast<Status>(res));
+
+    // Reset active user
+    res = mService->setActiveUser(kUserId, kTmpDir);
+    ASSERT_EQ(Status::OK, static_cast<Status>(res));
+}
+
+// Cancel should always return CANCELED from any starting state including
+// the IDLE state.
+TEST_F(FaceHidlTest, CancelTest) {
+    sp<ErrorCallback> cb = new ErrorCallback(true, FaceError::CANCELED);
+    mService->setCallback(cb, kAssertCallbackIsSet);
+
+    Return<Status> res = mService->cancel();
+    // check that we were able to make an IPC request successfully
+    ASSERT_EQ(Status::OK, static_cast<Status>(res));
+
+    // make sure callback was invoked within kTimeoutInSeconds
+    ASSERT_TRUE(waitForCallback(cb->promise.get_future()));
+    // check error should be CANCELED
+    ASSERT_EQ(FaceError::CANCELED, cb->error);
+}
+
+TEST_F(FaceHidlTest, OnLockoutChangedTest) {
+    sp<LockoutChangedCallback> cb = new LockoutChangedCallback();
+    mService->setCallback(cb, kAssertCallbackIsSet);
+
+    // Update active user and ensure lockout duration 0 is received
+    mService->setActiveUser(5, kTmpDir);
+
+    // Make sure callback was invoked
+    ASSERT_TRUE(waitForCallback(cb->promise.get_future()));
+
+    // Check that duration 0 was received
+    ASSERT_EQ(0, cb->duration);
+}
+
+}  // anonymous namespace
+
+int main(int argc, char** argv) {
+    ::testing::AddGlobalTestEnvironment(FaceHidlEnvironment::Instance());
+    ::testing::InitGoogleTest(&argc, argv);
+    FaceHidlEnvironment::Instance()->init(&argc, argv);
+    int status = RUN_ALL_TESTS();
+    LOG(INFO) << "Test result = " << status;
+    return status;
+}
diff --git a/biometrics/fingerprint/2.1/Android.bp b/biometrics/fingerprint/2.1/Android.bp
index dbcce92..cff43c4 100644
--- a/biometrics/fingerprint/2.1/Android.bp
+++ b/biometrics/fingerprint/2.1/Android.bp
@@ -14,17 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "FingerprintAcquired",
-        "FingerprintAcquiredInfo",
-        "FingerprintAuthenticated",
-        "FingerprintEnroll",
-        "FingerprintError",
-        "FingerprintFingerId",
-        "FingerprintIterator",
-        "FingerprintMsgType",
-        "RequestStatus",
-    ],
     gen_java: true,
 }
 
diff --git a/bluetooth/1.0/Android.bp b/bluetooth/1.0/Android.bp
index 49df8a3..67f1a4f 100644
--- a/bluetooth/1.0/Android.bp
+++ b/bluetooth/1.0/Android.bp
@@ -14,9 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Status",
-    ],
     gen_java: true,
 }
 
diff --git a/bluetooth/a2dp/1.0/Android.bp b/bluetooth/a2dp/1.0/Android.bp
index 5e85290..fa46a1c 100644
--- a/bluetooth/a2dp/1.0/Android.bp
+++ b/bluetooth/a2dp/1.0/Android.bp
@@ -14,14 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "BitsPerSample",
-        "ChannelMode",
-        "CodecConfiguration",
-        "CodecType",
-        "SampleRate",
-        "Status",
-    ],
     gen_java: false,
 }
 
diff --git a/bluetooth/audio/2.0/Android.bp b/bluetooth/audio/2.0/Android.bp
index e72b6ab..a020f22 100644
--- a/bluetooth/audio/2.0/Android.bp
+++ b/bluetooth/audio/2.0/Android.bp
@@ -17,32 +17,6 @@
         "android.hidl.base@1.0",
         "android.hidl.safe_union@1.0",
     ],
-    types: [
-        "AacObjectType",
-        "AacParameters",
-        "AacVariableBitRate",
-        "AptxParameters",
-        "AudioCapabilities",
-        "AudioConfiguration",
-        "BitsPerSample",
-        "ChannelMode",
-        "CodecCapabilities",
-        "CodecConfiguration",
-        "CodecType",
-        "LdacChannelMode",
-        "LdacParameters",
-        "LdacQualityIndex",
-        "PcmParameters",
-        "SampleRate",
-        "SbcAllocMethod",
-        "SbcBlockLength",
-        "SbcChannelMode",
-        "SbcNumSubbands",
-        "SbcParameters",
-        "SessionType",
-        "Status",
-        "TimeSpec",
-    ],
     gen_java: false,
 }
 
diff --git a/boot/1.0/Android.bp b/boot/1.0/Android.bp
index 85c3b61..b580cac 100644
--- a/boot/1.0/Android.bp
+++ b/boot/1.0/Android.bp
@@ -13,10 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "BoolResult",
-        "CommandResult",
-    ],
     gen_java: true,
 }
 
diff --git a/broadcastradio/1.0/Android.bp b/broadcastradio/1.0/Android.bp
index ecfecc4..76e580e 100644
--- a/broadcastradio/1.0/Android.bp
+++ b/broadcastradio/1.0/Android.bp
@@ -16,23 +16,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "AmBandConfig",
-        "Band",
-        "BandConfig",
-        "Class",
-        "Deemphasis",
-        "Direction",
-        "FmBandConfig",
-        "MetaData",
-        "MetaDataClock",
-        "MetadataKey",
-        "MetadataType",
-        "ProgramInfo",
-        "Properties",
-        "Rds",
-        "Result",
-    ],
     gen_java: false,
 }
 
diff --git a/broadcastradio/1.1/Android.bp b/broadcastradio/1.1/Android.bp
index 1d59105..2186b9a 100644
--- a/broadcastradio/1.1/Android.bp
+++ b/broadcastradio/1.1/Android.bp
@@ -17,18 +17,6 @@
         "android.hardware.broadcastradio@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "IdentifierType",
-        "Modulation",
-        "ProgramIdentifier",
-        "ProgramInfo",
-        "ProgramInfoFlags",
-        "ProgramListResult",
-        "ProgramSelector",
-        "ProgramType",
-        "Properties",
-        "VendorKeyValue",
-    ],
     gen_java: false,
 }
 
diff --git a/broadcastradio/2.0/Android.bp b/broadcastradio/2.0/Android.bp
index 2434fdc..93afc02 100644
--- a/broadcastradio/2.0/Android.bp
+++ b/broadcastradio/2.0/Android.bp
@@ -17,29 +17,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "AmFmBandRange",
-        "AmFmRegionConfig",
-        "Announcement",
-        "AnnouncementType",
-        "ConfigFlag",
-        "Constants",
-        "DabTableEntry",
-        "Deemphasis",
-        "IdentifierType",
-        "Metadata",
-        "MetadataKey",
-        "ProgramFilter",
-        "ProgramIdentifier",
-        "ProgramInfo",
-        "ProgramInfoFlags",
-        "ProgramListChunk",
-        "ProgramSelector",
-        "Properties",
-        "Rds",
-        "Result",
-        "VendorKeyValue",
-    ],
     gen_java: true,
 }
 
diff --git a/camera/common/1.0/Android.bp b/camera/common/1.0/Android.bp
index c42e054..fe29774 100644
--- a/camera/common/1.0/Android.bp
+++ b/camera/common/1.0/Android.bp
@@ -9,17 +9,6 @@
     srcs: [
         "types.hal",
     ],
-    types: [
-        "CameraDeviceStatus",
-        "CameraMetadataType",
-        "CameraResourceCost",
-        "Status",
-        "TagBoundaryId",
-        "TorchMode",
-        "TorchModeStatus",
-        "VendorTag",
-        "VendorTagSection",
-    ],
     gen_java: true,
 }
 
diff --git a/camera/device/1.0/Android.bp b/camera/device/1.0/Android.bp
index b08f873..a8df1ec 100644
--- a/camera/device/1.0/Android.bp
+++ b/camera/device/1.0/Android.bp
@@ -17,18 +17,6 @@
         "android.hardware.graphics.common@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "CameraFace",
-        "CameraFacing",
-        "CameraFrameMetadata",
-        "CameraInfo",
-        "CommandType",
-        "DataCallbackMsg",
-        "FrameCallbackFlag",
-        "HandleTimestampMessage",
-        "NotifyCallbackMsg",
-        "VideoFrameMessage",
-    ],
     gen_java: true,
 }
 
diff --git a/camera/device/3.2/Android.bp b/camera/device/3.2/Android.bp
index a8a164e..e7546de 100644
--- a/camera/device/3.2/Android.bp
+++ b/camera/device/3.2/Android.bp
@@ -17,28 +17,6 @@
         "android.hardware.graphics.common@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "BufferCache",
-        "BufferStatus",
-        "CameraBlob",
-        "CameraBlobId",
-        "CaptureRequest",
-        "CaptureResult",
-        "ErrorCode",
-        "ErrorMsg",
-        "HalStream",
-        "HalStreamConfiguration",
-        "MsgType",
-        "NotifyMsg",
-        "RequestTemplate",
-        "ShutterMsg",
-        "Stream",
-        "StreamBuffer",
-        "StreamConfiguration",
-        "StreamConfigurationMode",
-        "StreamRotation",
-        "StreamType",
-    ],
     gen_java: false,
 }
 
diff --git a/camera/device/3.3/Android.bp b/camera/device/3.3/Android.bp
index f006f79..e21824f 100644
--- a/camera/device/3.3/Android.bp
+++ b/camera/device/3.3/Android.bp
@@ -16,10 +16,6 @@
         "android.hardware.graphics.common@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "HalStream",
-        "HalStreamConfiguration",
-    ],
     gen_java: false,
 }
 
diff --git a/camera/device/3.4/Android.bp b/camera/device/3.4/Android.bp
index 2c649ba..6a2eac5 100644
--- a/camera/device/3.4/Android.bp
+++ b/camera/device/3.4/Android.bp
@@ -18,16 +18,6 @@
         "android.hardware.graphics.common@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "CaptureRequest",
-        "CaptureResult",
-        "HalStream",
-        "HalStreamConfiguration",
-        "PhysicalCameraMetadata",
-        "PhysicalCameraSetting",
-        "Stream",
-        "StreamConfiguration",
-    ],
     gen_java: false,
 }
 
diff --git a/camera/device/3.5/Android.bp b/camera/device/3.5/Android.bp
index 6d18367..d51fd0e 100644
--- a/camera/device/3.5/Android.bp
+++ b/camera/device/3.5/Android.bp
@@ -20,16 +20,6 @@
         "android.hardware.graphics.common@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "BufferRequest",
-        "BufferRequestStatus",
-        "CameraBlob",
-        "CameraBlobId",
-        "StreamBufferRequestError",
-        "StreamBufferRet",
-        "StreamBuffersVal",
-        "StreamConfiguration",
-    ],
     gen_java: false,
 }
 
diff --git a/camera/device/3.5/default/CameraDeviceSession.cpp b/camera/device/3.5/default/CameraDeviceSession.cpp
index bea1be6..e812e50 100644
--- a/camera/device/3.5/default/CameraDeviceSession.cpp
+++ b/camera/device/3.5/default/CameraDeviceSession.cpp
@@ -273,6 +273,7 @@
         int streamId = bufRets[i].streamId;
         const hidl_vec<StreamBuffer>& hBufs = bufRets[i].val.buffers();
         camera3_stream_buffer_t* outBufs = returned_buf_reqs[i].output_buffers;
+        returned_buf_reqs[i].num_output_buffers = hBufs.size();
         for (size_t b = 0; b < hBufs.size(); b++) {
             const StreamBuffer& hBuf = hBufs[b];
             camera3_stream_buffer_t& outBuf = outBufs[b];
@@ -281,27 +282,19 @@
                     hBuf.bufferId, hBuf.buffer.getNativeHandle(),
                     /*out*/&(outBuf.buffer),
                     /*allowEmptyBuf*/false);
-            if (s != Status::OK) {
-                ALOGE("%s: import stream %d bufferId %" PRIu64 " failed!",
-                        __FUNCTION__, streamId, hBuf.bufferId);
-                cleanupInflightBufferFences(importedFences, importedBuffers);
-                // Buffer import should never fail - restart HAL since something is very
-                // wrong.
-                assert(false);
-                return CAMERA3_BUF_REQ_FAILED_UNKNOWN;
-            }
+            // Buffer import should never fail - restart HAL since something is very wrong.
+            LOG_ALWAYS_FATAL_IF(s != Status::OK,
+                    "%s: import stream %d bufferId %" PRIu64 " failed!",
+                    __FUNCTION__, streamId, hBuf.bufferId);
 
             pushBufferId(*(outBuf.buffer), hBuf.bufferId, streamId);
             importedBuffers.push_back(std::make_pair(*(outBuf.buffer), streamId));
 
-            if (!sHandleImporter.importFence(
-                    hBuf.acquireFence,
-                    outBuf.acquire_fence)) {
-                ALOGE("%s: stream %d bufferId %" PRIu64 "acquire fence is invalid",
+            bool succ = sHandleImporter.importFence(hBuf.acquireFence, outBuf.acquire_fence);
+            // Fence import should never fail - restart HAL since something is very wrong.
+            LOG_ALWAYS_FATAL_IF(!succ,
+                        "%s: stream %d bufferId %" PRIu64 "acquire fence is invalid",
                         __FUNCTION__, streamId, hBuf.bufferId);
-                cleanupInflightBufferFences(importedFences, importedBuffers);
-                return CAMERA3_BUF_REQ_FAILED_UNKNOWN;
-            }
             importedFences.push_back(outBuf.acquire_fence);
             outBuf.stream = returned_buf_reqs[i].stream;
             outBuf.status = CAMERA3_BUFFER_STATUS_OK;
diff --git a/camera/device/3.5/types.hal b/camera/device/3.5/types.hal
index e3c2350..f98c603 100644
--- a/camera/device/3.5/types.hal
+++ b/camera/device/3.5/types.hal
@@ -142,7 +142,9 @@
  * To capture a JPEG APP segments blob, a stream is created using the pixel format
  * HAL_PIXEL_FORMAT_BLOB and dataspace HAL_DATASPACE_JPEG_APP_SEGMENTS. The buffer
  * size for the stream is calculated by the framework, based on the static
- * metadata field android.heic.maxAppSegmentsCount.
+ * metadata field android.heic.maxAppSegmentsCount, and is assigned to both
+ * @3.2::Stream::width and @3.4::Stream::bufferSize. Camera framework sets
+ * @3.2::Stream::height to 1.
  *
  * Similar to JPEG image, the JPEG APP segment images can be of variable size,
  * so the HAL needs to include the final size of all APP segments using this
diff --git a/camera/metadata/3.2/Android.bp b/camera/metadata/3.2/Android.bp
index bce2c9b..3271d91 100644
--- a/camera/metadata/3.2/Android.bp
+++ b/camera/metadata/3.2/Android.bp
@@ -9,72 +9,6 @@
     srcs: [
         "types.hal",
     ],
-    types: [
-        "CameraMetadataEnumAndroidBlackLevelLock",
-        "CameraMetadataEnumAndroidColorCorrectionAberrationMode",
-        "CameraMetadataEnumAndroidColorCorrectionMode",
-        "CameraMetadataEnumAndroidControlAeAntibandingMode",
-        "CameraMetadataEnumAndroidControlAeLock",
-        "CameraMetadataEnumAndroidControlAeLockAvailable",
-        "CameraMetadataEnumAndroidControlAeMode",
-        "CameraMetadataEnumAndroidControlAePrecaptureTrigger",
-        "CameraMetadataEnumAndroidControlAeState",
-        "CameraMetadataEnumAndroidControlAfMode",
-        "CameraMetadataEnumAndroidControlAfState",
-        "CameraMetadataEnumAndroidControlAfTrigger",
-        "CameraMetadataEnumAndroidControlAwbLock",
-        "CameraMetadataEnumAndroidControlAwbLockAvailable",
-        "CameraMetadataEnumAndroidControlAwbMode",
-        "CameraMetadataEnumAndroidControlAwbState",
-        "CameraMetadataEnumAndroidControlCaptureIntent",
-        "CameraMetadataEnumAndroidControlEffectMode",
-        "CameraMetadataEnumAndroidControlEnableZsl",
-        "CameraMetadataEnumAndroidControlMode",
-        "CameraMetadataEnumAndroidControlSceneMode",
-        "CameraMetadataEnumAndroidControlVideoStabilizationMode",
-        "CameraMetadataEnumAndroidDemosaicMode",
-        "CameraMetadataEnumAndroidDepthAvailableDepthStreamConfigurations",
-        "CameraMetadataEnumAndroidDepthDepthIsExclusive",
-        "CameraMetadataEnumAndroidEdgeMode",
-        "CameraMetadataEnumAndroidFlashInfoAvailable",
-        "CameraMetadataEnumAndroidFlashMode",
-        "CameraMetadataEnumAndroidFlashState",
-        "CameraMetadataEnumAndroidHotPixelMode",
-        "CameraMetadataEnumAndroidInfoSupportedHardwareLevel",
-        "CameraMetadataEnumAndroidLedAvailableLeds",
-        "CameraMetadataEnumAndroidLedTransmit",
-        "CameraMetadataEnumAndroidLensFacing",
-        "CameraMetadataEnumAndroidLensInfoFocusDistanceCalibration",
-        "CameraMetadataEnumAndroidLensOpticalStabilizationMode",
-        "CameraMetadataEnumAndroidLensState",
-        "CameraMetadataEnumAndroidNoiseReductionMode",
-        "CameraMetadataEnumAndroidQuirksPartialResult",
-        "CameraMetadataEnumAndroidRequestAvailableCapabilities",
-        "CameraMetadataEnumAndroidRequestMetadataMode",
-        "CameraMetadataEnumAndroidRequestType",
-        "CameraMetadataEnumAndroidScalerAvailableFormats",
-        "CameraMetadataEnumAndroidScalerAvailableStreamConfigurations",
-        "CameraMetadataEnumAndroidScalerCroppingType",
-        "CameraMetadataEnumAndroidSensorInfoColorFilterArrangement",
-        "CameraMetadataEnumAndroidSensorInfoLensShadingApplied",
-        "CameraMetadataEnumAndroidSensorInfoTimestampSource",
-        "CameraMetadataEnumAndroidSensorReferenceIlluminant1",
-        "CameraMetadataEnumAndroidSensorTestPatternMode",
-        "CameraMetadataEnumAndroidShadingMode",
-        "CameraMetadataEnumAndroidStatisticsFaceDetectMode",
-        "CameraMetadataEnumAndroidStatisticsHistogramMode",
-        "CameraMetadataEnumAndroidStatisticsHotPixelMapMode",
-        "CameraMetadataEnumAndroidStatisticsLensShadingMapMode",
-        "CameraMetadataEnumAndroidStatisticsSceneFlicker",
-        "CameraMetadataEnumAndroidStatisticsSharpnessMapMode",
-        "CameraMetadataEnumAndroidSyncFrameNumber",
-        "CameraMetadataEnumAndroidSyncMaxLatency",
-        "CameraMetadataEnumAndroidTonemapMode",
-        "CameraMetadataEnumAndroidTonemapPresetCurve",
-        "CameraMetadataSection",
-        "CameraMetadataSectionStart",
-        "CameraMetadataTag",
-    ],
     gen_java: true,
 }
 
diff --git a/camera/metadata/3.3/Android.bp b/camera/metadata/3.3/Android.bp
index ad6f141..4dddfad 100644
--- a/camera/metadata/3.3/Android.bp
+++ b/camera/metadata/3.3/Android.bp
@@ -12,20 +12,6 @@
     interfaces: [
         "android.hardware.camera.metadata@3.2",
     ],
-    types: [
-        "CameraMetadataEnumAndroidControlAeMode",
-        "CameraMetadataEnumAndroidControlAfSceneChange",
-        "CameraMetadataEnumAndroidControlCaptureIntent",
-        "CameraMetadataEnumAndroidDistortionCorrectionMode",
-        "CameraMetadataEnumAndroidInfoSupportedHardwareLevel",
-        "CameraMetadataEnumAndroidLensPoseReference",
-        "CameraMetadataEnumAndroidLogicalMultiCameraSensorSyncType",
-        "CameraMetadataEnumAndroidRequestAvailableCapabilities",
-        "CameraMetadataEnumAndroidStatisticsOisDataMode",
-        "CameraMetadataSection",
-        "CameraMetadataSectionStart",
-        "CameraMetadataTag",
-    ],
     gen_java: true,
 }
 
diff --git a/camera/metadata/3.3/types.hal b/camera/metadata/3.3/types.hal
index 27d82b9..1ed8ed8 100644
--- a/camera/metadata/3.3/types.hal
+++ b/camera/metadata/3.3/types.hal
@@ -98,7 +98,7 @@
      */
     ANDROID_REQUEST_AVAILABLE_SESSION_KEYS = android.hardware.camera.metadata@3.2::CameraMetadataTag:ANDROID_REQUEST_END,
 
-    /** android.request.availablePhysicalCameraRequestKeys [static, int32[], hidden]
+    /** android.request.availablePhysicalCameraRequestKeys [static, int32[], ndk_public]
      *
      * <p>A subset of the available request keys that can be overridden for
      * physical devices backing a logical multi-camera.</p>
diff --git a/camera/metadata/3.4/Android.bp b/camera/metadata/3.4/Android.bp
index d1cba14..2b75eba 100644
--- a/camera/metadata/3.4/Android.bp
+++ b/camera/metadata/3.4/Android.bp
@@ -13,19 +13,6 @@
         "android.hardware.camera.metadata@3.2",
         "android.hardware.camera.metadata@3.3",
     ],
-    types: [
-        "CameraMetadataEnumAndroidDepthAvailableDynamicDepthStreamConfigurations",
-        "CameraMetadataEnumAndroidHeicAvailableHeicStreamConfigurations",
-        "CameraMetadataEnumAndroidHeicInfoSupported",
-        "CameraMetadataEnumAndroidInfoSupportedBufferManagementVersion",
-        "CameraMetadataEnumAndroidRequestAvailableCapabilities",
-        "CameraMetadataEnumAndroidScalerAvailableFormats",
-        "CameraMetadataEnumAndroidScalerAvailableRecommendedStreamConfigurations",
-        "CameraMetadataEnumAndroidSensorInfoColorFilterArrangement",
-        "CameraMetadataSection",
-        "CameraMetadataSectionStart",
-        "CameraMetadataTag",
-    ],
     gen_java: true,
 }
 
diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
index 3949346..d77bb0e 100644
--- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
+++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp
@@ -782,6 +782,8 @@
     void verifySessionReconfigurationQuery(sp<device::V3_5::ICameraDeviceSession> session3_5,
             camera_metadata* oldSessionParams, camera_metadata* newSessionParams);
 
+    bool isDepthOnly(camera_metadata_t* staticMeta);
+
     static Status getAvailableOutputStreams(camera_metadata_t *staticMeta,
             std::vector<AvailableStream> &outputStreams,
             const AvailableStream *threshold = nullptr);
@@ -793,6 +795,10 @@
             std::unordered_set<std::string> *physicalIds/*out*/);
     static Status getSupportedKeys(camera_metadata_t *staticMeta,
             uint32_t tagId, std::unordered_set<int32_t> *requestIDs/*out*/);
+    static void fillOutputStreams(camera_metadata_ro_entry_t* entry,
+            std::vector<AvailableStream>& outputStreams,
+            const AvailableStream *threshold = nullptr,
+            const int32_t availableConfigOutputTag = 0u);
     static void constructFilteredSettings(const sp<ICameraDeviceSession>& session,
             const std::unordered_set<int32_t>& availableKeys, RequestTemplate reqTemplate,
             android::hardware::camera::common::V1_0::helper::CameraMetadata* defaultSettings/*out*/,
@@ -2845,14 +2851,24 @@
         uint32_t streamConfigCounter = 0;
         for (auto& it : outputStreams) {
             V3_2::Stream stream3_2;
-            bool isJpeg = static_cast<PixelFormat>(it.format) == PixelFormat::BLOB;
+            V3_2::DataspaceFlags dataspaceFlag = 0;
+            switch (static_cast<PixelFormat>(it.format)) {
+                case PixelFormat::BLOB:
+                    dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::V0_JFIF);
+                    break;
+                case PixelFormat::Y16:
+                    dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::DEPTH);
+                    break;
+                default:
+                    dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::UNKNOWN);
+            }
             stream3_2 = {streamId,
                              StreamType::OUTPUT,
                              static_cast<uint32_t>(it.width),
                              static_cast<uint32_t>(it.height),
                              static_cast<PixelFormat>(it.format),
                              GRALLOC1_CONSUMER_USAGE_HWCOMPOSER,
-                             (isJpeg) ? static_cast<V3_2::DataspaceFlags>(Dataspace::V0_JFIF) : 0,
+                             dataspaceFlag,
                              StreamRotation::ROTATION_0};
             ::android::hardware::hidl_vec<V3_2::Stream> streams3_2 = {stream3_2};
             ::android::hardware::camera::device::V3_5::StreamConfiguration config3_5;
@@ -3415,6 +3431,14 @@
         castSession(session, deviceVersion, &session3_3, &session3_4, &session3_5);
         castDevice(cameraDevice, deviceVersion, &cameraDevice3_5);
 
+        // Check if camera support depth only
+        if (isDepthOnly(staticMeta)) {
+            free_camera_metadata(staticMeta);
+            ret = session->close();
+            ASSERT_TRUE(ret.isOk());
+            continue;
+        }
+
         outputBlobStreams.clear();
         ASSERT_EQ(Status::OK,
                   getAvailableOutputStreams(staticMeta, outputBlobStreams,
@@ -3735,6 +3759,14 @@
         castSession(session, deviceVersion, &session3_3, &session3_4, &session3_5);
         castDevice(cameraDevice, deviceVersion, &cameraDevice3_5);
 
+        // Check if camera support depth only
+        if (isDepthOnly(staticMeta)) {
+            free_camera_metadata(staticMeta);
+            ret = session->close();
+            ASSERT_TRUE(ret.isOk());
+            continue;
+        }
+
         outputBlobStreams.clear();
         ASSERT_EQ(Status::OK,
                   getAvailableOutputStreams(staticMeta, outputBlobStreams,
@@ -4723,38 +4755,56 @@
 Status CameraHidlTest::getAvailableOutputStreams(camera_metadata_t *staticMeta,
         std::vector<AvailableStream> &outputStreams,
         const AvailableStream *threshold) {
+    AvailableStream depthPreviewThreshold = {kMaxPreviewWidth, kMaxPreviewHeight,
+                                             static_cast<int32_t>(PixelFormat::Y16)};
     if (nullptr == staticMeta) {
         return Status::ILLEGAL_ARGUMENT;
     }
 
-    camera_metadata_ro_entry entry;
-    int rc = find_camera_metadata_ro_entry(staticMeta,
-            ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, &entry);
-    if ((0 != rc) || (0 != (entry.count % 4))) {
+    camera_metadata_ro_entry scalarEntry;
+    camera_metadata_ro_entry depthEntry;
+    int foundScalar = find_camera_metadata_ro_entry(staticMeta,
+            ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS, &scalarEntry);
+    int foundDepth = find_camera_metadata_ro_entry(staticMeta,
+            ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, &depthEntry);
+    if ((0 != foundScalar || (0 != (scalarEntry.count % 4))) &&
+        (0 != foundDepth || (0 != (depthEntry.count % 4)))) {
         return Status::ILLEGAL_ARGUMENT;
     }
 
-    for (size_t i = 0; i < entry.count; i+=4) {
-        if (ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT ==
-                entry.data.i32[i + 3]) {
+    if(foundScalar == 0 && (0 == (scalarEntry.count % 4))) {
+        fillOutputStreams(&scalarEntry, outputStreams, threshold,
+                ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT);
+    }
+
+    if(foundDepth == 0 && (0 == (depthEntry.count % 4))) {
+        fillOutputStreams(&depthEntry, outputStreams, &depthPreviewThreshold,
+                ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_OUTPUT);
+    }
+
+    return Status::OK;
+}
+
+void CameraHidlTest::fillOutputStreams(camera_metadata_ro_entry_t* entry,
+        std::vector<AvailableStream>& outputStreams, const AvailableStream* threshold,
+        const int32_t availableConfigOutputTag) {
+    for (size_t i = 0; i < entry->count; i+=4) {
+        if (availableConfigOutputTag == entry->data.i32[i + 3]) {
             if(nullptr == threshold) {
-                AvailableStream s = {entry.data.i32[i+1],
-                        entry.data.i32[i+2], entry.data.i32[i]};
+                AvailableStream s = {entry->data.i32[i+1],
+                        entry->data.i32[i+2], entry->data.i32[i]};
                 outputStreams.push_back(s);
             } else {
-                if ((threshold->format == entry.data.i32[i]) &&
-                        (threshold->width >= entry.data.i32[i+1]) &&
-                        (threshold->height >= entry.data.i32[i+2])) {
-                    AvailableStream s = {entry.data.i32[i+1],
-                            entry.data.i32[i+2], threshold->format};
+                if ((threshold->format == entry->data.i32[i]) &&
+                        (threshold->width >= entry->data.i32[i+1]) &&
+                        (threshold->height >= entry->data.i32[i+2])) {
+                    AvailableStream s = {entry->data.i32[i+1],
+                            entry->data.i32[i+2], threshold->format};
                     outputStreams.push_back(s);
                 }
             }
         }
-
     }
-
-    return Status::OK;
 }
 
 // Get max jpeg buffer size in android.jpeg.maxSize
@@ -5226,6 +5276,37 @@
     ASSERT_TRUE(ret.isOk());
 }
 
+bool CameraHidlTest::isDepthOnly(camera_metadata_t* staticMeta) {
+    camera_metadata_ro_entry scalarEntry;
+    camera_metadata_ro_entry depthEntry;
+
+    int rc = find_camera_metadata_ro_entry(
+        staticMeta, ANDROID_REQUEST_AVAILABLE_CAPABILITIES, &scalarEntry);
+    if (rc == 0) {
+        for (uint32_t i = 0; i < scalarEntry.count; i++) {
+            if (scalarEntry.data.u8[i] == ANDROID_REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE) {
+                return false;
+            }
+        }
+    }
+
+    for (uint32_t i = 0; i < scalarEntry.count; i++) {
+        if (scalarEntry.data.u8[i] == ANDROID_REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT) {
+
+            rc = find_camera_metadata_ro_entry(
+                staticMeta, ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS, &depthEntry);
+            size_t i = 0;
+            if (rc == 0 && depthEntry.data.i32[i] == static_cast<int32_t>(PixelFormat::Y16)) {
+                // only Depth16 format is supported now
+                return true;
+            }
+            break;
+        }
+    }
+
+    return false;
+}
+
 // Open a device session and configure a preview stream.
 void CameraHidlTest::configurePreviewStream(const std::string &name, int32_t deviceVersion,
         sp<ICameraProvider> provider,
@@ -5316,11 +5397,20 @@
     ASSERT_EQ(Status::OK, rc);
     ASSERT_FALSE(outputPreviewStreams.empty());
 
+    V3_2::DataspaceFlags dataspaceFlag = 0;
+    switch (static_cast<PixelFormat>(outputPreviewStreams[0].format)) {
+        case PixelFormat::Y16:
+            dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::DEPTH);
+            break;
+        default:
+            dataspaceFlag = static_cast<V3_2::DataspaceFlags>(Dataspace::UNKNOWN);
+    }
+
     V3_2::Stream stream3_2 = {0, StreamType::OUTPUT,
             static_cast<uint32_t> (outputPreviewStreams[0].width),
             static_cast<uint32_t> (outputPreviewStreams[0].height),
             static_cast<PixelFormat> (outputPreviewStreams[0].format),
-            GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, 0, StreamRotation::ROTATION_0};
+            GRALLOC1_CONSUMER_USAGE_HWCOMPOSER, dataspaceFlag, StreamRotation::ROTATION_0};
     ::android::hardware::hidl_vec<V3_2::Stream> streams3_2 = {stream3_2};
     ::android::hardware::camera::device::V3_2::StreamConfiguration config3_2;
     ::android::hardware::camera::device::V3_4::StreamConfiguration config3_4;
diff --git a/camera/provider/2.5/Android.bp b/camera/provider/2.5/Android.bp
index 3de010a..a4af07e 100644
--- a/camera/provider/2.5/Android.bp
+++ b/camera/provider/2.5/Android.bp
@@ -17,9 +17,6 @@
         "android.hardware.camera.provider@2.4",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "DeviceState",
-    ],
     gen_java: false,
 }
 
diff --git a/cas/1.0/Android.bp b/cas/1.0/Android.bp
index 39b36be..8d8e946 100644
--- a/cas/1.0/Android.bp
+++ b/cas/1.0/Android.bp
@@ -16,10 +16,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "HidlCasPluginDescriptor",
-        "Status",
-    ],
     gen_java: true,
 }
 
diff --git a/cas/native/1.0/Android.bp b/cas/native/1.0/Android.bp
index 7587416..880eccd 100644
--- a/cas/native/1.0/Android.bp
+++ b/cas/native/1.0/Android.bp
@@ -14,13 +14,6 @@
         "android.hardware.cas@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "BufferType",
-        "DestinationBuffer",
-        "ScramblingControl",
-        "SharedBuffer",
-        "SubSample",
-    ],
     gen_java: false,
 }
 
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 244d7a0..566bd48 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -127,9 +127,9 @@
             <instance>default</instance>
         </interface>
     </hal>
-    <hal format="hidl" optional="false">
+    <hal format="hidl" optional="true">
         <name>android.hardware.configstore</name>
-        <version>1.2</version>
+        <version>1.1</version>
         <interface>
             <name>ISurfaceFlingerConfigs</name>
             <instance>default</instance>
diff --git a/configstore/1.0/Android.bp b/configstore/1.0/Android.bp
index 5e98e5c..a6fd656 100644
--- a/configstore/1.0/Android.bp
+++ b/configstore/1.0/Android.bp
@@ -13,14 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "OptionalBool",
-        "OptionalInt32",
-        "OptionalInt64",
-        "OptionalString",
-        "OptionalUInt32",
-        "OptionalUInt64",
-    ],
     gen_java: true,
 }
 
diff --git a/configstore/1.1/Android.bp b/configstore/1.1/Android.bp
index 2b6e6fa..3900d9b 100644
--- a/configstore/1.1/Android.bp
+++ b/configstore/1.1/Android.bp
@@ -14,10 +14,6 @@
         "android.hardware.configstore@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "DisplayOrientation",
-        "OptionalDisplayOrientation",
-    ],
     gen_java: true,
 }
 
diff --git a/configstore/1.2/default/Android.mk b/configstore/1.1/default/Android.mk
similarity index 70%
rename from configstore/1.2/default/Android.mk
rename to configstore/1.1/default/Android.mk
index b807357..104e15e 100644
--- a/configstore/1.2/default/Android.mk
+++ b/configstore/1.1/default/Android.mk
@@ -2,15 +2,15 @@
 
 ################################################################################
 include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.configstore@1.2-service
+LOCAL_MODULE := android.hardware.configstore@1.1-service
 # seccomp is not required for coverage build.
 ifneq ($(NATIVE_COVERAGE),true)
-LOCAL_REQUIRED_MODULES_arm64 := configstore.policy
+LOCAL_REQUIRED_MODULES_arm64 := configstore@1.1.policy
 endif
 LOCAL_VENDOR_MODULE := true
 LOCAL_MODULE_CLASS := EXECUTABLES
 LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_INIT_RC := android.hardware.configstore@1.2-service.rc
+LOCAL_INIT_RC := android.hardware.configstore@1.1-service.rc
 LOCAL_SRC_FILES:= service.cpp
 
 include $(LOCAL_PATH)/surfaceflinger.mk
@@ -23,17 +23,16 @@
     liblog \
     libutils \
     android.hardware.configstore@1.0 \
-    android.hardware.configstore@1.1 \
-    android.hardware.configstore@1.2
+    android.hardware.configstore@1.1
 
 include $(BUILD_EXECUTABLE)
 
 # seccomp filter for configstore
 ifeq ($(TARGET_ARCH), $(filter $(TARGET_ARCH), arm64))
 include $(CLEAR_VARS)
-LOCAL_MODULE := configstore.policy
+LOCAL_MODULE := configstore@1.1.policy
 LOCAL_MODULE_CLASS := ETC
 LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/etc/seccomp_policy
-LOCAL_SRC_FILES := seccomp_policy/configstore-$(TARGET_ARCH).policy
+LOCAL_SRC_FILES := seccomp_policy/configstore@1.1-$(TARGET_ARCH).policy
 include $(BUILD_PREBUILT)
 endif
diff --git a/configstore/1.1/default/SurfaceFlingerConfigs.cpp b/configstore/1.1/default/SurfaceFlingerConfigs.cpp
new file mode 100644
index 0000000..377e467
--- /dev/null
+++ b/configstore/1.1/default/SurfaceFlingerConfigs.cpp
@@ -0,0 +1,196 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.1
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "SurfaceFlingerConfigs.h"
+
+#include <android/hardware/configstore/1.1/types.h>
+#include <log/log.h>
+
+namespace android {
+namespace hardware {
+namespace configstore {
+namespace V1_1 {
+namespace implementation {
+
+// ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs implementation.
+Return<void> SurfaceFlingerConfigs::vsyncEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) {
+#ifdef VSYNC_EVENT_PHASE_OFFSET_NS
+    _hidl_cb({true, VSYNC_EVENT_PHASE_OFFSET_NS});
+#else
+    _hidl_cb({false, 0});
+#endif
+    return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::vsyncSfEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) {
+#ifdef SF_VSYNC_EVENT_PHASE_OFFSET_NS
+    _hidl_cb({true, SF_VSYNC_EVENT_PHASE_OFFSET_NS});
+#else
+    _hidl_cb({false, 0});
+#endif
+    return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::useContextPriority(useContextPriority_cb _hidl_cb) {
+#ifdef USE_CONTEXT_PRIORITY
+    _hidl_cb({true, USE_CONTEXT_PRIORITY});
+#else
+    _hidl_cb({false, false});
+#endif
+    return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::maxFrameBufferAcquiredBuffers(
+        maxFrameBufferAcquiredBuffers_cb _hidl_cb) {
+#ifdef NUM_FRAMEBUFFER_SURFACE_BUFFERS
+    _hidl_cb({true, NUM_FRAMEBUFFER_SURFACE_BUFFERS});
+#else
+    _hidl_cb({false, 0});
+#endif
+    return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::hasWideColorDisplay(hasWideColorDisplay_cb _hidl_cb) {
+    bool value = false;
+#ifdef HAS_WIDE_COLOR_DISPLAY
+    value = true;
+#endif
+    _hidl_cb({true, value});
+    return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::hasSyncFramework(hasSyncFramework_cb _hidl_cb) {
+    bool value = true;
+#ifdef RUNNING_WITHOUT_SYNC_FRAMEWORK
+    value = false;
+#endif
+    _hidl_cb({true, value});
+    return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::hasHDRDisplay(hasHDRDisplay_cb _hidl_cb) {
+    bool value = false;
+#ifdef HAS_HDR_DISPLAY
+    value = true;
+#endif
+    _hidl_cb({true, value});
+    return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::presentTimeOffsetFromVSyncNs(
+        presentTimeOffsetFromVSyncNs_cb _hidl_cb) {
+#ifdef PRESENT_TIME_OFFSET_FROM_VSYNC_NS
+    _hidl_cb({true, PRESENT_TIME_OFFSET_FROM_VSYNC_NS});
+#else
+    _hidl_cb({false, 0});
+#endif
+    return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::useHwcForRGBtoYUV(useHwcForRGBtoYUV_cb _hidl_cb) {
+    bool value = false;
+#ifdef FORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
+    value = true;
+#endif
+    _hidl_cb({true, value});
+    return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::maxVirtualDisplaySize(maxVirtualDisplaySize_cb _hidl_cb) {
+    uint64_t maxSize = 0;
+#ifdef MAX_VIRTUAL_DISPLAY_DIMENSION
+    maxSize = MAX_VIRTUAL_DISPLAY_DIMENSION;
+    _hidl_cb({true, maxSize});
+#else
+    _hidl_cb({false, maxSize});
+#endif
+    return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::useVrFlinger(useVrFlinger_cb _hidl_cb) {
+    bool value = false;
+    bool specified = false;
+#ifdef USE_VR_FLINGER
+    value = true;
+    specified = true;
+#endif
+    _hidl_cb({specified, value});
+    return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::startGraphicsAllocatorService(
+        startGraphicsAllocatorService_cb _hidl_cb) {
+    bool value = false;
+#ifdef START_GRAPHICS_ALLOCATOR_SERVICE
+    value = true;
+#endif
+    _hidl_cb({true, value});
+    return Void();
+}
+
+// ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs implementation.
+
+#ifdef PRIMARY_DISPLAY_ORIENTATION
+static_assert(PRIMARY_DISPLAY_ORIENTATION == 0 || PRIMARY_DISPLAY_ORIENTATION == 90 ||
+                      PRIMARY_DISPLAY_ORIENTATION == 180 || PRIMARY_DISPLAY_ORIENTATION == 270,
+              "Primary display orientation must be 0/90/180/270");
+#endif
+
+Return<void> SurfaceFlingerConfigs::primaryDisplayOrientation(
+        primaryDisplayOrientation_cb _hidl_cb) {
+    using ::android::hardware::configstore::V1_1::DisplayOrientation;
+
+    bool specified = false;
+    DisplayOrientation value = DisplayOrientation::ORIENTATION_0;
+
+    int orientation = 0;
+#ifdef PRIMARY_DISPLAY_ORIENTATION
+    specified = true;
+    orientation = PRIMARY_DISPLAY_ORIENTATION;
+#endif
+
+    switch (orientation) {
+        case 0: {
+            value = DisplayOrientation::ORIENTATION_0;
+            break;
+        }
+        case 90: {
+            value = DisplayOrientation::ORIENTATION_90;
+            break;
+        }
+        case 180: {
+            value = DisplayOrientation::ORIENTATION_180;
+            break;
+        }
+        case 270: {
+            value = DisplayOrientation::ORIENTATION_270;
+            break;
+        }
+        default: {
+            // statically checked above -> memory corruption
+            LOG_ALWAYS_FATAL("Invalid orientation %d", orientation);
+        }
+    }
+
+    _hidl_cb({specified, value});
+    return Void();
+}
+
+}  // namespace implementation
+}  // namespace V1_1
+}  // namespace configstore
+}  // namespace hardware
+}  // namespace android
diff --git a/configstore/1.2/default/SurfaceFlingerConfigs.h b/configstore/1.1/default/SurfaceFlingerConfigs.h
similarity index 76%
rename from configstore/1.2/default/SurfaceFlingerConfigs.h
rename to configstore/1.1/default/SurfaceFlingerConfigs.h
index 54a6e62..c2f5fef 100644
--- a/configstore/1.2/default/SurfaceFlingerConfigs.h
+++ b/configstore/1.1/default/SurfaceFlingerConfigs.h
@@ -14,23 +14,23 @@
  * limitations under the License.
  */
 
-#ifndef ANDROID_HARDWARE_CONFIGSTORE_V1_2_SURFACEFLINGERCONFIGS_H
-#define ANDROID_HARDWARE_CONFIGSTORE_V1_2_SURFACEFLINGERCONFIGS_H
+#ifndef ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H
+#define ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H
 
-#include <android/hardware/configstore/1.2/ISurfaceFlingerConfigs.h>
+#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
 #include <hidl/MQDescriptor.h>
 #include <hidl/Status.h>
 
 namespace android {
 namespace hardware {
 namespace configstore {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 
 using ::android::sp;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
-using ::android::hardware::configstore::V1_2::ISurfaceFlingerConfigs;
+using ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs;
 
 struct SurfaceFlingerConfigs : public ISurfaceFlingerConfigs {
     // ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs implementation.
@@ -49,17 +49,12 @@
 
     // ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs follow implementation.
     Return<void> primaryDisplayOrientation(primaryDisplayOrientation_cb _hidl_cb) override;
-
-    // ::android::hardware::configstore::V1_2::ISurfaceFlingerConfigs follow implementation.
-    Return<void> useColorManagement(useColorManagement_cb _hidl_cb) override;
-    Return<void> getCompositionPreference(getCompositionPreference_cb _hidl_cb) override;
-    Return<void> getDisplayNativePrimaries(getDisplayNativePrimaries_cb _hidl_cb) override;
 };
 
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace configstore
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_CONFIGSTORE_V1_2_SURFACEFLINGERCONFIGS_H
+#endif  // ANDROID_HARDWARE_CONFIGSTORE_V1_1_SURFACEFLINGERCONFIGS_H
diff --git a/configstore/1.2/default/android.hardware.configstore@1.2-service.rc b/configstore/1.1/default/android.hardware.configstore@1.1-service.rc
similarity index 83%
rename from configstore/1.2/default/android.hardware.configstore@1.2-service.rc
rename to configstore/1.1/default/android.hardware.configstore@1.1-service.rc
index d6c5d10..105678a 100644
--- a/configstore/1.2/default/android.hardware.configstore@1.2-service.rc
+++ b/configstore/1.1/default/android.hardware.configstore@1.1-service.rc
@@ -1,4 +1,4 @@
-service vendor.configstore-hal /vendor/bin/hw/android.hardware.configstore@1.2-service
+service vendor.configstore-hal /vendor/bin/hw/android.hardware.configstore@1.1-service
     class hal animation
     user system
     group system
diff --git a/configstore/1.2/default/seccomp_policy/configstore-arm64.policy b/configstore/1.1/default/seccomp_policy/configstore@1.1-arm64.policy
similarity index 100%
rename from configstore/1.2/default/seccomp_policy/configstore-arm64.policy
rename to configstore/1.1/default/seccomp_policy/configstore@1.1-arm64.policy
diff --git a/configstore/1.2/default/service.cpp b/configstore/1.1/default/service.cpp
similarity index 80%
rename from configstore/1.2/default/service.cpp
rename to configstore/1.1/default/service.cpp
index 65a42f5..e21de0b 100644
--- a/configstore/1.2/default/service.cpp
+++ b/configstore/1.1/default/service.cpp
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-#define LOG_TAG "android.hardware.configstore@1.2-service"
+#define LOG_TAG "android.hardware.configstore@1.1-service"
 
-#include <android/hardware/configstore/1.2/ISurfaceFlingerConfigs.h>
+#include <android/hardware/configstore/1.1/ISurfaceFlingerConfigs.h>
 #include <hidl/HidlTransportSupport.h>
 #include <hwminijail/HardwareMinijail.h>
 
@@ -28,13 +28,13 @@
 using android::hardware::configureRpcThreadpool;
 using android::hardware::joinRpcThreadpool;
 using android::hardware::SetupMinijail;
-using android::hardware::configstore::V1_2::ISurfaceFlingerConfigs;
-using android::hardware::configstore::V1_2::implementation::SurfaceFlingerConfigs;
+using android::hardware::configstore::V1_1::ISurfaceFlingerConfigs;
+using android::hardware::configstore::V1_1::implementation::SurfaceFlingerConfigs;
 
 int main() {
     configureRpcThreadpool(10, true);
 
-    SetupMinijail("/vendor/etc/seccomp_policy/configstore.policy");
+    SetupMinijail("/vendor/etc/seccomp_policy/configstore@1.1.policy");
 
     sp<ISurfaceFlingerConfigs> surfaceFlingerConfigs = new SurfaceFlingerConfigs;
     status_t status = surfaceFlingerConfigs->registerAsService();
diff --git a/configstore/1.1/default/surfaceflinger.mk b/configstore/1.1/default/surfaceflinger.mk
new file mode 100644
index 0000000..35922eb
--- /dev/null
+++ b/configstore/1.1/default/surfaceflinger.mk
@@ -0,0 +1,56 @@
+
+LOCAL_SRC_FILES += SurfaceFlingerConfigs.cpp
+
+ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),)
+    LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
+endif
+
+ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
+    LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
+endif
+
+ifeq ($(TARGET_USE_CONTEXT_PRIORITY),true)
+    LOCAL_CFLAGS += -DUSE_CONTEXT_PRIORITY=1
+endif
+
+ifeq ($(TARGET_HAS_WIDE_COLOR_DISPLAY),true)
+    LOCAL_CFLAGS += -DHAS_WIDE_COLOR_DISPLAY
+endif
+
+ifeq ($(TARGET_HAS_HDR_DISPLAY),true)
+    LOCAL_CFLAGS += -DHAS_HDR_DISPLAY
+endif
+
+ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),)
+    LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS)
+else
+    LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
+endif
+
+ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true)
+    LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
+endif
+
+ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),)
+    LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION)
+endif
+
+ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true)
+    LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK
+endif
+
+ifneq ($(USE_VR_FLINGER),)
+    LOCAL_CFLAGS += -DUSE_VR_FLINGER
+endif
+
+ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
+    LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
+endif
+
+ifneq ($(SF_START_GRAPHICS_ALLOCATOR_SERVICE),)
+    LOCAL_CFLAGS += -DSTART_GRAPHICS_ALLOCATOR_SERVICE
+endif
+
+ifneq ($(SF_PRIMARY_DISPLAY_ORIENTATION),)
+    LOCAL_CFLAGS += -DPRIMARY_DISPLAY_ORIENTATION=$(SF_PRIMARY_DISPLAY_ORIENTATION)
+endif
diff --git a/configstore/1.2/Android.bp b/configstore/1.2/Android.bp
deleted file mode 100644
index a3976b6..0000000
--- a/configstore/1.2/Android.bp
+++ /dev/null
@@ -1,27 +0,0 @@
-// This file is autogenerated by hidl-gen -Landroidbp.
-
-hidl_interface {
-    name: "android.hardware.configstore@1.2",
-    root: "android.hardware",
-    vndk: {
-        enabled: true,
-    },
-    srcs: [
-        "types.hal",
-        "ISurfaceFlingerConfigs.hal",
-    ],
-    interfaces: [
-        "android.hardware.configstore@1.0",
-        "android.hardware.configstore@1.1",
-        "android.hardware.graphics.common@1.0",
-        "android.hardware.graphics.common@1.1",
-        "android.hardware.graphics.common@1.2",
-        "android.hidl.base@1.0",
-    ],
-    types: [
-        "CieXyz",
-        "DisplayPrimaries",
-    ],
-    gen_java: true,
-}
-
diff --git a/configstore/1.2/ISurfaceFlingerConfigs.hal b/configstore/1.2/ISurfaceFlingerConfigs.hal
deleted file mode 100644
index 431b3fc..0000000
--- a/configstore/1.2/ISurfaceFlingerConfigs.hal
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.1
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.hardware.configstore@1.2;
-
-import android.hardware.graphics.common@1.2::PixelFormat;
-import android.hardware.graphics.common@1.2::Dataspace;
-import @1.1::ISurfaceFlingerConfigs;
-import @1.0::OptionalBool;
-
-/**
- * New revision of ISurfaceFlingerConfigs
- */
-interface ISurfaceFlingerConfigs extends @1.1::ISurfaceFlingerConfigs {
-    /**
-     * useColorManagement indicates whether SurfaceFlinger should manage color
-     * by switching to appropriate color mode automatically depending on the
-     * Dataspace of the surfaces on screen.
-     * This function must return true when hasWideColorDisplay or hasHDRDisplay
-     * return true.
-     */
-    useColorManagement() generates (OptionalBool value);
-
-    /**
-     * Returns the default data space and pixel format that SurfaceFlinger
-     * expects to receive and output as well as the wide color gamut data space
-     * and pixel format for wide color gamut surfaces.
-     * To determine the data space and pixel format, there are a few things
-     * we recommend to consider:
-     *
-     *   1. Hardware composer's capability to composite contents with the chosen
-     *      data space and pixel format efficiently;
-     *   2. Hardware composer's ability to composite contents when sRGB contents
-     *      and the chosen wide color gamut data space contents coexist;
-     *   3. For better blending, consider using pixel format where the alpha
-     *      channel has as many bits as the RGB color channel.
-     *   4. Memory consumption and efficient buffer compression when considering
-     *      more bits in pixel format.
-     *
-     * @return dataspace is the default data space that SurfaceFlinger expects.
-     *         The data space must not be Dataspace::UNKNOWN, if unspecified,
-     *         the default data space is Dataspace::V0_SRGB;
-     * @return pixelFormat is the default pixel format that SurfaceFlinger
-     *         expects. If unspecified, the default pixel format is
-     *         PixelFormat::RGBA_8888.
-     * @return wcgDataspace is the data space that SurfaceFlinger expects for
-     *         wide color gamut surfaces.
-     *         When hasWideColorDisplay returns true, this API must return a
-     *         valid wide color gamut data space.
-     *         The data space must not be UNKNOWN, if unspecified, the data space
-     *         is V0_SRGB by default, which essentially indicates there's no wide
-     *         color gamut, meaning hasWideColorDisplay returns false.
-     * @return wcgPixelFormat is the pixel format that SurfaceFlinger expects for
-     *         wide color gamut surfaces. If unspecified, the pixel format is
-     *         PixelFormat::RGBA_8888 by default.
-     */
-    getCompositionPreference()
-        generates (Dataspace dataspace, PixelFormat pixelFormat,
-                   Dataspace wcgDataspace, PixelFormat wcgPixelFormat);
-
-    /**
-     * Returns the native panel primary data. The data includes red, green,
-     * blue and white. The primary format is CIE 1931 XYZ color space. If
-     * unspecified, the primaries is sRGB gamut by default.
-     */
-    getDisplayNativePrimaries() generates (DisplayPrimaries primaries);
-};
diff --git a/configstore/1.2/default/SurfaceFlingerConfigs.cpp b/configstore/1.2/default/SurfaceFlingerConfigs.cpp
deleted file mode 100644
index 714442b..0000000
--- a/configstore/1.2/default/SurfaceFlingerConfigs.cpp
+++ /dev/null
@@ -1,328 +0,0 @@
-/*
- * Copyright (C) 2018 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.1
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "SurfaceFlingerConfigs.h"
-
-#include <android/hardware/configstore/1.1/types.h>
-#include <android/hardware/configstore/1.2/types.h>
-#include <android/hardware/graphics/common/1.1/types.h>
-#include <log/log.h>
-
-namespace android {
-namespace hardware {
-namespace configstore {
-namespace V1_2 {
-namespace implementation {
-
-using ::android::hardware::graphics::common::V1_2::Dataspace;
-using ::android::hardware::graphics::common::V1_2::PixelFormat;
-
-// ::android::hardware::configstore::V1_0::ISurfaceFlingerConfigs implementation.
-Return<void> SurfaceFlingerConfigs::vsyncEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) {
-#ifdef VSYNC_EVENT_PHASE_OFFSET_NS
-    _hidl_cb({true, VSYNC_EVENT_PHASE_OFFSET_NS});
-#else
-    _hidl_cb({false, 0});
-#endif
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::vsyncSfEventPhaseOffsetNs(vsyncEventPhaseOffsetNs_cb _hidl_cb) {
-#ifdef SF_VSYNC_EVENT_PHASE_OFFSET_NS
-    _hidl_cb({true, SF_VSYNC_EVENT_PHASE_OFFSET_NS});
-#else
-    _hidl_cb({false, 0});
-#endif
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::useContextPriority(useContextPriority_cb _hidl_cb) {
-#ifdef USE_CONTEXT_PRIORITY
-    _hidl_cb({true, USE_CONTEXT_PRIORITY});
-#else
-    _hidl_cb({false, false});
-#endif
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::maxFrameBufferAcquiredBuffers(
-    maxFrameBufferAcquiredBuffers_cb _hidl_cb) {
-#ifdef NUM_FRAMEBUFFER_SURFACE_BUFFERS
-    _hidl_cb({true, NUM_FRAMEBUFFER_SURFACE_BUFFERS});
-#else
-    _hidl_cb({false, 0});
-#endif
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::hasWideColorDisplay(hasWideColorDisplay_cb _hidl_cb) {
-    bool value = false;
-#ifdef HAS_WIDE_COLOR_DISPLAY
-    value = true;
-#endif
-    _hidl_cb({true, value});
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::hasSyncFramework(hasSyncFramework_cb _hidl_cb) {
-    bool value = true;
-#ifdef RUNNING_WITHOUT_SYNC_FRAMEWORK
-    value = false;
-#endif
-    _hidl_cb({true, value});
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::hasHDRDisplay(hasHDRDisplay_cb _hidl_cb) {
-    bool value = false;
-#ifdef HAS_HDR_DISPLAY
-    value = true;
-#endif
-    _hidl_cb({true, value});
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::presentTimeOffsetFromVSyncNs(
-    presentTimeOffsetFromVSyncNs_cb _hidl_cb) {
-#ifdef PRESENT_TIME_OFFSET_FROM_VSYNC_NS
-    _hidl_cb({true, PRESENT_TIME_OFFSET_FROM_VSYNC_NS});
-#else
-    _hidl_cb({false, 0});
-#endif
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::useHwcForRGBtoYUV(useHwcForRGBtoYUV_cb _hidl_cb) {
-    bool value = false;
-#ifdef FORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
-    value = true;
-#endif
-    _hidl_cb({true, value});
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::maxVirtualDisplaySize(maxVirtualDisplaySize_cb _hidl_cb) {
-    uint64_t maxSize = 0;
-#ifdef MAX_VIRTUAL_DISPLAY_DIMENSION
-    maxSize = MAX_VIRTUAL_DISPLAY_DIMENSION;
-    _hidl_cb({true, maxSize});
-#else
-    _hidl_cb({false, maxSize});
-#endif
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::useVrFlinger(useVrFlinger_cb _hidl_cb) {
-    bool value = false;
-    bool specified = false;
-#ifdef USE_VR_FLINGER
-    value = true;
-    specified = true;
-#endif
-    _hidl_cb({specified, value});
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::startGraphicsAllocatorService(
-    startGraphicsAllocatorService_cb _hidl_cb) {
-    bool value = false;
-#ifdef START_GRAPHICS_ALLOCATOR_SERVICE
-    value = true;
-#endif
-    _hidl_cb({true, value});
-    return Void();
-}
-
-// ::android::hardware::configstore::V1_1::ISurfaceFlingerConfigs implementation.
-
-#ifdef PRIMARY_DISPLAY_ORIENTATION
-static_assert(PRIMARY_DISPLAY_ORIENTATION == 0 || PRIMARY_DISPLAY_ORIENTATION == 90 ||
-                  PRIMARY_DISPLAY_ORIENTATION == 180 || PRIMARY_DISPLAY_ORIENTATION == 270,
-              "Primary display orientation must be 0/90/180/270");
-#endif
-
-Return<void> SurfaceFlingerConfigs::primaryDisplayOrientation(
-    primaryDisplayOrientation_cb _hidl_cb) {
-    using ::android::hardware::configstore::V1_1::DisplayOrientation;
-
-    bool specified = false;
-    DisplayOrientation value = DisplayOrientation::ORIENTATION_0;
-
-    int orientation = 0;
-#ifdef PRIMARY_DISPLAY_ORIENTATION
-    specified = true;
-    orientation = PRIMARY_DISPLAY_ORIENTATION;
-#endif
-
-    switch (orientation) {
-        case 0: {
-            value = DisplayOrientation::ORIENTATION_0;
-            break;
-        }
-        case 90: {
-            value = DisplayOrientation::ORIENTATION_90;
-            break;
-        }
-        case 180: {
-            value = DisplayOrientation::ORIENTATION_180;
-            break;
-        }
-        case 270: {
-            value = DisplayOrientation::ORIENTATION_270;
-            break;
-        }
-        default: {
-            // statically checked above -> memory corruption
-            LOG_ALWAYS_FATAL("Invalid orientation %d", orientation);
-        }
-    }
-
-    _hidl_cb({specified, value});
-    return Void();
-}
-
-// ::android::hardware::configstore::V1_2::ISurfaceFlingerConfigs implementation.
-Return<void> SurfaceFlingerConfigs::useColorManagement(useColorManagement_cb _hidl_cb) {
-#if defined(USE_COLOR_MANAGEMENT) || defined(HAS_WIDE_COLOR_DISPLAY) || defined(HAS_HDR_DISPLAY)
-    _hidl_cb({true, true});
-#else
-    _hidl_cb({true, false});
-#endif
-    return Void();
-}
-
-#ifdef DEFAULT_COMPOSITION_DATA_SPACE
-static_assert(DEFAULT_COMPOSITION_DATA_SPACE != 0,
-              "Default composition data space must not be UNKNOWN");
-#endif
-
-#ifdef WCG_COMPOSITION_DATA_SPACE
-static_assert(WCG_COMPOSITION_DATA_SPACE != 0,
-              "Wide color gamut composition data space must not be UNKNOWN");
-#endif
-
-Return<void> SurfaceFlingerConfigs::getCompositionPreference(getCompositionPreference_cb _hidl_cb) {
-    Dataspace defaultDataspace = Dataspace::V0_SRGB;
-    PixelFormat defaultPixelFormat = PixelFormat::RGBA_8888;
-
-#ifdef DEFAULT_COMPOSITION_DATA_SPACE
-    defaultDataspace = static_cast<Dataspace>(DEFAULT_COMPOSITION_DATA_SPACE);
-#endif
-
-#ifdef DEFAULT_COMPOSITION_PIXEL_FORMAT
-    defaultPixelFormat = static_cast<PixelFormat>(DEFAULT_COMPOSITION_PIXEL_FORMAT);
-#endif
-
-    Dataspace wideColorGamutDataspace = Dataspace::V0_SRGB;
-    PixelFormat wideColorGamutPixelFormat = PixelFormat::RGBA_8888;
-
-#ifdef WCG_COMPOSITION_DATA_SPACE
-    wideColorGamutDataspace = static_cast<Dataspace>(WCG_COMPOSITION_DATA_SPACE);
-#endif
-
-#ifdef WCG_COMPOSITION_PIXEL_FORMAT
-    wideColorGamutPixelFormat = static_cast<PixelFormat>(WCG_COMPOSITION_PIXEL_FORMAT);
-#endif
-
-    _hidl_cb(defaultDataspace, defaultPixelFormat, wideColorGamutDataspace,
-             wideColorGamutPixelFormat);
-    return Void();
-}
-
-Return<void> SurfaceFlingerConfigs::getDisplayNativePrimaries(getDisplayNativePrimaries_cb _hidl_cb) {
-    DisplayPrimaries primaries;
-    // The default XYZ is sRGB gamut in CIE1931 color space
-#ifdef TARGET_DISPLAY_PRIMARY_RED_X
-    primaries.red.X = TARGET_DISPLAY_PRIMARY_RED_X;
-#else
-    primaries.red.X = 0.4123;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_RED_Y
-    primaries.red.Y = TARGET_DISPLAY_PRIMARY_RED_Y;
-#else
-    primaries.red.Y = 0.2126;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_RED_Z
-    primaries.red.Z = TARGET_DISPLAY_PRIMARY_RED_Z;
-#else
-    primaries.red.Z = 0.0193;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_GREEN_X
-    primaries.green.X = TARGET_DISPLAY_PRIMARY_GREEN_X;
-#else
-    primaries.green.X = 0.3576;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_GREEN_Y
-    primaries.green.Y = TARGET_DISPLAY_PRIMARY_GREEN_Y;
-#else
-    primaries.green.Y = 0.7152;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_GREEN_Z
-    primaries.green.Z = TARGET_DISPLAY_PRIMARY_GREEN_Z;
-#else
-    primaries.green.Z = 0.1192;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_BLUE_X
-    primaries.blue.X = TARGET_DISPLAY_PRIMARY_BLUE_X;
-#else
-    primaries.blue.X = 0.1805;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_BLUE_Y
-    primaries.blue.Y = TARGET_DISPLAY_PRIMARY_BLUE_Y;
-#else
-    primaries.blue.Y = 0.0722;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_BLUE_Z
-    primaries.blue.Z = TARGET_DISPLAY_PRIMARY_BLUE_Z;
-#else
-    primaries.blue.Z = 0.9506;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_WHITE_X
-    primaries.white.X = TARGET_DISPLAY_PRIMARY_WHITE_X;
-#else
-    primaries.white.X = 0.9505;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_WHITE_Y
-    primaries.white.Y = TARGET_DISPLAY_PRIMARY_WHITE_Y;
-#else
-    primaries.white.Y = 1.0000;
-#endif
-
-#ifdef TARGET_DISPLAY_PRIMARY_WHITE_Z
-    primaries.white.Z = TARGET_DISPLAY_PRIMARY_WHITE_Z;
-#else
-    primaries.white.Z = 1.0891;
-#endif
-
-    _hidl_cb(primaries);
-    return Void();
-}
-
-}  // namespace implementation
-}  // namespace V1_2
-}  // namespace configstore
-}  // namespace hardware
-}  // namespace android
diff --git a/configstore/1.2/default/surfaceflinger.mk b/configstore/1.2/default/surfaceflinger.mk
deleted file mode 100644
index 9a67256..0000000
--- a/configstore/1.2/default/surfaceflinger.mk
+++ /dev/null
@@ -1,124 +0,0 @@
-
-LOCAL_SRC_FILES += SurfaceFlingerConfigs.cpp
-
-ifneq ($(VSYNC_EVENT_PHASE_OFFSET_NS),)
-    LOCAL_CFLAGS += -DVSYNC_EVENT_PHASE_OFFSET_NS=$(VSYNC_EVENT_PHASE_OFFSET_NS)
-endif
-
-ifneq ($(SF_VSYNC_EVENT_PHASE_OFFSET_NS),)
-    LOCAL_CFLAGS += -DSF_VSYNC_EVENT_PHASE_OFFSET_NS=$(SF_VSYNC_EVENT_PHASE_OFFSET_NS)
-endif
-
-ifeq ($(TARGET_USE_CONTEXT_PRIORITY),true)
-    LOCAL_CFLAGS += -DUSE_CONTEXT_PRIORITY=1
-endif
-
-ifeq ($(TARGET_HAS_WIDE_COLOR_DISPLAY),true)
-    LOCAL_CFLAGS += -DHAS_WIDE_COLOR_DISPLAY
-endif
-
-ifeq ($(TARGET_HAS_HDR_DISPLAY),true)
-    LOCAL_CFLAGS += -DHAS_HDR_DISPLAY
-endif
-
-ifneq ($(PRESENT_TIME_OFFSET_FROM_VSYNC_NS),)
-    LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=$(PRESENT_TIME_OFFSET_FROM_VSYNC_NS)
-else
-    LOCAL_CFLAGS += -DPRESENT_TIME_OFFSET_FROM_VSYNC_NS=0
-endif
-
-ifeq ($(TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS),true)
-    LOCAL_CFLAGS += -DFORCE_HWC_COPY_FOR_VIRTUAL_DISPLAYS
-endif
-
-ifneq ($(MAX_VIRTUAL_DISPLAY_DIMENSION),)
-    LOCAL_CFLAGS += -DMAX_VIRTUAL_DISPLAY_DIMENSION=$(MAX_VIRTUAL_DISPLAY_DIMENSION)
-endif
-
-ifeq ($(TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK),true)
-    LOCAL_CFLAGS += -DRUNNING_WITHOUT_SYNC_FRAMEWORK
-endif
-
-ifneq ($(USE_VR_FLINGER),)
-    LOCAL_CFLAGS += -DUSE_VR_FLINGER
-endif
-
-ifneq ($(NUM_FRAMEBUFFER_SURFACE_BUFFERS),)
-    LOCAL_CFLAGS += -DNUM_FRAMEBUFFER_SURFACE_BUFFERS=$(NUM_FRAMEBUFFER_SURFACE_BUFFERS)
-endif
-
-ifneq ($(SF_START_GRAPHICS_ALLOCATOR_SERVICE),)
-    LOCAL_CFLAGS += -DSTART_GRAPHICS_ALLOCATOR_SERVICE
-endif
-
-ifneq ($(SF_PRIMARY_DISPLAY_ORIENTATION),)
-    LOCAL_CFLAGS += -DPRIMARY_DISPLAY_ORIENTATION=$(SF_PRIMARY_DISPLAY_ORIENTATION)
-endif
-
-ifeq ($(TARGET_USE_COLOR_MANAGEMENT),true)
-    LOCAL_CFLAGS += -DUSE_COLOR_MANAGEMENT
-endif
-
-ifneq ($(SF_DEFAULT_COMPOSITION_DATA_SPACE),)
-    LOCAL_CFLAGS += -DDEFAULT_COMPOSITION_DATA_SPACE=$(SF_DEFAULT_COMPOSITION_DATA_SPACE)
-endif
-
-ifneq ($(SF_DEFAULT_COMPOSITION_PIXEL_FORMAT),)
-    LOCAL_CFLAGS += -DDEFAULT_COMPOSITION_PIXEL_FORMAT=$(SF_DEFAULT_COMPOSITION_PIXEL_FORMAT)
-endif
-
-ifneq ($(SF_WCG_COMPOSITION_DATA_SPACE),)
-    LOCAL_CFLAGS += -DWCG_COMPOSITION_DATA_SPACE=$(SF_WCG_COMPOSITION_DATA_SPACE)
-endif
-
-ifneq ($(SF_WCG_COMPOSITION_PIXEL_FORMAT),)
-    LOCAL_CFLAGS += -DWCG_COMPOSITION_PIXEL_FORMAT=$(SF_WCG_COMPOSITION_PIXEL_FORMAT)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_RED_X),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_RED_X=$(TARGET_DISPLAY_PRIMARY_RED_X)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_RED_Y),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_RED_Y=$(TARGET_DISPLAY_PRIMARY_RED_Y)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_RED_Z),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_RED_Z=$(TARGET_DISPLAY_PRIMARY_RED_Z)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_GREEN_X),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_GREEN_X=$(TARGET_DISPLAY_PRIMARY_GREEN_X)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_GREEN_Y),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_GREEN_Y=$(TARGET_DISPLAY_PRIMARY_GREEN_Y)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_GREEN_Z),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_GREEN_Z=$(TARGET_DISPLAY_PRIMARY_GREEN_Z)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_BLUE_X),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_BLUE_X=$(TARGET_DISPLAY_PRIMARY_BLUE_X)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_BLUE_Y),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_BLUE_Y=$(TARGET_DISPLAY_PRIMARY_BLUE_Y)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_BLUE_Z),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_BLUE_Z=$(TARGET_DISPLAY_PRIMARY_BLUE_Z)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_WHITE_X),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_WHITE_X=$(TARGET_DISPLAY_PRIMARY_WHITE_X)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_WHITE_Y),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_WHITE_Y=$(TARGET_DISPLAY_PRIMARY_WHITE_Y)
-endif
-
-ifneq ($(TARGET_DISPLAY_PRIMARY_WHITE_Z),)
-    LOCAL_CFLAGS += -DTARGET_DISPLAY_PRIMARY_WHITE_Z=$(TARGET_DISPLAY_PRIMARY_WHITE_Z)
-endif
diff --git a/configstore/1.2/types.hal b/configstore/1.2/types.hal
deleted file mode 100644
index 5b2c9a6..0000000
--- a/configstore/1.2/types.hal
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.hardware.configstore@1.2;
-
-struct CieXyz {
-    float X;
-    float Y;
-    float Z;
-};
-struct DisplayPrimaries {
-    CieXyz red;
-    CieXyz green;
-    CieXyz blue;
-    CieXyz white;
-};
diff --git a/configstore/1.2/vts/functional/OWNERS b/configstore/1.2/vts/functional/OWNERS
deleted file mode 100644
index 2b4fb8c..0000000
--- a/configstore/1.2/vts/functional/OWNERS
+++ /dev/null
@@ -1,7 +0,0 @@
-# Graphics team
-lpy@google.com
-olv@google.com
-stoza@google.com
-
-# VTS team
-yim@google.com
diff --git a/configstore/1.2/vts/functional/VtsHalConfigstoreV1_2TargetTest.cpp b/configstore/1.2/vts/functional/VtsHalConfigstoreV1_2TargetTest.cpp
deleted file mode 100644
index d7f4dcf..0000000
--- a/configstore/1.2/vts/functional/VtsHalConfigstoreV1_2TargetTest.cpp
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "ConfigstoreHidlHalTest"
-
-#include <VtsHalHidlTargetTestBase.h>
-#include <VtsHalHidlTargetTestEnvBase.h>
-#include <android-base/logging.h>
-#include <android/hardware/configstore/1.0/types.h>
-#include <android/hardware/configstore/1.2/ISurfaceFlingerConfigs.h>
-#include <android/hardware/configstore/1.2/types.h>
-#include <unistd.h>
-
-using ::android::sp;
-using ::android::hardware::hidl_vec;
-using ::android::hardware::Return;
-using ::android::hardware::Void;
-using ::android::hardware::configstore::V1_0::OptionalBool;
-using ::android::hardware::configstore::V1_0::OptionalInt64;
-using ::android::hardware::configstore::V1_0::OptionalUInt64;
-using ::android::hardware::configstore::V1_2::DisplayPrimaries;
-using ::android::hardware::configstore::V1_2::ISurfaceFlingerConfigs;
-using ::android::hardware::graphics::common::V1_2::Dataspace;
-using ::android::hardware::graphics::common::V1_2::PixelFormat;
-
-#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())
-#define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk())
-
-// Test environment for Configstore HIDL HAL.
-class ConfigstoreHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
-   public:
-    // get the test environment singleton
-    static ConfigstoreHidlEnvironment* Instance() {
-        static ConfigstoreHidlEnvironment* instance = new ConfigstoreHidlEnvironment;
-        return instance;
-    }
-
-    virtual void registerTestServices() override { registerTestService<ISurfaceFlingerConfigs>(); }
-};
-
-class ConfigstoreHidlTest : public ::testing::VtsHalHidlTargetTestBase {
-   public:
-    sp<ISurfaceFlingerConfigs> sfConfigs;
-
-    virtual void SetUp() override {
-        sfConfigs = ::testing::VtsHalHidlTargetTestBase::getService<ISurfaceFlingerConfigs>(
-            ConfigstoreHidlEnvironment::Instance()->getServiceName<ISurfaceFlingerConfigs>());
-        ASSERT_NE(sfConfigs, nullptr);
-    }
-
-    virtual void TearDown() override {}
-
-    bool isSupportedWideColorGamut(Dataspace dataspace) {
-        Dataspace standard = static_cast<Dataspace>(dataspace & Dataspace::STANDARD_MASK);
-        return standard == Dataspace::STANDARD_DCI_P3 || standard == Dataspace::STANDARD_BT2020;
-    }
-};
-
-/**
- * Make sure the constrains of hasWideColorDisplay, hasHDRDisplay
- * and useColorManagement are enforced.
- */
-TEST_F(ConfigstoreHidlTest, TestColorConstrainsWithColorManagement) {
-    bool hasWideColorDisplay;
-    bool hasHDRDisplay;
-    bool useColorManagement;
-
-    Return<void> status = sfConfigs->hasWideColorDisplay(
-        [&](OptionalBool arg) { hasWideColorDisplay = arg.specified; });
-    EXPECT_OK(status);
-
-    status = sfConfigs->hasHDRDisplay([&](OptionalBool arg) { hasHDRDisplay = arg.specified; });
-    EXPECT_OK(status);
-
-    status = sfConfigs->useColorManagement(
-        [&](OptionalBool arg) { useColorManagement = arg.specified; });
-    EXPECT_OK(status);
-
-    // When hasHDRDisplay returns true, hasWideColorDisplay must also return true.
-    if (hasHDRDisplay) {
-        ASSERT_TRUE(hasWideColorDisplay);
-    }
-
-    // When hasWideColorDisplay returns true, useColorManagement
-    // must also return true.
-    if (hasWideColorDisplay) {
-        ASSERT_TRUE(useColorManagement);
-    }
-}
-
-TEST_F(ConfigstoreHidlTest, TestGetCompositionPreference) {
-    bool hasWideColorDisplay;
-
-    Return<void> status = sfConfigs->hasWideColorDisplay(
-        [&](OptionalBool arg) { hasWideColorDisplay = arg.specified; });
-    EXPECT_OK(status);
-
-    Dataspace defaultDataspace, wcgDataspace;
-
-    status = sfConfigs->getCompositionPreference(
-        [&](auto tmpDefaultDataspace, PixelFormat, auto tmpWcgDataspace, PixelFormat) {
-            defaultDataspace = tmpDefaultDataspace;
-            wcgDataspace = tmpWcgDataspace;
-        });
-    EXPECT_OK(status);
-
-    // Default data space and wide color gamut data space must not be UNKNOWN.
-    ASSERT_TRUE(defaultDataspace != Dataspace::UNKNOWN && wcgDataspace != Dataspace::UNKNOWN);
-
-    // If hasWideColorDisplay returns true, the wide color gamut data space must be a valid wide
-    // color gamut.
-    if (hasWideColorDisplay) {
-        ASSERT_TRUE(isSupportedWideColorGamut(wcgDataspace));
-    }
-}
-
-TEST_F(ConfigstoreHidlTest, TestGetDisplayNativePrimaries) {
-    DisplayPrimaries primaries;
-
-    Return<void> status = sfConfigs->getDisplayNativePrimaries(
-        [&](DisplayPrimaries tmpPrimaries) {
-            primaries.red = tmpPrimaries.red;
-            primaries.green = tmpPrimaries.green;
-            primaries.blue = tmpPrimaries.blue;
-            primaries.white = tmpPrimaries.white;
-        });
-    EXPECT_OK(status);
-
-    // Display primaries should be greater than or equal to zero.
-    // Or it returns defualt value if there is no definition.
-    // RED
-    EXPECT_GE(primaries.red.X, 0.0);
-    EXPECT_GE(primaries.red.Y, 0.0);
-    EXPECT_GE(primaries.red.Z, 0.0);
-
-    // GREEN
-    EXPECT_GE(primaries.green.X, 0.0);
-    EXPECT_GE(primaries.green.Y, 0.0);
-    EXPECT_GE(primaries.green.Z, 0.0);
-
-
-    // BLUE
-    EXPECT_GE(primaries.blue.X, 0.0);
-    EXPECT_GE(primaries.blue.Y, 0.0);
-    EXPECT_GE(primaries.blue.Z, 0.0);
-
-
-    // WHITE
-    EXPECT_GE(primaries.white.X, 0.0);
-    EXPECT_GE(primaries.white.Y, 0.0);
-    EXPECT_GE(primaries.white.Z, 0.0);
-}
-
-int main(int argc, char** argv) {
-    ::testing::AddGlobalTestEnvironment(ConfigstoreHidlEnvironment::Instance());
-    ::testing::InitGoogleTest(&argc, argv);
-    ConfigstoreHidlEnvironment::Instance()->init(&argc, argv);
-    int status = RUN_ALL_TESTS();
-    LOG(INFO) << "Test result = " << status;
-    return status;
-}
diff --git a/configstore/utils/Android.bp b/configstore/utils/Android.bp
index e0d4aa8..178f245 100644
--- a/configstore/utils/Android.bp
+++ b/configstore/utils/Android.bp
@@ -30,14 +30,12 @@
     shared_libs: [
         "android.hardware.configstore@1.0",
         "android.hardware.configstore@1.1",
-        "android.hardware.configstore@1.2",
         "libbase",
         "libhidlbase"
     ],
     export_shared_lib_headers: [
         "android.hardware.configstore@1.0",
         "android.hardware.configstore@1.1",
-        "android.hardware.configstore@1.2",
         "libbase",
         "libhidlbase"
     ],
diff --git a/confirmationui/1.0/Android.bp b/confirmationui/1.0/Android.bp
index 21acecb..e6b0414 100644
--- a/confirmationui/1.0/Android.bp
+++ b/confirmationui/1.0/Android.bp
@@ -15,13 +15,6 @@
         "android.hardware.keymaster@4.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "MessageSize",
-        "ResponseCode",
-        "TestKeyBits",
-        "TestModeCommands",
-        "UIOption",
-    ],
     gen_java: false,
 }
 
diff --git a/contexthub/1.0/Android.bp b/contexthub/1.0/Android.bp
index 77dba66..730adcb 100644
--- a/contexthub/1.0/Android.bp
+++ b/contexthub/1.0/Android.bp
@@ -14,22 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "AsyncEventType",
-        "ContextHub",
-        "ContextHubMsg",
-        "HostEndPoint",
-        "HubAppInfo",
-        "HubMemoryFlag",
-        "HubMemoryType",
-        "MemRange",
-        "NanoAppBinary",
-        "NanoAppFlags",
-        "PhysicalSensor",
-        "Result",
-        "SensorType",
-        "TransactionResult",
-    ],
     gen_java: true,
 }
 
diff --git a/current.txt b/current.txt
index 94b40c2..10b9b18 100644
--- a/current.txt
+++ b/current.txt
@@ -390,10 +390,12 @@
 684702a60deef03a1e8093961dc0a18c555c857ad5a77ba7340b0635ae01eb70 android.hardware.camera.device@3.4::ICameraDeviceSession
 f8a19622cb0cc890913b1ef3e32b675ffb26089a09e02fef4056ebad324d2b5d android.hardware.camera.device@3.4::types
 291638a1b6d4e63283e9e722ab5049d9351717ffa2b66162124f84d1aa7c2835 android.hardware.camera.metadata@3.2::types
-8a075cf3a17fe99c6d23415a3e9a65612f1fee73ee052a3a8a0ca5b8877395a4 android.hardware.camera.metadata@3.3::types
+a31142da4cc87ad50e4e981d12291d4decbb432fcb00f175f0ca904d0fcdbe5b android.hardware.camera.metadata@3.3::types
 da33234403ff5d60f3473711917b9948e6484a4260b5247acdafb111193a9de2 android.hardware.configstore@1.0::ISurfaceFlingerConfigs
 21165b8e30c4b2d52980e4728f661420adc16e38bbe73476c06b2085be908f4c android.hardware.gnss@1.0::IGnssCallback
 d702fb01dc2a0733aa820b7eb65435ee3334f75632ef880bafd2fb8803a20a58 android.hardware.gnss@1.0::IGnssMeasurementCallback
+7c7721c0f773fcf422b71a4f558545e9e36acc973e58ca51e5bd53905cf46bc0 android.hardware.graphics.bufferqueue@1.0::IGraphicBufferProducer
+d4fea995378bb4f421b4e24ccf68cad2734ab07fe4f874a126ba558b99df5766 android.hardware.graphics.composer@2.1::IComposerClient
 b7ecf29927055ec422ec44bf776223f07d79ad9f92ccf9becf167e62c2607e7a android.hardware.keymaster@4.0::IKeymasterDevice
 574e8f1499436fb4075894dcae0b36682427956ecb114f17f1fe22d116a83c6b android.hardware.neuralnetworks@1.0::IPreparedModel
 417ab60fe1ef786778047e4486f3d868ebce570d91addd8fe4251515213072de android.hardware.neuralnetworks@1.0::types
@@ -418,7 +420,7 @@
 9471b12b1c255bb530695720bc4174bd74987b75b1f820854af8944bc8c215c9 android.hardware.audio@5.0::IStreamOut
 1b0500367ed2b32a841667ac3200edf3d3a164e8004aca445ff1b085ac831e93 android.hardware.audio@5.0::IStreamOutCallback
 83e365479cc77d8717c155e1787ee668cd2ae4c557b467cf75b8e7cd53697ad8 android.hardware.audio@5.0::types
-894af04bebfe7da5b6791eefeb6eb3627da63d5efea735f16876d11d8ca4f61d android.hardware.audio.common@5.0::types
+c25ae57a9197fdf83aa6f7b31ab1ac4922dea4f19f92cdb1f9013ad49fa56594 android.hardware.audio.common@5.0::types
 f269297866765b95ddd1825676cc8a772f0c7c9863286df596fc302781a42ff5 android.hardware.audio.effect@5.0::IAcousticEchoCancelerEffect
 fa187b602d8939644ef708ed7627f2e3deac97899a4bda1de07f2ff126abe243 android.hardware.audio.effect@5.0::IAutomaticGainControlEffect
 e1bf864ccb8458c0da1dcc74a2e748b1dca8ac360df590591cf82d98292d7981 android.hardware.audio.effect@5.0::IBassBoostEffect
@@ -434,9 +436,9 @@
 443659bb9e27221e5da0d16c7a0ecb2dc3a9a03acc8a0b2196b47c50735e2d2e android.hardware.audio.effect@5.0::IVirtualizerEffect
 78fed26a781cdca1b3bcb37520bff705d7764ee81db9cfd37014953c7ad2596e android.hardware.audio.effect@5.0::IVisualizerEffect
 6385b6accab8a544e2ee54ba7bf5aa55dff6153bcedd80fdaae16fe9e0be7050 android.hardware.audio.effect@5.0::types
-2f11e4c10ebe2b600426e0695f3c720d21663501c1c9449537055f13f37600d3 android.hardware.biometrics.face@1.0::IBiometricsFace
-dfb0666af59eb306c82a6f576c65a160e6829d3324211a10429fd63768df70df android.hardware.biometrics.face@1.0::IBiometricsFaceClientCallback
-cc40d308f38b6a218fcf99f264ebb49544fce670a6abdf294c617357a3d83dad android.hardware.biometrics.face@1.0::types
+baf5a0cbf357035394be02d87334890228338fae715f7ab06e2f0e7d05abe656 android.hardware.biometrics.face@1.0::IBiometricsFace
+6cbf288d6e6a9f6f0c09d1cde66318aa5b6a8c525778a61ccaedddb090f5e9cb android.hardware.biometrics.face@1.0::IBiometricsFaceClientCallback
+ef5d339413d0c94a5b58baafbe3e4bccfd9ed2e7328fbbb5c25471c79923ed2f android.hardware.biometrics.face@1.0::types
 ecedc58dbcdb13503c19c0ab160ac1dd0530bb1471164149282dd1463c684185 android.hardware.bluetooth.audio@2.0::IBluetoothAudioPort
 fb9c40e4deab40be5476477078fe3d8a4a4495fd9deef4321878d169d675c633 android.hardware.bluetooth.audio@2.0::IBluetoothAudioProvider
 f7431f3e3e4e3387fc6f27a6cf423eddcd824a395dc4349d302c995ab44a9895 android.hardware.bluetooth.audio@2.0::IBluetoothAudioProvidersFactory
@@ -444,15 +446,13 @@
 09ab9b24994429d9bb32a3fb420b6f6be3e47eb655139a2c08c4e80d3f33ff95 android.hardware.camera.device@3.5::ICameraDevice
 06237de53c42890029e3f8fe7d1480d078469c0d07608e51c37b4d485d342992 android.hardware.camera.device@3.5::ICameraDeviceCallback
 08c68b196e2fc4e5ba67ba0d0917bde828a87cbe2cffec19d04733972da9eb49 android.hardware.camera.device@3.5::ICameraDeviceSession
-acaba39216973e58949f50978762bcda1c29f5f7e0bca3e08db21f0767356130 android.hardware.camera.device@3.5::types
+a848f7cb3cb3d080cf175bf08412322bfddb535168253796cdf777afdbf05b38 android.hardware.camera.device@3.5::types
 74ec7732fdacb22292c907b49f8f933510851ea1b3ed195c4dcdff35a20387f5 android.hardware.camera.metadata@3.4::types
 0fb39a7809ad1c52b3efbbed5ef4749b06c2a4f1f19cdc3efa2e3d9b28f1205c android.hardware.camera.provider@2.5::ICameraProvider
 f5777403d65135a5407723671bc7a864cdca83aea13ee3ce2894b95e6588ca3a android.hardware.camera.provider@2.5::types
 44c88954b3c201b26f64fcdb6f278024ab3aae864a9e1ec70e8a74274ae9d6aa android.hardware.cas@1.1::ICas
 25012d1778f7396f967bbc0231397d544bde421ba5b98706c9e48ac790612683 android.hardware.cas@1.1::ICasListener
 dffacdbe0bcf8443013de5bdc56a83479ad979d4919ed15a5585539f46091f07 android.hardware.cas@1.1::IMediaCasService
-bc742c6b17c834010f90c06ce2939c845198eecd2706be18da99e14bceb2acc0 android.hardware.configstore@1.2::ISurfaceFlingerConfigs
-aadac6b9fcf660384d73cbb97f3732ff9eeb8e8c67001e3fdbf4add108e5b1dc android.hardware.configstore@1.2::types
 5b1f4a4fb88c239e07d76026467a1f2ee0d08f4d52c1805bd93bd7c05e3fe69c android.hardware.drm@1.2::ICryptoFactory
 4895f98e9ef210e9acb01982f5d07b654538377e1404b8db5e19e7858835e9d8 android.hardware.drm@1.2::ICryptoPlugin
 976116b9033b2c222b940109fdf0ffcc29b77cbe631ef6b4fcc2ad5ce8e605f7 android.hardware.drm@1.2::IDrmFactory
@@ -465,7 +465,7 @@
 2e5ad983734069e84a760004b32da0d09e4170c05380abe27e6eb80e4aa70d5a android.hardware.gnss@2.0::IAGnssCallback
 1f4ac068a88a72360280d94a7f6fd7c63813c1eea4891a0eb01394d3e7e775f2 android.hardware.gnss@2.0::IAGnssRil
 6e2f9a44375a0ae0b49ca7d711cb88945189d398535078408269e1e85889061d android.hardware.gnss@2.0::IGnss
-54d253b10c7da2a4a708d11acda3118b283df1540bc10323a5a3773c94cc8e71 android.hardware.gnss@2.0::IGnssCallback
+d815623a6d1ba4abf21248b84eca70a2bfab03058a88b68a29c063ce8aee6b5c android.hardware.gnss@2.0::IGnssCallback
 ecc966c68bddbd95c8dae782b84204cf01c75734675e8769963f3b5106ec128b android.hardware.gnss@2.0::IGnssConfiguration
 c67759f5d6387d273b66729180d03690e827f0b6b8d4e13ce2ff42d31b224065 android.hardware.gnss@2.0::IGnssMeasurement
 089338944c45f66f25ba4ee958c161c42fefeb73ec60e4451f3535a1b3fd10c7 android.hardware.gnss@2.0::IGnssMeasurementCallback
@@ -480,7 +480,7 @@
 01c6398c90fc6be0640810e2c5d8a4863b457280132bb3f97dd5682e19632b62 android.hardware.graphics.bufferqueue@2.0::types
 7a2d64095252f85781b2d521f4f11d04ce774544feececcec2088c568656e93c android.hardware.graphics.common@1.2::types
 3dff04a36b86660b5807414587e530bb0c294ed56fdff06f8915ba0a9b73f974 android.hardware.graphics.composer@2.3::IComposer
-ed0cf91532e88dff073cf7f45b9c65ee1c88553ebcb97892f7b7072abb9b822a android.hardware.graphics.composer@2.3::IComposerClient
+54bc1dc874f8bc0781767786075dafd33a0796c1eea7d2317231b8929280e946 android.hardware.graphics.composer@2.3::IComposerClient
 5c8bf8e1af9efe225a4661db8c08ff1b7e13fdc8ed49f35291bd0b6c9436b8f2 android.hardware.graphics.mapper@3.0::IMapper
 7183d9d9acfa41a61a64bdfed548e98299265a7bb1821a3ed204173b5c2cfd4a android.hardware.graphics.mapper@3.0::types
 c3f831a66d5815baf74f5b82fe79cf099542ddae4dfab3f388e1d41828e794fc android.hardware.health.storage@1.0::IGarbageCollectCallback
@@ -493,7 +493,7 @@
 aee53b2865b4f7939fb3df6fae758d9750c14f93dd454b479fc74aa7978fda4f android.hardware.media.bufferpool@2.0::IConnection
 0bf3758eeeb05767830ea87041214be80968c4679fb73577ac5b3091841ee71f android.hardware.media.bufferpool@2.0::IObserver
 82255e252ae215382473ad2e5ac7a2814a439a24f0092551aad7a2f89c6e9546 android.hardware.media.bufferpool@2.0::types
-fd4725732511b8ae124b868fd0b2090386663dffc5e67dfd0d0b4a0b49c335db android.hardware.media.c2@1.0::IComponent
+277161ea99236a0858e9fcc021c357db03be2de500acf5701d125e73e3e8071a android.hardware.media.c2@1.0::IComponent
 389d06e4a4ecf60f828a260045b0c327a5ae883ee0856a3c054556dd22b1f450 android.hardware.media.c2@1.0::IComponentInterface
 5ee0c02265c5505ade189796bef46697df4e0563e3544bb0c934855b34694b07 android.hardware.media.c2@1.0::IComponentListener
 43d70bcdc63b3d042bac3c3297f5d941dfabbd08f3ceb96b6016cc14f6e34ba3 android.hardware.media.c2@1.0::IComponentStore
@@ -508,19 +508,19 @@
 92714960d1a53fc2ec557302b41c7cc93d2636d8364a44bd0f85be0c92927ff8 android.hardware.neuralnetworks@1.2::IExecutionCallback
 83885d366f22ada42c00d8854f0b7e7ba4cf73ddf80bb0d8e168ce132cec57ea android.hardware.neuralnetworks@1.2::IPreparedModel
 e1c734d1545e1a4ae749ff1dd9704a8e594c59aea7c8363159dc258e93e0df3b android.hardware.neuralnetworks@1.2::IPreparedModelCallback
-769f8650631eef7a3ceedc8cf130f4b99eb52fe698a11609d55de32985a3dddf android.hardware.neuralnetworks@1.2::types
+896d1827541d620996720a79c6476edb902a58d515bf908f67a5bdef4d2c318c android.hardware.neuralnetworks@1.2::types
 cf7a4ba516a638f9b82a249c91fb603042c2d9ca43fd5aad9cf6c0401ed2a5d7 android.hardware.nfc@1.2::INfc
 abf98c2ae08bf765db54edc8068e36d52eb558cff6706b6fd7c18c65a1f3fc18 android.hardware.nfc@1.2::types
 4cb252dc6372a874aef666b92a6e9529915aa187521a700f0789065c3c702ead android.hardware.power.stats@1.0::IPowerStats
 2043037d5baaff604805757d06979aa861013a1e87430db745265339a8681f79 android.hardware.power.stats@1.0::types
-d5545a4090e5cf8b7f844121377d580926cb9137d693d8c66772ef99ca23e514 android.hardware.radio@1.3::IRadio
+a1c6b0761bcb89d6bf15a156f9306b8090b3a916a15fea1689b4b0c1738e382f android.hardware.radio@1.3::IRadio
 e9d0f11a52715f5a29d89e2d8e2e21db1e16a43174af6b9d51a62d705cda1455 android.hardware.radio@1.3::IRadioIndication
 d233f0da44f55fdef0a95db5229231412787bb67695cd1ea197ce89a3c2908b9 android.hardware.radio@1.3::IRadioResponse
 750a363c8cec70baa1aac19e275c15233c5898e93c6bb5155fa2ca7f365490dc android.hardware.radio@1.3::types
-4ac73ec1e4cfa535209e5e22547f08beb20ef812b4a29d0824780f52cbe2324d android.hardware.radio@1.4::IRadio
+ef4ab741f7e7762fb45e2e24ca83871f72006ce05f57aa9addc574893dd29872 android.hardware.radio@1.4::IRadio
 33d9e6895cca98aa56296bb01720d18b8acd0e4de4960beb712e63ad147438a5 android.hardware.radio@1.4::IRadioIndication
 0cc0dd87c634aad36d7df22b2832839ef7ded71909dbcde11cfdd69dc0dc52b8 android.hardware.radio@1.4::IRadioResponse
-29d34232cc3974626b08759e039fe788bded7695cdeb098458e3e11e4c7d3603 android.hardware.radio@1.4::types
+22091ad1f6cb6da1c7c1467e6412c9c1ae577b3ecc0c3e5047fc4b50cdd60c69 android.hardware.radio@1.4::types
 51e696c0ceff30f74da8ff8d02fe4522ffd2f4a04cdfdbca0c68bfa64fcd306b android.hardware.radio.config@1.1::IRadioConfig
 7fcf167f593b10c67b59ab70321781c26a5575eab60803e7cbb1c14c71085a3b android.hardware.radio.config@1.1::IRadioConfigIndication
 b42eb3bbd5e7b519e28362340c2205aa75356de6b30f4fd09ec2ea784f250ab0 android.hardware.radio.config@1.1::IRadioConfigResponse
diff --git a/drm/1.0/Android.bp b/drm/1.0/Android.bp
index aca5ae4..fea851f 100644
--- a/drm/1.0/Android.bp
+++ b/drm/1.0/Android.bp
@@ -17,22 +17,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "BufferType",
-        "DestinationBuffer",
-        "EventType",
-        "KeyRequestType",
-        "KeyStatus",
-        "KeyStatusType",
-        "KeyType",
-        "KeyValue",
-        "Mode",
-        "Pattern",
-        "SecureStop",
-        "SharedBuffer",
-        "Status",
-        "SubSample",
-    ],
     gen_java: false,
 }
 
diff --git a/drm/1.1/Android.bp b/drm/1.1/Android.bp
index dba3e42..739b470 100644
--- a/drm/1.1/Android.bp
+++ b/drm/1.1/Android.bp
@@ -16,13 +16,6 @@
         "android.hardware.drm@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "DrmMetricGroup",
-        "HdcpLevel",
-        "KeyRequestType",
-        "SecureStopRelease",
-        "SecurityLevel",
-    ],
     gen_java: false,
 }
 
diff --git a/drm/1.2/Android.bp b/drm/1.2/Android.bp
index 4e0e8ba..2d54302 100644
--- a/drm/1.2/Android.bp
+++ b/drm/1.2/Android.bp
@@ -19,11 +19,6 @@
         "android.hardware.drm@1.1",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "HdcpLevel",
-        "OfflineLicenseState",
-        "Status",
-    ],
     gen_java: false,
 }
 
diff --git a/drm/1.2/vts/functional/Android.bp b/drm/1.2/vts/functional/Android.bp
new file mode 100644
index 0000000..6b4a4c0
--- /dev/null
+++ b/drm/1.2/vts/functional/Android.bp
@@ -0,0 +1,40 @@
+//
+// Copyright (C) 2019 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+cc_test {
+    name: "VtsHalDrmV1_2TargetTest",
+    defaults: ["VtsHalTargetTestDefaults"],
+    srcs: [
+        "drm_hal_clearkey_module.cpp",
+        "drm_hal_common.cpp",
+        "drm_hal_test.cpp",
+        "vendor_modules.cpp",
+    ],
+    include_dirs: ["hardware/interfaces/drm/1.0/vts/functional"],
+    static_libs: [
+        "android.hardware.drm@1.0",
+        "android.hardware.drm@1.1",
+        "android.hardware.drm@1.2",
+        "android.hardware.drm@1.0-helper",
+        "android.hidl.allocator@1.0",
+        "android.hidl.memory@1.0",
+        "libhidlmemory",
+        "libnativehelper",
+        "libssl",
+        "libcrypto",
+    ],
+    test_suites: ["general-tests"],
+}
diff --git a/drm/1.2/vts/functional/drm_hal_clearkey_module.cpp b/drm/1.2/vts/functional/drm_hal_clearkey_module.cpp
new file mode 100644
index 0000000..a0dc001
--- /dev/null
+++ b/drm/1.2/vts/functional/drm_hal_clearkey_module.cpp
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "drm_hal_clearkey_module@1.2"
+
+#include <gtest/gtest.h>
+#include "drm_hal_clearkey_module.h"
+
+namespace android {
+namespace hardware {
+namespace drm {
+namespace V1_2 {
+namespace vts {
+
+std::vector<uint8_t> DrmHalVTSClearkeyModule::handleProvisioningRequest(
+        const std::vector<uint8_t>& /*provisioningRequest*/,
+        const std::string& /*url*/) {
+    EXPECT_TRUE(false) << "Clearkey doesn't support provisioning";
+    return {};
+}
+
+std::vector<DrmHalVTSClearkeyModule::ContentConfiguration>
+        DrmHalVTSClearkeyModule::getContentConfigurations() const {
+    DrmHalVTSClearkeyModule::ContentConfiguration conf = {
+        .name = "DrmHalVTSClearkeyModule", // name
+        .serverUrl = "", // serverUrl
+        .initData = { // initData
+            // BMFF box header (4 bytes size + 'pssh')
+            0x00, 0x00, 0x00, 0x34, 0x70, 0x73, 0x73, 0x68,
+            // full box header (version = 1 flags = 0)
+            0x01, 0x00, 0x00, 0x00,
+            // system id
+            0x10, 0x77, 0xef, 0xec, 0xc0, 0xb2, 0x4d, 0x02, 0xac, 0xe3, 0x3c,
+            0x1e, 0x52, 0xe2, 0xfb, 0x4b,
+            // number of key ids
+            0x00, 0x00, 0x00, 0x01,
+            // key id
+            0x60, 0x06, 0x1e, 0x01, 0x7e, 0x47, 0x7e, 0x87, 0x7e, 0x57, 0xd0,
+            0x0d, 0x1e, 0xd0, 0x0d, 0x1e,
+            // size of data, must be zero
+            0x00, 0x00, 0x00, 0x00
+        },
+        .mimeType = "video/mp4", // mimeType
+        .optionalParameters = {}, // optionalParameters
+        .policy = { .allowOffline = true }, // allowOffline
+        .keys = { // keys
+            {
+                .isSecure = false, // isSecure
+                .keyId = { // keyId
+                    0x60, 0x06, 0x1e, 0x01, 0x7e, 0x47, 0x7e, 0x87,
+                    0x7e, 0x57, 0xd0, 0x0d, 0x1e, 0xd0, 0x0d, 0x1e
+                },
+                .clearContentKey = { // clearContentKey
+                    0x1a, 0x8a, 0x20, 0x95, 0xe4, 0xde, 0xb2, 0xd2,
+                    0x9e, 0xc8, 0x16, 0xac, 0x7b, 0xae, 0x20, 0x82
+                }
+            }
+        }
+    };
+    return { conf };
+}
+
+std::vector<uint8_t> DrmHalVTSClearkeyModule::handleKeyRequest(
+        const std::vector<uint8_t>& keyRequest,
+        const std::string& /*serverUrl*/) {
+
+    // {"kids":["YAYeAX5Hfod-V9ANHtANHg"],"type":"temporary"}
+    std::vector<uint8_t> expectedKeyRequest = {
+        0x7b, 0x22, 0x6b, 0x69, 0x64, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x59, 0x41, 0x59, 0x65,
+        0x41, 0x58, 0x35, 0x48, 0x66, 0x6f, 0x64, 0x2d, 0x56, 0x39, 0x41, 0x4e, 0x48, 0x74,
+        0x41, 0x4e, 0x48, 0x67, 0x22, 0x5d, 0x2c, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a,
+        0x22, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x22, 0x7d};
+
+    // {"kids":["YAYeAX5Hfod-V9ANHtANHg"],"type":"persistent-license"}
+    std::vector<uint8_t> expectedKeyRequestPersistent = {
+        0x7b, 0x22, 0x6b, 0x69, 0x64, 0x73, 0x22, 0x3a, 0x5b, 0x22, 0x59, 0x41, 0x59, 0x65,
+        0x41, 0x58, 0x35, 0x48, 0x66, 0x6f, 0x64, 0x2d, 0x56, 0x39, 0x41, 0x4e, 0x48, 0x74,
+        0x41, 0x4e, 0x48, 0x67, 0x22, 0x5d, 0x2c, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a,
+        0x22, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69,
+        0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x7d};
+
+    // {"keys":[{"kty":"oct","kid":"YAYeAX5Hfod-V9ANHtANHg","k":"GoogleTestKeyBase64ggg"}]}
+    std::vector<uint8_t> knownKeyResponse = {
+        0x7b, 0x22, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x6b, 0x74, 0x79, 0x22,
+        0x3a, 0x22, 0x6f, 0x63, 0x74, 0x22, 0x2c, 0x22, 0x6b, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x59,
+        0x41, 0x59, 0x65, 0x41, 0x58, 0x35, 0x48, 0x66, 0x6f, 0x64, 0x2d, 0x56, 0x39, 0x41, 0x4e,
+        0x48, 0x74, 0x41, 0x4e, 0x48, 0x67, 0x22, 0x2c, 0x22, 0x6b, 0x22, 0x3a, 0x22, 0x47, 0x6f,
+        0x6f, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x42, 0x61, 0x73, 0x65,
+        0x36, 0x34, 0x67, 0x67, 0x67, 0x22, 0x7d, 0x5d, 0x7d};
+
+    // {"keys":[{"kty":"oct","kid":"YAYeAX5Hfod-V9ANHtANHg","k":"GoogleTestKeyBase64ggg"}],"type":"persistent-license"}
+    std::vector<uint8_t> knownKeyResponsePersistent = {
+        0x7b, 0x22, 0x6b, 0x65, 0x79, 0x73, 0x22, 0x3a, 0x5b, 0x7b, 0x22, 0x6b, 0x74, 0x79, 0x22,
+        0x3a, 0x22, 0x6f, 0x63, 0x74, 0x22, 0x2c, 0x22, 0x6b, 0x69, 0x64, 0x22, 0x3a, 0x22, 0x59,
+        0x41, 0x59, 0x65, 0x41, 0x58, 0x35, 0x48, 0x66, 0x6f, 0x64, 0x2d, 0x56, 0x39, 0x41, 0x4e,
+        0x48, 0x74, 0x41, 0x4e, 0x48, 0x67, 0x22, 0x2c, 0x22, 0x6b, 0x22, 0x3a, 0x22, 0x47, 0x6f,
+        0x6f, 0x67, 0x6c, 0x65, 0x54, 0x65, 0x73, 0x74, 0x4b, 0x65, 0x79, 0x42, 0x61, 0x73, 0x65,
+        0x36, 0x34, 0x67, 0x67, 0x67, 0x22, 0x7d, 0x5d, 0x2c, 0x22, 0x74, 0x79, 0x70, 0x65, 0x22,
+        0x3a, 0x22, 0x70, 0x65, 0x72, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x6c, 0x69,
+        0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x7d};
+
+    std::string req(keyRequest.begin(), keyRequest.end());
+    if (req.find("persistent-license") != std::string::npos) {
+        EXPECT_EQ(expectedKeyRequestPersistent, keyRequest);
+        return knownKeyResponsePersistent;
+    } else {
+        EXPECT_EQ(expectedKeyRequest, keyRequest);
+        return knownKeyResponse;
+    }
+
+}
+
+}  // namespace vts
+}  // namespace V1_2
+}  // namespace drm
+}  // namespace hardware
+}  // namespace android
diff --git a/drm/1.2/vts/functional/drm_hal_clearkey_module.h b/drm/1.2/vts/functional/drm_hal_clearkey_module.h
new file mode 100644
index 0000000..7250cf2
--- /dev/null
+++ b/drm/1.2/vts/functional/drm_hal_clearkey_module.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef DRM_HAL_CLEARKEY_MODULE_H
+#define DRM_HAL_CLEARKEY_MODULE_H
+
+#include "drm_hal_vendor_module_api.h"
+
+namespace android {
+namespace hardware {
+namespace drm {
+namespace V1_2 {
+namespace vts {
+
+class DrmHalVTSClearkeyModule : public DrmHalVTSVendorModule_V1 {
+   public:
+    DrmHalVTSClearkeyModule() {}
+    virtual ~DrmHalVTSClearkeyModule() {}
+
+    virtual uint32_t getAPIVersion() const override { return 1; }
+
+    virtual std::string getServiceName() const override { return "clearkey"; }
+
+    virtual std::vector<uint8_t> getUUID() const override {
+        return {0xE2, 0x71, 0x9D, 0x58, 0xA9, 0x85, 0xB3, 0xC9,
+                0x78, 0x1A, 0xB0, 0x30, 0xAF, 0x78, 0xD3, 0x0E };
+    }
+
+
+    virtual std::vector<uint8_t> handleProvisioningRequest(
+            const std::vector<uint8_t>& provisioningRequest,
+            const std::string& url) override;
+
+    virtual std::vector<DrmHalVTSClearkeyModule::ContentConfiguration>
+            getContentConfigurations() const override;
+
+    virtual std::vector<uint8_t> handleKeyRequest(
+            const std::vector<uint8_t>& keyRequest,
+            const std::string& serverUrl) override;
+};
+
+}  // namespace vts
+}  // namespace V1_2
+}  // namespace drm
+}  // namespace hardware
+}  // namespace android
+
+#endif  // DRM_HAL_CLEARKEY_MODULE_H
diff --git a/drm/1.2/vts/functional/drm_hal_common.cpp b/drm/1.2/vts/functional/drm_hal_common.cpp
new file mode 100644
index 0000000..b9a8425
--- /dev/null
+++ b/drm/1.2/vts/functional/drm_hal_common.cpp
@@ -0,0 +1,483 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "drm_hal_common@1.2"
+
+#include <android/hidl/allocator/1.0/IAllocator.h>
+#include <gtest/gtest.h>
+#include <hidl/HidlSupport.h>
+#include <hidlmemory/mapping.h>
+#include <log/log.h>
+#include <openssl/aes.h>
+#include <random>
+
+#include "drm_hal_clearkey_module.h"
+#include "drm_hal_common.h"
+
+using ::android::hardware::drm::V1_0::BufferType;
+using ::android::hardware::drm::V1_0::DestinationBuffer;
+using ICryptoPluginV1_0 = ::android::hardware::drm::V1_0::ICryptoPlugin;
+using IDrmPluginV1_0 = ::android::hardware::drm::V1_0::IDrmPlugin;
+using ::android::hardware::drm::V1_0::KeyValue;
+using ::android::hardware::drm::V1_0::SharedBuffer;
+using StatusV1_0 = ::android::hardware::drm::V1_0::Status;
+
+using ::android::hardware::drm::V1_1::KeyRequestType;
+
+using ::android::hardware::drm::V1_2::KeySetId;
+using ::android::hardware::drm::V1_2::OfflineLicenseState;
+using StatusV1_2 = ::android::hardware::drm::V1_2::Status;
+
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_memory;
+
+using ::android::hidl::allocator::V1_0::IAllocator;
+
+using std::random_device;
+using std::mt19937;
+
+namespace android {
+namespace hardware {
+namespace drm {
+namespace V1_2 {
+namespace vts {
+
+const char *kCallbackLostState = "LostState";
+
+drm_vts::VendorModules *DrmHalTest::gVendorModules = nullptr;
+
+/**
+ * DrmHalPluginListener
+ */
+
+Return<void> DrmHalPluginListener::sendSessionLostState(const hidl_vec<uint8_t>& sessionId) {
+    NotifyFromCallback(kCallbackLostState, sessionId);
+    return Void();
+}
+
+/**
+ * DrmHalTest
+ */
+
+DrmHalTest::DrmHalTest()
+    : vendorModule(GetParam() == "clearkey"
+            ? new DrmHalVTSClearkeyModule()
+            : static_cast<DrmHalVTSVendorModule_V1*>(gVendorModules->getModule(GetParam()))),
+      contentConfigurations(vendorModule->getContentConfigurations()) {
+}
+
+void DrmHalTest::SetUp() {
+    const ::testing::TestInfo* const test_info =
+            ::testing::UnitTest::GetInstance()->current_test_info();
+
+    ALOGD("Running test %s.%s from (vendor) module %s",
+          test_info->test_case_name(), test_info->name(),
+          GetParam().c_str());
+
+    string name = vendorModule->getServiceName();
+    drmFactory = VtsHalHidlTargetTestBase::getService<IDrmFactory>(name);
+    if (drmFactory == nullptr) {
+        drmFactory = VtsHalHidlTargetTestBase::getService<IDrmFactory>();
+    }
+    if (drmFactory != nullptr) {
+        drmPlugin = createDrmPlugin();
+    }
+
+    cryptoFactory = VtsHalHidlTargetTestBase::getService<ICryptoFactory>(name);
+    if (cryptoFactory == nullptr) {
+        cryptoFactory = VtsHalHidlTargetTestBase::getService<ICryptoFactory>();
+    }
+    if (cryptoFactory != nullptr) {
+        cryptoPlugin = createCryptoPlugin();
+    }
+
+    // If drm scheme not installed skip subsequent tests
+    if (!drmFactory->isCryptoSchemeSupported(getVendorUUID())) {
+        vendorModule->setInstalled(false);
+        return;
+    }
+
+    ASSERT_NE(nullptr, drmPlugin.get()) << "Can't find " << vendorModule->getServiceName() <<  " drm@1.2 plugin";
+    ASSERT_NE(nullptr, cryptoPlugin.get()) << "Can't find " << vendorModule->getServiceName() <<  " crypto@1.2 plugin";
+
+}
+
+sp<IDrmPlugin> DrmHalTest::createDrmPlugin() {
+    if (drmFactory == nullptr) {
+        return nullptr;
+    }
+    sp<IDrmPlugin> plugin = nullptr;
+    hidl_string packageName("android.hardware.drm.test");
+    auto res = drmFactory->createPlugin(
+            getVendorUUID(), packageName,
+                    [&](StatusV1_0 status, const sp<IDrmPluginV1_0>& pluginV1_0) {
+                EXPECT_EQ(StatusV1_0::OK, status);
+                plugin = IDrmPlugin::castFrom(pluginV1_0);
+            });
+
+    if (!res.isOk()) {
+        ALOGE("createDrmPlugin remote call failed");
+    }
+    return plugin;
+}
+
+sp<ICryptoPlugin> DrmHalTest::createCryptoPlugin() {
+    if (cryptoFactory == nullptr) {
+        return nullptr;
+    }
+    sp<ICryptoPlugin> plugin = nullptr;
+    hidl_vec<uint8_t> initVec;
+    auto res = cryptoFactory->createPlugin(
+            getVendorUUID(), initVec,
+                    [&](StatusV1_0 status, const sp<ICryptoPluginV1_0>& pluginV1_0) {
+                EXPECT_EQ(StatusV1_0::OK, status);
+                plugin = ICryptoPlugin::castFrom(pluginV1_0);
+            });
+    if (!res.isOk()) {
+        ALOGE("createCryptoPlugin remote call failed");
+    }
+    return plugin;
+}
+
+hidl_array<uint8_t, 16> DrmHalTest::getVendorUUID() {
+    vector<uint8_t> uuid = vendorModule->getUUID();
+    return hidl_array<uint8_t, 16>(&uuid[0]);
+}
+
+/**
+ * Helper method to open a session and verify that a non-empty
+ * session ID is returned
+ */
+SessionId DrmHalTest::openSession() {
+    SessionId sessionId;
+
+    auto res = drmPlugin->openSession([&](StatusV1_0 status, const hidl_vec<unsigned char> &id) {
+        EXPECT_EQ(StatusV1_0::OK, status);
+        EXPECT_NE(id.size(), 0u);
+        sessionId = id;
+    });
+    EXPECT_OK(res);
+    return sessionId;
+}
+
+/**
+ * Helper method to close a session
+ */
+void DrmHalTest::closeSession(const SessionId& sessionId) {
+    StatusV1_0 status = drmPlugin->closeSession(sessionId);
+    EXPECT_EQ(StatusV1_0::OK, status);
+}
+
+hidl_vec<uint8_t> DrmHalTest::getKeyRequest(
+    const SessionId& sessionId,
+    const DrmHalVTSVendorModule_V1::ContentConfiguration& configuration,
+    const KeyType& type = KeyType::STREAMING) {
+    hidl_vec<uint8_t> keyRequest;
+    auto res = drmPlugin->getKeyRequest_1_2(
+        sessionId, configuration.initData, configuration.mimeType, type,
+        toHidlKeyedVector(configuration.optionalParameters),
+        [&](Status status, const hidl_vec<uint8_t>& request,
+            KeyRequestType requestType, const hidl_string&) {
+            EXPECT_EQ(Status::OK, status) << "Failed to get "
+                                             "key request for configuration "
+                                          << configuration.name;
+            if (type == KeyType::RELEASE) {
+                EXPECT_EQ(KeyRequestType::RELEASE, requestType);
+            } else {
+                EXPECT_EQ(KeyRequestType::INITIAL, requestType);
+            }
+            EXPECT_NE(request.size(), 0u) << "Expected key request size"
+                                             " to have length > 0 bytes";
+            keyRequest = request;
+        });
+    EXPECT_OK(res);
+    return keyRequest;
+}
+
+DrmHalVTSVendorModule_V1::ContentConfiguration DrmHalTest::getContent(const KeyType& type) const {
+    for (const auto& config : contentConfigurations) {
+        if (type != KeyType::OFFLINE || config.policy.allowOffline) {
+            return config;
+        }
+    }
+    EXPECT_TRUE(false) << "no content configurations found";
+    return {};
+}
+
+hidl_vec<uint8_t> DrmHalTest::provideKeyResponse(
+    const SessionId& sessionId,
+    const hidl_vec<uint8_t>& keyResponse) {
+    hidl_vec<uint8_t> keySetId;
+    auto res = drmPlugin->provideKeyResponse(
+        sessionId, keyResponse,
+        [&](StatusV1_0 status, const hidl_vec<uint8_t>& myKeySetId) {
+            EXPECT_EQ(StatusV1_0::OK, status) << "Failure providing "
+                                                 "key response for configuration ";
+            keySetId = myKeySetId;
+        });
+    EXPECT_OK(res);
+    return keySetId;
+}
+
+/**
+ * Helper method to load keys for subsequent decrypt tests.
+ * These tests use predetermined key request/response to
+ * avoid requiring a round trip to a license server.
+ */
+hidl_vec<uint8_t> DrmHalTest::loadKeys(
+    const SessionId& sessionId,
+    const DrmHalVTSVendorModule_V1::ContentConfiguration& configuration,
+    const KeyType& type) {
+    hidl_vec<uint8_t> keyRequest = getKeyRequest(sessionId, configuration, type);
+
+    /**
+     * Get key response from vendor module
+     */
+    hidl_vec<uint8_t> keyResponse =
+        vendorModule->handleKeyRequest(keyRequest, configuration.serverUrl);
+    EXPECT_NE(keyResponse.size(), 0u) << "Expected key response size "
+                                         "to have length > 0 bytes";
+
+    return provideKeyResponse(sessionId, keyResponse);
+}
+
+hidl_vec<uint8_t> DrmHalTest::loadKeys(
+        const SessionId& sessionId,
+        const KeyType& type) {
+    return loadKeys(sessionId, getContent(type), type);
+}
+
+KeyedVector DrmHalTest::toHidlKeyedVector(
+    const map<string, string>& params) {
+    std::vector<KeyValue> stdKeyedVector;
+    for (auto it = params.begin(); it != params.end(); ++it) {
+        KeyValue keyValue;
+        keyValue.key = it->first;
+        keyValue.value = it->second;
+        stdKeyedVector.push_back(keyValue);
+    }
+    return KeyedVector(stdKeyedVector);
+}
+
+hidl_array<uint8_t, 16> DrmHalTest::toHidlArray(const vector<uint8_t>& vec) {
+    EXPECT_EQ(16u, vec.size());
+    return hidl_array<uint8_t, 16>(&vec[0]);
+}
+
+/**
+ * getDecryptMemory allocates memory for decryption, then sets it
+ * as a shared buffer base in the crypto hal.  The allocated and
+ * mapped IMemory is returned.
+ *
+ * @param size the size of the memory segment to allocate
+ * @param the index of the memory segment which will be used
+ * to refer to it for decryption.
+ */
+sp<IMemory> DrmHalTest::getDecryptMemory(size_t size, size_t index) {
+    sp<IAllocator> ashmemAllocator = IAllocator::getService("ashmem");
+    EXPECT_NE(nullptr, ashmemAllocator.get());
+
+    hidl_memory hidlMemory;
+    auto res = ashmemAllocator->allocate(
+            size, [&](bool success, const hidl_memory& memory) {
+                EXPECT_EQ(success, true);
+                EXPECT_EQ(memory.size(), size);
+                hidlMemory = memory;
+            });
+
+    EXPECT_OK(res);
+
+    sp<IMemory> mappedMemory = mapMemory(hidlMemory);
+    EXPECT_NE(nullptr, mappedMemory.get());
+    res = cryptoPlugin->setSharedBufferBase(hidlMemory, index);
+    EXPECT_OK(res);
+    return mappedMemory;
+}
+
+void DrmHalTest::fillRandom(const sp<IMemory>& memory) {
+    random_device rd;
+    mt19937 rand(rd());
+    for (size_t i = 0; i < memory->getSize() / sizeof(uint32_t); i++) {
+        auto p = static_cast<uint32_t*>(
+                static_cast<void*>(memory->getPointer()));
+        p[i] = rand();
+    }
+}
+
+uint32_t DrmHalTest::decrypt(Mode mode, bool isSecure,
+        const hidl_array<uint8_t, 16>& keyId, uint8_t* iv,
+        const hidl_vec<SubSample>& subSamples, const Pattern& pattern,
+        const vector<uint8_t>& key, StatusV1_2 expectedStatus) {
+    const size_t kSegmentIndex = 0;
+
+    uint8_t localIv[AES_BLOCK_SIZE];
+    memcpy(localIv, iv, AES_BLOCK_SIZE);
+
+    size_t totalSize = 0;
+    for (size_t i = 0; i < subSamples.size(); i++) {
+        totalSize += subSamples[i].numBytesOfClearData;
+        totalSize += subSamples[i].numBytesOfEncryptedData;
+    }
+
+    // The first totalSize bytes of shared memory is the encrypted
+    // input, the second totalSize bytes (if exists) is the decrypted output.
+    size_t factor = expectedStatus == StatusV1_2::ERROR_DRM_FRAME_TOO_LARGE ? 1 : 2;
+    sp<IMemory> sharedMemory =
+            getDecryptMemory(totalSize * factor, kSegmentIndex);
+
+    const SharedBuffer sourceBuffer = {
+        .bufferId = kSegmentIndex, .offset = 0, .size = totalSize};
+    fillRandom(sharedMemory);
+
+    const DestinationBuffer destBuffer = {.type = BufferType::SHARED_MEMORY,
+                                          {.bufferId = kSegmentIndex,
+                                           .offset = totalSize,
+                                           .size = totalSize},
+                                          .secureMemory = nullptr};
+    const uint64_t offset = 0;
+    uint32_t bytesWritten = 0;
+    auto res = cryptoPlugin->decrypt_1_2(isSecure, keyId, localIv, mode, pattern,
+            subSamples, sourceBuffer, offset, destBuffer,
+            [&](StatusV1_2 status, uint32_t count, string detailedError) {
+                EXPECT_EQ(expectedStatus, status) << "Unexpected decrypt status " <<
+                detailedError;
+                bytesWritten = count;
+            });
+    EXPECT_OK(res);
+
+    if (bytesWritten != totalSize) {
+        return bytesWritten;
+    }
+    uint8_t* base = static_cast<uint8_t*>(
+            static_cast<void*>(sharedMemory->getPointer()));
+
+    // generate reference vector
+    vector<uint8_t> reference(totalSize);
+
+    memcpy(localIv, iv, AES_BLOCK_SIZE);
+    switch (mode) {
+    case Mode::UNENCRYPTED:
+        memcpy(&reference[0], base, totalSize);
+        break;
+    case Mode::AES_CTR:
+        aes_ctr_decrypt(&reference[0], base, localIv, subSamples, key);
+        break;
+    case Mode::AES_CBC:
+        aes_cbc_decrypt(&reference[0], base, localIv, subSamples, key);
+        break;
+    case Mode::AES_CBC_CTS:
+        EXPECT_TRUE(false) << "AES_CBC_CTS mode not supported";
+        break;
+    }
+
+    // compare reference to decrypted data which is at base + total size
+    EXPECT_EQ(0, memcmp(static_cast<void *>(&reference[0]),
+                        static_cast<void*>(base + totalSize), totalSize))
+            << "decrypt data mismatch";
+    return totalSize;
+}
+
+/**
+ * Decrypt a list of clear+encrypted subsamples using the specified key
+ * in AES-CTR mode
+ */
+void DrmHalTest::aes_ctr_decrypt(uint8_t* dest, uint8_t* src,
+        uint8_t* iv, const hidl_vec<SubSample>& subSamples,
+        const vector<uint8_t>& key) {
+    AES_KEY decryptionKey;
+    AES_set_encrypt_key(&key[0], 128, &decryptionKey);
+
+    size_t offset = 0;
+    unsigned int blockOffset = 0;
+    uint8_t previousEncryptedCounter[AES_BLOCK_SIZE];
+    memset(previousEncryptedCounter, 0, AES_BLOCK_SIZE);
+
+    for (size_t i = 0; i < subSamples.size(); i++) {
+        const SubSample& subSample = subSamples[i];
+
+        if (subSample.numBytesOfClearData > 0) {
+            memcpy(dest + offset, src + offset, subSample.numBytesOfClearData);
+            offset += subSample.numBytesOfClearData;
+        }
+
+        if (subSample.numBytesOfEncryptedData > 0) {
+            AES_ctr128_encrypt(src + offset, dest + offset,
+                    subSample.numBytesOfEncryptedData, &decryptionKey,
+                    iv, previousEncryptedCounter, &blockOffset);
+            offset += subSample.numBytesOfEncryptedData;
+        }
+    }
+}
+
+/**
+ * Decrypt a list of clear+encrypted subsamples using the specified key
+ * in AES-CBC mode
+ */
+void DrmHalTest::aes_cbc_decrypt(uint8_t* dest, uint8_t* src,
+        uint8_t* iv, const hidl_vec<SubSample>& subSamples,
+        const vector<uint8_t>& key) {
+    AES_KEY decryptionKey;
+    AES_set_encrypt_key(&key[0], 128, &decryptionKey);
+
+    size_t offset = 0;
+    for (size_t i = 0; i < subSamples.size(); i++) {
+        memcpy(dest + offset, src + offset, subSamples[i].numBytesOfClearData);
+        offset += subSamples[i].numBytesOfClearData;
+
+        AES_cbc_encrypt(src + offset, dest + offset, subSamples[i].numBytesOfEncryptedData,
+                &decryptionKey, iv, 0 /* decrypt */);
+        offset += subSamples[i].numBytesOfEncryptedData;
+    }
+}
+
+/**
+ * Helper method to test decryption with invalid keys is returned
+ */
+void DrmHalClearkeyTest::decryptWithInvalidKeys(
+        hidl_vec<uint8_t>& invalidResponse,
+        vector<uint8_t>& iv,
+        const Pattern& noPattern,
+        const vector<SubSample>& subSamples) {
+    DrmHalVTSVendorModule_V1::ContentConfiguration content = getContent();
+    if (content.keys.empty()) {
+        FAIL() << "no keys";
+    }
+
+    const auto& key = content.keys[0];
+    auto sessionId = openSession();
+    auto res = drmPlugin->provideKeyResponse(
+        sessionId, invalidResponse,
+        [&](StatusV1_0 status, const hidl_vec<uint8_t>& myKeySetId) {
+            EXPECT_EQ(StatusV1_0::OK, status);
+            EXPECT_EQ(0u, myKeySetId.size());
+        });
+    EXPECT_OK(res);
+
+    EXPECT_TRUE(cryptoPlugin->setMediaDrmSession(sessionId).isOk());
+
+    uint32_t byteCount = decrypt(Mode::AES_CTR, key.isSecure,
+            toHidlArray(key.keyId), &iv[0], subSamples, noPattern,
+            key.clearContentKey, Status::ERROR_DRM_NO_LICENSE);
+    EXPECT_EQ(0u, byteCount);
+
+    closeSession(sessionId);
+}
+
+}  // namespace vts
+}  // namespace V1_2
+}  // namespace drm
+}  // namespace hardware
+}  // namespace android
diff --git a/drm/1.2/vts/functional/drm_hal_common.h b/drm/1.2/vts/functional/drm_hal_common.h
new file mode 100644
index 0000000..1b95dde
--- /dev/null
+++ b/drm/1.2/vts/functional/drm_hal_common.h
@@ -0,0 +1,198 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef DRM_HAL_COMMON_H
+#define DRM_HAL_COMMON_H
+
+#include <android/hardware/drm/1.2/ICryptoFactory.h>
+#include <android/hardware/drm/1.2/ICryptoPlugin.h>
+#include <android/hardware/drm/1.2/IDrmFactory.h>
+#include <android/hardware/drm/1.2/IDrmPlugin.h>
+#include <android/hardware/drm/1.2/IDrmPluginListener.h>
+#include <android/hardware/drm/1.2/types.h>
+
+#include <chrono>
+#include <map>
+#include <memory>
+#include <string>
+#include <vector>
+
+#include "drm_hal_vendor_module_api.h"
+#include "vendor_modules.h"
+#include "VtsHalHidlTargetCallbackBase.h"
+#include "VtsHalHidlTargetTestBase.h"
+
+using ::android::hardware::drm::V1_0::EventType;
+using ::android::hardware::drm::V1_0::KeyedVector;
+using ::android::hardware::drm::V1_0::KeyStatus;
+using ::android::hardware::drm::V1_0::KeyType;
+using ::android::hardware::drm::V1_0::Mode;
+using ::android::hardware::drm::V1_0::Pattern;
+using ::android::hardware::drm::V1_0::SessionId;
+using ::android::hardware::drm::V1_0::SubSample;
+
+using ::android::hardware::drm::V1_1::ICryptoFactory;
+
+using ::android::hardware::drm::V1_2::ICryptoPlugin;
+using ::android::hardware::drm::V1_2::IDrmFactory;
+using ::android::hardware::drm::V1_2::IDrmPlugin;
+using ::android::hardware::drm::V1_2::IDrmPluginListener;
+using StatusV1_2 = ::android::hardware::drm::V1_2::Status;
+
+using ::android::hardware::hidl_array;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+
+using ::android::hidl::memory::V1_0::IMemory;
+using ::android::sp;
+
+using ::testing::VtsHalHidlTargetTestBase;
+
+using std::map;
+using std::string;
+using std::unique_ptr;
+using std::vector;
+
+#define EXPECT_OK(ret) EXPECT_TRUE(ret.isOk())
+
+#define RETURN_IF_SKIPPED \
+    if (!vendorModule->isInstalled()) { \
+        std::cout << "[  SKIPPED ] This drm scheme not supported." << \
+                " library:" << GetParam() << " service-name:" << \
+                vendorModule->getServiceName() << std::endl; \
+        return; \
+    }
+
+namespace android {
+namespace hardware {
+namespace drm {
+namespace V1_2 {
+namespace vts {
+
+class DrmHidlEnvironment : public ::testing::VtsHalHidlTargetTestEnvBase {
+   public:
+    // get the test environment singleton
+    static DrmHidlEnvironment* Instance() {
+        static DrmHidlEnvironment* instance = new DrmHidlEnvironment;
+        return instance;
+    }
+
+    void registerTestServices() override {
+        registerTestService<ICryptoFactory>();
+        registerTestService<IDrmFactory>();
+        setServiceCombMode(::testing::HalServiceCombMode::NO_COMBINATION);
+    }
+
+   private:
+    DrmHidlEnvironment() {}
+
+    GTEST_DISALLOW_COPY_AND_ASSIGN_(DrmHidlEnvironment);
+};
+
+class DrmHalTest : public ::testing::TestWithParam<std::string> {
+   public:
+    static drm_vts::VendorModules* gVendorModules;
+    DrmHalTest();
+    virtual void SetUp() override;
+    virtual void TearDown() override {}
+
+   protected:
+    hidl_array<uint8_t, 16> getVendorUUID();
+    SessionId openSession();
+    void closeSession(const SessionId& sessionId);
+    hidl_vec<uint8_t> loadKeys(const SessionId& sessionId,
+                               const KeyType& type = KeyType::STREAMING);
+    hidl_vec<uint8_t> loadKeys(const SessionId& sessionId,
+                               const DrmHalVTSVendorModule_V1::ContentConfiguration&,
+                               const KeyType& type = KeyType::STREAMING);
+    hidl_vec<uint8_t> getKeyRequest(const SessionId& sessionId,
+                               const DrmHalVTSVendorModule_V1::ContentConfiguration&,
+                               const KeyType& type);
+    hidl_vec<uint8_t> provideKeyResponse(const SessionId& sessionId,
+                               const hidl_vec<uint8_t>& keyResponse);
+    DrmHalVTSVendorModule_V1::ContentConfiguration getContent(
+            const KeyType& type = KeyType::STREAMING) const;
+
+    KeyedVector toHidlKeyedVector(const map<string, string>& params);
+    hidl_array<uint8_t, 16> toHidlArray(const vector<uint8_t>& vec);
+
+    void fillRandom(const sp<IMemory>& memory);
+    sp<IMemory> getDecryptMemory(size_t size, size_t index);
+    uint32_t decrypt(Mode mode, bool isSecure,
+            const hidl_array<uint8_t, 16>& keyId, uint8_t* iv,
+            const hidl_vec<SubSample>& subSamples, const Pattern& pattern,
+            const vector<uint8_t>& key, StatusV1_2 expectedStatus);
+    void aes_ctr_decrypt(uint8_t* dest, uint8_t* src, uint8_t* iv,
+            const hidl_vec<SubSample>& subSamples, const vector<uint8_t>& key);
+    void aes_cbc_decrypt(uint8_t* dest, uint8_t* src, uint8_t* iv,
+            const hidl_vec<SubSample>& subSamples, const vector<uint8_t>& key);
+
+    sp<IDrmFactory> drmFactory;
+    sp<ICryptoFactory> cryptoFactory;
+    sp<IDrmPlugin> drmPlugin;
+    sp<ICryptoPlugin> cryptoPlugin;
+    unique_ptr<DrmHalVTSVendorModule_V1> vendorModule;
+    const vector<DrmHalVTSVendorModule_V1::ContentConfiguration> contentConfigurations;
+
+   private:
+    sp<IDrmPlugin> createDrmPlugin();
+    sp<ICryptoPlugin> createCryptoPlugin();
+
+};
+
+class DrmHalClearkeyTest : public DrmHalTest {
+   public:
+    virtual void SetUp() override { DrmHalTest::SetUp(); }
+    virtual void TearDown() override {}
+    void decryptWithInvalidKeys(hidl_vec<uint8_t>& invalidResponse,
+            vector<uint8_t>& iv, const Pattern& noPattern, const vector<SubSample>& subSamples);
+};
+
+/**
+ *  Event Handling tests
+ */
+extern const char *kCallbackLostState;
+
+class DrmHalPluginListener
+    : public ::testing::VtsHalHidlTargetCallbackBase<SessionId>,
+      public IDrmPluginListener {
+public:
+    DrmHalPluginListener() {
+        SetWaitTimeoutDefault(std::chrono::milliseconds(500));
+    }
+    virtual ~DrmHalPluginListener() {}
+
+    virtual Return<void> sendEvent(EventType, const hidl_vec<uint8_t>&,
+            const hidl_vec<uint8_t>& ) override { return Void(); }
+
+    virtual Return<void> sendExpirationUpdate(const hidl_vec<uint8_t>&,
+            int64_t) override { return Void(); }
+
+    virtual Return<void> sendKeysChange(const hidl_vec<uint8_t>&,
+            const hidl_vec<KeyStatus>&, bool) override { return Void(); }
+
+    virtual Return<void> sendSessionLostState(const hidl_vec<uint8_t>& sessionId) override;
+
+};
+
+}  // namespace vts
+}  // namespace V1_2
+}  // namespace drm
+}  // namespace hardware
+}  // namespace android
+
+#endif  // DRM_HAL_COMMON_H
diff --git a/drm/1.2/vts/functional/drm_hal_test.cpp b/drm/1.2/vts/functional/drm_hal_test.cpp
new file mode 100644
index 0000000..252ebb9
--- /dev/null
+++ b/drm/1.2/vts/functional/drm_hal_test.cpp
@@ -0,0 +1,559 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "drm_hal_test@1.2"
+
+#include <gtest/gtest.h>
+#include <hidl/HidlSupport.h>
+#include <log/log.h>
+#include <openssl/aes.h>
+
+#include "drm_hal_common.h"
+
+using ::android::hardware::drm::V1_0::Status;
+using ::android::hardware::drm::V1_1::KeyRequestType;
+using ::android::hardware::drm::V1_1::SecurityLevel;
+using ::android::hardware::drm::V1_2::HdcpLevel;
+using ::android::hardware::drm::V1_2::KeySetId;
+using ::android::hardware::drm::V1_2::OfflineLicenseState;
+
+using ::android::hardware::drm::V1_2::vts::DrmHalClearkeyTest;
+using ::android::hardware::drm::V1_2::vts::DrmHalPluginListener;
+using ::android::hardware::drm::V1_2::vts::DrmHalTest;
+using ::android::hardware::drm::V1_2::vts::DrmHidlEnvironment;
+using ::android::hardware::drm::V1_2::vts::kCallbackLostState;
+
+using ::android::hardware::hidl_string;
+
+static const char* const kVideoMp4 = "video/mp4";
+static const char* const kBadMime = "video/unknown";
+static const char* const kDrmErrorTestKey = "drmErrorTest";
+static const char* const kDrmErrorInvalidState = "invalidState";
+static const char* const kDrmErrorResourceContention = "resourceContention";
+static const SecurityLevel kSwSecureCrypto = SecurityLevel::SW_SECURE_CRYPTO;
+
+/**
+ * Ensure drm factory supports module UUID Scheme
+ */
+TEST_P(DrmHalTest, VendorUuidSupported) {
+    auto res = drmFactory->isCryptoSchemeSupported_1_2(getVendorUUID(), kVideoMp4, kSwSecureCrypto);
+    ALOGI("kVideoMp4 = %s res %d", kVideoMp4, (bool)res);
+    EXPECT_TRUE(res);
+}
+
+/**
+ * Ensure drm factory doesn't support an invalid scheme UUID
+ */
+TEST_P(DrmHalTest, InvalidPluginNotSupported) {
+    const uint8_t kInvalidUUID[16] = {
+        0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80,
+        0x10, 0x20, 0x30, 0x40, 0x50, 0x60, 0x70, 0x80};
+    EXPECT_FALSE(drmFactory->isCryptoSchemeSupported_1_2(kInvalidUUID, kVideoMp4, kSwSecureCrypto));
+}
+
+/**
+ * Ensure drm factory doesn't support an empty UUID
+ */
+TEST_P(DrmHalTest, EmptyPluginUUIDNotSupported) {
+    hidl_array<uint8_t, 16> emptyUUID;
+    memset(emptyUUID.data(), 0, 16);
+    EXPECT_FALSE(drmFactory->isCryptoSchemeSupported_1_2(emptyUUID, kVideoMp4, kSwSecureCrypto));
+}
+
+/**
+ * Ensure drm factory doesn't support an invalid mime type
+ */
+TEST_P(DrmHalTest, BadMimeNotSupported) {
+    EXPECT_FALSE(drmFactory->isCryptoSchemeSupported_1_2(getVendorUUID(), kBadMime, kSwSecureCrypto));
+}
+
+/**
+ *  DrmPlugin tests
+ */
+
+/**
+ * Test that a DRM plugin can handle provisioning.  While
+ * it is not required that a DRM scheme require provisioning,
+ * it should at least return appropriate status values. If
+ * a provisioning request is returned, it is passed to the
+ * vendor module which should provide a provisioning response
+ * that is delivered back to the HAL.
+ */
+TEST_P(DrmHalTest, DoProvisioning) {
+    RETURN_IF_SKIPPED;
+    hidl_string certificateType;
+    hidl_string certificateAuthority;
+    hidl_vec<uint8_t> provisionRequest;
+    hidl_string defaultUrl;
+    auto res = drmPlugin->getProvisionRequest_1_2(
+            certificateType, certificateAuthority,
+            [&](StatusV1_2 status, const hidl_vec<uint8_t>& request,
+                const hidl_string& url) {
+                if (status == StatusV1_2::OK) {
+                    EXPECT_NE(request.size(), 0u);
+                    provisionRequest = request;
+                    defaultUrl = url;
+                } else if (status == StatusV1_2::ERROR_DRM_CANNOT_HANDLE) {
+                    EXPECT_EQ(0u, request.size());
+                }
+            });
+    EXPECT_OK(res);
+
+    if (provisionRequest.size() > 0) {
+        vector<uint8_t> response = vendorModule->handleProvisioningRequest(
+                provisionRequest, defaultUrl);
+        ASSERT_NE(0u, response.size());
+
+        auto res = drmPlugin->provideProvisionResponse(
+                response, [&](Status status, const hidl_vec<uint8_t>&,
+                              const hidl_vec<uint8_t>&) {
+                    EXPECT_EQ(Status::OK, status);
+                });
+        EXPECT_OK(res);
+    }
+}
+
+/**
+ * A get key request should fail if no sessionId is provided
+ */
+TEST_P(DrmHalTest, GetKeyRequestNoSession) {
+    SessionId invalidSessionId;
+    hidl_vec<uint8_t> initData;
+    KeyedVector optionalParameters;
+    auto res = drmPlugin->getKeyRequest_1_2(
+            invalidSessionId, initData, kVideoMp4, KeyType::STREAMING,
+            optionalParameters,
+            [&](StatusV1_2 status, const hidl_vec<uint8_t>&, KeyRequestType,
+                const hidl_string&) { EXPECT_EQ(StatusV1_2::BAD_VALUE, status); });
+    EXPECT_OK(res);
+}
+
+/**
+ * Test that the plugin returns the documented error for the
+ * case of attempting to generate a key request using an
+ * invalid mime type
+ */
+TEST_P(DrmHalTest, GetKeyRequestBadMime) {
+    auto sessionId = openSession();
+    hidl_vec<uint8_t> initData;
+    KeyedVector optionalParameters;
+    auto res = drmPlugin->getKeyRequest_1_2(
+            sessionId, initData, kBadMime, KeyType::STREAMING,
+            optionalParameters, [&](StatusV1_2 status, const hidl_vec<uint8_t>&,
+                                    KeyRequestType, const hidl_string&) {
+                EXPECT_NE(StatusV1_2::OK, status);
+            });
+    EXPECT_OK(res);
+    closeSession(sessionId);
+}
+
+template <Status S, size_t N>
+void checkKeySetIds(Status status, const hidl_vec<KeySetId>& keySetIds) {
+    EXPECT_EQ(S, status);
+    if (S == Status::OK) {
+        EXPECT_EQ(N, keySetIds.size());
+    }
+}
+
+template <Status S, OfflineLicenseState T>
+void checkKeySetIdState(Status status, OfflineLicenseState state) {
+    if (S == Status::OK) {
+        EXPECT_TRUE(T == OfflineLicenseState::USABLE || T == OfflineLicenseState::INACTIVE);
+    } else {
+        EXPECT_TRUE(T == OfflineLicenseState::UNKNOWN);
+    }
+    EXPECT_EQ(S, status);
+    EXPECT_EQ(T, state);
+}
+
+/**
+ * Test drm plugin offline key support
+ */
+TEST_P(DrmHalTest, OfflineLicenseTest) {
+    auto sessionId = openSession();
+    hidl_vec<uint8_t> keySetId = loadKeys(sessionId, KeyType::OFFLINE);
+
+    auto res = drmPlugin->getOfflineLicenseKeySetIds(
+            [&](Status status, const hidl_vec<KeySetId>& keySetIds) {
+                bool found = false;
+                EXPECT_EQ(Status::OK, status);
+                for (KeySetId keySetId2: keySetIds) {
+                    if (keySetId == keySetId2) {
+                        found = true;
+                        break;
+                    }
+                }
+                EXPECT_TRUE(found) << "keySetId not found";
+            });
+    EXPECT_OK(res);
+
+    Status err = drmPlugin->removeOfflineLicense(keySetId);
+    EXPECT_EQ(Status::OK, err);
+
+    res = drmPlugin->getOfflineLicenseKeySetIds(
+            [&](Status status, const hidl_vec<KeySetId>& keySetIds) {
+                EXPECT_EQ(Status::OK, status);
+                for (KeySetId keySetId2: keySetIds) {
+                    EXPECT_NE(keySetId, keySetId2);
+                }
+            });
+    EXPECT_OK(res);
+
+    err = drmPlugin->removeOfflineLicense(keySetId);
+    EXPECT_EQ(Status::BAD_VALUE, err);
+
+    closeSession(sessionId);
+}
+
+/**
+ * Test drm plugin offline key state
+ */
+TEST_P(DrmHalTest, OfflineLicenseStateTest) {
+    auto sessionId = openSession();
+    DrmHalVTSVendorModule_V1::ContentConfiguration content = getContent(KeyType::OFFLINE);
+    hidl_vec<uint8_t> keySetId = loadKeys(sessionId, content, KeyType::OFFLINE);
+    drmPlugin->getOfflineLicenseState(keySetId, checkKeySetIdState<Status::OK, OfflineLicenseState::USABLE>);
+
+    hidl_vec<uint8_t> keyRequest = getKeyRequest(keySetId, content, KeyType::RELEASE);
+    drmPlugin->getOfflineLicenseState(keySetId, checkKeySetIdState<Status::OK, OfflineLicenseState::INACTIVE>);
+
+    /**
+     * Get key response from vendor module
+     */
+    hidl_vec<uint8_t> keyResponse =
+        vendorModule->handleKeyRequest(keyRequest, content.serverUrl);
+    EXPECT_GT(keyResponse.size(), 0u);
+
+    provideKeyResponse(keySetId, keyResponse);
+    drmPlugin->getOfflineLicenseState(keySetId, checkKeySetIdState<Status::BAD_VALUE, OfflineLicenseState::UNKNOWN>);
+    closeSession(sessionId);
+}
+
+/**
+ * Negative offline license test. Remove empty keySetId
+ */
+TEST_P(DrmHalTest, RemoveEmptyKeySetId) {
+    KeySetId emptyKeySetId;
+    Status err = drmPlugin->removeOfflineLicense(emptyKeySetId);
+    EXPECT_EQ(Status::BAD_VALUE, err);
+}
+
+/**
+ * Negative offline license test. Get empty keySetId state
+ */
+TEST_P(DrmHalTest, GetEmptyKeySetIdState) {
+    KeySetId emptyKeySetId;
+    auto res = drmPlugin->getOfflineLicenseState(emptyKeySetId, checkKeySetIdState<Status::BAD_VALUE, OfflineLicenseState::UNKNOWN>);
+    EXPECT_OK(res);
+}
+
+/**
+ * Test that the plugin returns valid connected and max HDCP levels
+ */
+TEST_P(DrmHalTest, GetHdcpLevels) {
+    auto res = drmPlugin->getHdcpLevels_1_2(
+            [&](StatusV1_2 status, const HdcpLevel &connectedLevel,
+                const HdcpLevel &maxLevel) {
+                EXPECT_EQ(StatusV1_2::OK, status);
+                EXPECT_GE(connectedLevel, HdcpLevel::HDCP_NONE);
+                EXPECT_LE(maxLevel, HdcpLevel::HDCP_V2_3);
+            });
+    EXPECT_OK(res);
+}
+
+/**
+ *  CryptoPlugin Decrypt tests
+ */
+
+/**
+ * Positive decrypt test.  "Decrypt" a single clear segment
+ */
+TEST_P(DrmHalTest, ClearSegmentTest) {
+    RETURN_IF_SKIPPED;
+    for (const auto& config : contentConfigurations) {
+        for (const auto& key : config.keys) {
+            const size_t kSegmentSize = 1024;
+            vector<uint8_t> iv(AES_BLOCK_SIZE, 0);
+            const Pattern noPattern = {0, 0};
+            const vector<SubSample> subSamples = {{.numBytesOfClearData = kSegmentSize,
+                                                   .numBytesOfEncryptedData = 0}};
+            auto sessionId = openSession();
+            loadKeys(sessionId, config);
+
+            Status status = cryptoPlugin->setMediaDrmSession(sessionId);
+            EXPECT_EQ(Status::OK, status);
+
+            uint32_t byteCount = decrypt(Mode::UNENCRYPTED, key.isSecure, toHidlArray(key.keyId),
+                    &iv[0], subSamples, noPattern, key.clearContentKey, StatusV1_2::OK);
+            EXPECT_EQ(kSegmentSize, byteCount);
+
+            closeSession(sessionId);
+        }
+    }
+}
+
+/**
+ * Positive decrypt test.  Decrypt a single segment using aes_ctr.
+ * Verify data matches.
+ */
+TEST_P(DrmHalTest, EncryptedAesCtrSegmentTest) {
+    RETURN_IF_SKIPPED;
+    for (const auto& config : contentConfigurations) {
+        for (const auto& key : config.keys) {
+            const size_t kSegmentSize = 1024;
+            vector<uint8_t> iv(AES_BLOCK_SIZE, 0);
+            const Pattern noPattern = {0, 0};
+            const vector<SubSample> subSamples = {{.numBytesOfClearData = kSegmentSize,
+                                                   .numBytesOfEncryptedData = 0}};
+            auto sessionId = openSession();
+            loadKeys(sessionId, config);
+
+            Status status = cryptoPlugin->setMediaDrmSession(sessionId);
+            EXPECT_EQ(Status::OK, status);
+
+            uint32_t byteCount = decrypt(Mode::AES_CTR, key.isSecure, toHidlArray(key.keyId),
+                    &iv[0], subSamples, noPattern, key.clearContentKey, StatusV1_2::OK);
+            EXPECT_EQ(kSegmentSize, byteCount);
+
+            closeSession(sessionId);
+        }
+    }
+}
+
+/**
+ * Negative decrypt test.  Decrypted frame too large to fit in output buffer
+ */
+TEST_P(DrmHalTest, ErrorFrameTooLarge) {
+    RETURN_IF_SKIPPED;
+    for (const auto& config : contentConfigurations) {
+        for (const auto& key : config.keys) {
+            const size_t kSegmentSize = 1024;
+            vector<uint8_t> iv(AES_BLOCK_SIZE, 0);
+            const Pattern noPattern = {0, 0};
+            const vector<SubSample> subSamples = {{.numBytesOfClearData = kSegmentSize,
+                                                   .numBytesOfEncryptedData = 0}};
+            auto sessionId = openSession();
+            loadKeys(sessionId, config);
+
+            Status status = cryptoPlugin->setMediaDrmSession(sessionId);
+            EXPECT_EQ(Status::OK, status);
+
+            decrypt(Mode::UNENCRYPTED, key.isSecure, toHidlArray(key.keyId),
+                    &iv[0], subSamples, noPattern, key.clearContentKey, StatusV1_2::ERROR_DRM_FRAME_TOO_LARGE);
+
+            closeSession(sessionId);
+        }
+    }
+}
+
+/**
+ * Negative decrypt test. Decrypt without loading keys.
+ */
+TEST_P(DrmHalTest, EncryptedAesCtrSegmentTestNoKeys) {
+    RETURN_IF_SKIPPED;
+    for (const auto& config : contentConfigurations) {
+        for (const auto& key : config.keys) {
+            vector<uint8_t> iv(AES_BLOCK_SIZE, 0);
+            const Pattern noPattern = {0, 0};
+            const vector<SubSample> subSamples = {{.numBytesOfClearData = 256,
+                                                   .numBytesOfEncryptedData = 256}};
+            auto sessionId = openSession();
+
+            Status status = cryptoPlugin->setMediaDrmSession(sessionId);
+            EXPECT_EQ(Status::OK, status);
+
+            uint32_t byteCount = decrypt(Mode::AES_CTR, key.isSecure,
+                    toHidlArray(key.keyId), &iv[0], subSamples, noPattern,
+                    key.clearContentKey, StatusV1_2::ERROR_DRM_NO_LICENSE);
+            EXPECT_EQ(0u, byteCount);
+
+            closeSession(sessionId);
+        }
+    }
+}
+
+/**
+ * Ensure clearkey drm factory doesn't support security level higher than supported
+ */
+TEST_P(DrmHalClearkeyTest, BadLevelNotSupported) {
+    const SecurityLevel kHwSecureAll = SecurityLevel::HW_SECURE_ALL;
+    EXPECT_FALSE(drmFactory->isCryptoSchemeSupported_1_2(getVendorUUID(), kVideoMp4, kHwSecureAll));
+}
+
+/**
+ * Test resource contention during attempt to generate key request
+ */
+TEST_P(DrmHalClearkeyTest, GetKeyRequestResourceContention) {
+    Status status = drmPlugin->setPropertyString(kDrmErrorTestKey, kDrmErrorResourceContention);
+    EXPECT_EQ(Status::OK, status);
+    auto sessionId = openSession();
+    hidl_vec<uint8_t> initData;
+    KeyedVector optionalParameters;
+    auto res = drmPlugin->getKeyRequest_1_2(
+            sessionId, initData, kVideoMp4, KeyType::STREAMING,
+            optionalParameters, [&](StatusV1_2 status, const hidl_vec<uint8_t>&,
+                                    KeyRequestType, const hidl_string&) {
+                EXPECT_EQ(StatusV1_2::ERROR_DRM_RESOURCE_CONTENTION, status);
+            });
+    EXPECT_OK(res);
+
+    status = drmPlugin->closeSession(sessionId);
+    EXPECT_NE(Status::OK, status);
+}
+
+/**
+ * Test clearkey plugin offline key with mock error
+ */
+TEST_P(DrmHalClearkeyTest, OfflineLicenseInvalidState) {
+    auto sessionId = openSession();
+    hidl_vec<uint8_t> keySetId = loadKeys(sessionId, KeyType::OFFLINE);
+    Status status = drmPlugin->setPropertyString(kDrmErrorTestKey, kDrmErrorInvalidState);
+    EXPECT_EQ(Status::OK, status);
+
+    // everything should start failing
+    const Status kInvalidState = Status::ERROR_DRM_INVALID_STATE;
+    const OfflineLicenseState kUnknownState = OfflineLicenseState::UNKNOWN;
+    auto res = drmPlugin->getOfflineLicenseKeySetIds(checkKeySetIds<kInvalidState, 0u>);
+    EXPECT_OK(res);
+    res = drmPlugin->getOfflineLicenseState(keySetId, checkKeySetIdState<kInvalidState, kUnknownState>);
+    EXPECT_OK(res);
+    Status err = drmPlugin->removeOfflineLicense(keySetId);
+    EXPECT_EQ(kInvalidState, err);
+    closeSession(sessionId);
+}
+
+/**
+ * Test SessionLostState is triggered on error
+ */
+TEST_P(DrmHalClearkeyTest, SessionLostState) {
+    sp<DrmHalPluginListener> listener = new DrmHalPluginListener();
+    auto res = drmPlugin->setListener(listener);
+    EXPECT_OK(res);
+
+    Status status = drmPlugin->setPropertyString(kDrmErrorTestKey, kDrmErrorInvalidState);
+    EXPECT_EQ(Status::OK, status);
+
+    auto sessionId = openSession();
+    drmPlugin->closeSession(sessionId);
+
+    auto result = listener->WaitForCallback(kCallbackLostState);
+    EXPECT_TRUE(result.no_timeout);
+    EXPECT_TRUE(result.args);
+    EXPECT_EQ(sessionId, *(result.args));
+}
+
+/**
+ * Negative decrypt test. Decrypt with invalid key.
+ */
+TEST_P(DrmHalClearkeyTest, DecryptWithEmptyKey) {
+    vector<uint8_t> iv(AES_BLOCK_SIZE, 0);
+    const Pattern noPattern = {0, 0};
+    const uint32_t kClearBytes = 512;
+    const uint32_t kEncryptedBytes = 512;
+    const vector<SubSample> subSamples = {
+        {.numBytesOfClearData = kClearBytes,
+         .numBytesOfEncryptedData = kEncryptedBytes}};
+
+    // base 64 encoded JSON response string, must not contain padding character '='
+    const hidl_string emptyKeyResponse =
+            "{\"keys\":[" \
+                "{" \
+                    "\"kty\":\"oct\"" \
+                    "\"alg\":\"A128KW2\"" \
+                    "\"k\":\"SGVsbG8gRnJpZW5kIQ\"" \
+                    "\"kid\":\"Y2xlYXJrZXlrZXlpZDAyAy\"" \
+                "}" \
+                "{" \
+                    "\"kty\":\"oct\"," \
+                    "\"alg\":\"A128KW2\"" \
+                    "\"kid\":\"Y2xlYXJrZXlrZXlpZDAzAy\"," \
+                    // empty key follows
+                    "\"k\":\"R\"" \
+                "}]" \
+            "}";
+    const size_t kEmptyKeyResponseSize = emptyKeyResponse.size();
+
+    hidl_vec<uint8_t> invalidResponse;
+    invalidResponse.resize(kEmptyKeyResponseSize);
+    memcpy(invalidResponse.data(), emptyKeyResponse.c_str(), kEmptyKeyResponseSize);
+    decryptWithInvalidKeys(invalidResponse, iv, noPattern, subSamples);
+}
+
+/**
+ * Negative decrypt test. Decrypt with a key exceeds AES_BLOCK_SIZE.
+ */
+TEST_P(DrmHalClearkeyTest, DecryptWithKeyTooLong) {
+    vector<uint8_t> iv(AES_BLOCK_SIZE, 0);
+    const Pattern noPattern = {0, 0};
+    const uint32_t kClearBytes = 512;
+    const uint32_t kEncryptedBytes = 512;
+    const vector<SubSample> subSamples = {
+        {.numBytesOfClearData = kClearBytes,
+         .numBytesOfEncryptedData = kEncryptedBytes}};
+
+    // base 64 encoded JSON response string, must not contain padding character '='
+    const hidl_string keyTooLongResponse =
+            "{\"keys\":[" \
+                "{" \
+                    "\"kty\":\"oct\"," \
+                    "\"alg\":\"A128KW2\"" \
+                    "\"kid\":\"Y2xlYXJrZXlrZXlpZDAzAy\"," \
+                    // key too long
+                    "\"k\":\"V2lubmllIHRoZSBwb29oIVdpbm5pZSB0aGUgcG9vaCE=\"" \
+                "}]" \
+            "}";
+    const size_t kKeyTooLongResponseSize = keyTooLongResponse.size();
+
+    hidl_vec<uint8_t> invalidResponse;
+    invalidResponse.resize(kKeyTooLongResponseSize);
+    memcpy(invalidResponse.data(), keyTooLongResponse.c_str(), kKeyTooLongResponseSize);
+    decryptWithInvalidKeys(invalidResponse, iv, noPattern, subSamples);
+}
+
+/**
+ * Instantiate the set of test cases for each vendor module
+ */
+
+INSTANTIATE_TEST_CASE_P(
+        DrmHalTestClearkey, DrmHalTest,
+        testing::Values("clearkey"));
+
+INSTANTIATE_TEST_CASE_P(
+        DrmHalTestClearkeyExtended, DrmHalClearkeyTest,
+        testing::Values("clearkey"));
+
+INSTANTIATE_TEST_CASE_P(
+        DrmHalTestVendor, DrmHalTest,
+        testing::ValuesIn(DrmHalTest::gVendorModules->getPathList()));
+
+int main(int argc, char** argv) {
+#if defined(__LP64__)
+    const char* kModulePath = "/data/local/tmp/64/lib";
+#else
+    const char* kModulePath = "/data/local/tmp/32/lib";
+#endif
+    DrmHalTest::gVendorModules = new drm_vts::VendorModules(kModulePath);
+    if (DrmHalTest::gVendorModules->getPathList().size() == 0) {
+        std::cerr << "WARNING: No vendor modules found in " << kModulePath <<
+                ", all vendor tests will be skipped" << std::endl;
+    }
+    ::testing::AddGlobalTestEnvironment(DrmHidlEnvironment::Instance());
+    ::testing::InitGoogleTest(&argc, argv);
+    DrmHidlEnvironment::Instance()->init(&argc, argv);
+    int status = RUN_ALL_TESTS();
+    ALOGI("Test result = %d", status);
+    return status;
+}
diff --git a/drm/1.2/vts/functional/vendor_modules.cpp b/drm/1.2/vts/functional/vendor_modules.cpp
new file mode 100644
index 0000000..efcb90a
--- /dev/null
+++ b/drm/1.2/vts/functional/vendor_modules.cpp
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "drm-vts-vendor-modules"
+
+#include <dirent.h>
+#include <dlfcn.h>
+#include <log/log.h>
+#include <memory>
+#include <utils/String8.h>
+#include <SharedLibrary.h>
+
+#include "vendor_modules.h"
+
+using std::string;
+using std::vector;
+using std::unique_ptr;
+using ::android::String8;
+using ::android::hardware::drm::V1_0::helper::SharedLibrary;
+
+namespace drm_vts {
+void VendorModules::scanModules(const std::string &directory) {
+    DIR* dir = opendir(directory.c_str());
+    if (dir == NULL) {
+        ALOGE("Unable to open drm VTS vendor directory %s", directory.c_str());
+    } else {
+        struct dirent* entry;
+        while ((entry = readdir(dir))) {
+            ALOGD("checking file %s", entry->d_name);
+            string fullpath = directory + "/" + entry->d_name;
+            if (endsWith(fullpath, ".so")) {
+                mPathList.push_back(fullpath);
+            }
+        }
+        closedir(dir);
+    }
+}
+
+DrmHalVTSVendorModule* VendorModules::getModule(const string& path) {
+    if (mOpenLibraries.find(path) == mOpenLibraries.end()) {
+        auto library = std::make_unique<SharedLibrary>(String8(path.c_str()));
+        if (!library) {
+            ALOGE("failed to map shared library %s", path.c_str());
+            return NULL;
+        }
+        mOpenLibraries[path] = std::move(library);
+    }
+    const unique_ptr<SharedLibrary>& library = mOpenLibraries[path];
+    void* symbol = library->lookup("vendorModuleFactory");
+    if (symbol == NULL) {
+        ALOGE("getVendorModule failed to lookup 'vendorModuleFactory' in %s: "
+              "%s", path.c_str(), library->lastError());
+        return NULL;
+    }
+    typedef DrmHalVTSVendorModule* (*ModuleFactory)();
+    ModuleFactory moduleFactory = reinterpret_cast<ModuleFactory>(symbol);
+    return (*moduleFactory)();
+}
+};
diff --git a/drm/1.2/vts/functional/vendor_modules.h b/drm/1.2/vts/functional/vendor_modules.h
new file mode 100644
index 0000000..9b730ad
--- /dev/null
+++ b/drm/1.2/vts/functional/vendor_modules.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef VENDOR_MODULES_H
+#define VENDOR_MODULES_H
+
+#include <map>
+#include <vector>
+#include <string>
+
+#include <SharedLibrary.h>
+
+using ::android::hardware::drm::V1_0::helper::SharedLibrary;
+
+class DrmHalVTSVendorModule;
+
+namespace drm_vts {
+class VendorModules {
+   public:
+    /**
+     * Initialize with a file system path where the shared libraries
+     * are to be found.
+     */
+    explicit VendorModules(const std::string& dir) {
+        scanModules(dir);
+    }
+    ~VendorModules() {}
+
+    /**
+     * Retrieve a DrmHalVTSVendorModule given its full path.  The
+     * getAPIVersion method can be used to determine the versioned
+     * subclass type.
+     */
+    DrmHalVTSVendorModule* getModule(const std::string& path);
+
+    /**
+     * Return the list of paths to available vendor modules.
+     */
+    std::vector<std::string> getPathList() const {return mPathList;}
+
+   private:
+    std::vector<std::string> mPathList;
+    std::map<std::string, std::unique_ptr<SharedLibrary>> mOpenLibraries;
+
+    /**
+     * Scan the list of paths to available vendor modules.
+     */
+    void scanModules(const std::string& dir);
+
+    inline bool endsWith(const std::string& str, const std::string& suffix) const {
+        if (suffix.size() > str.size()) return false;
+        return std::equal(suffix.rbegin(), suffix.rend(), str.rbegin());
+    }
+
+    VendorModules(const VendorModules&) = delete;
+    void operator=(const VendorModules&) = delete;
+};
+};
+
+#endif  // VENDOR_MODULES_H
diff --git a/fastboot/1.0/Android.bp b/fastboot/1.0/Android.bp
index 467fc6d..ea3566f 100644
--- a/fastboot/1.0/Android.bp
+++ b/fastboot/1.0/Android.bp
@@ -13,11 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "FileSystemType",
-        "Result",
-        "Status",
-    ],
     gen_java: true,
 }
 
diff --git a/fastboot/1.0/default/Android.bp b/fastboot/1.0/default/Android.bp
new file mode 100644
index 0000000..fde7efa
--- /dev/null
+++ b/fastboot/1.0/default/Android.bp
@@ -0,0 +1,31 @@
+//
+// Copyright (C) 2019 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+cc_library {
+    name: "android.hardware.fastboot@1.0-impl-mock",
+    recovery: true,
+    srcs: [
+        "Fastboot.cpp",
+    ],
+    relative_install_path: "hw",
+    shared_libs: [
+        "libbase",
+        "libhidlbase",
+        "libhidltransport",
+        "libutils",
+        "libcutils",
+        "android.hardware.fastboot@1.0",
+    ],
+}
diff --git a/fastboot/1.0/default/Fastboot.cpp b/fastboot/1.0/default/Fastboot.cpp
new file mode 100644
index 0000000..a12233d
--- /dev/null
+++ b/fastboot/1.0/default/Fastboot.cpp
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "Fastboot.h"
+
+namespace android {
+namespace hardware {
+namespace fastboot {
+namespace V1_0 {
+namespace implementation {
+
+// Methods from ::android::hardware::fastboot::V1_0::IFastboot follow.
+Return<void> Fastboot::getPartitionType(const hidl_string& /* partitionName */,
+                                        getPartitionType_cb _hidl_cb) {
+    _hidl_cb(FileSystemType::RAW, {Status::SUCCESS, ""});
+    return Void();
+}
+
+Return<void> Fastboot::doOemCommand(const hidl_string& /* oemCmd */, doOemCommand_cb _hidl_cb) {
+    _hidl_cb({Status::FAILURE_UNKNOWN, "Command not supported in default implementation"});
+    return Void();
+}
+
+Return<void> Fastboot::getVariant(getVariant_cb _hidl_cb) {
+    _hidl_cb("NA", {Status::SUCCESS, ""});
+    return Void();
+}
+
+Return<void> Fastboot::getOffModeChargeState(getOffModeChargeState_cb _hidl_cb) {
+    _hidl_cb(false, {Status::SUCCESS, ""});
+    return Void();
+}
+
+Return<void> Fastboot::getBatteryVoltageFlashingThreshold(
+        getBatteryVoltageFlashingThreshold_cb _hidl_cb) {
+    _hidl_cb(0, {Status::SUCCESS, ""});
+    return Void();
+}
+
+extern "C" IFastboot* HIDL_FETCH_IFastboot(const char* /* name */) {
+    return new Fastboot();
+}
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace fastboot
+}  // namespace hardware
+}  // namespace android
diff --git a/fastboot/1.0/default/Fastboot.h b/fastboot/1.0/default/Fastboot.h
new file mode 100644
index 0000000..3127059
--- /dev/null
+++ b/fastboot/1.0/default/Fastboot.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#pragma once
+
+#include <android/hardware/fastboot/1.0/IFastboot.h>
+#include <hidl/Status.h>
+
+namespace android {
+namespace hardware {
+namespace fastboot {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::hardware::hidl_string;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+
+struct Fastboot : public IFastboot {
+    // Methods from ::android::hardware::fastboot::V1_0::IFastboot follow.
+    Return<void> getPartitionType(const hidl_string& partitionName,
+                                  getPartitionType_cb _hidl_cb) override;
+    Return<void> doOemCommand(const hidl_string& oemCmd, doOemCommand_cb _hidl_cb) override;
+    Return<void> getVariant(getVariant_cb _hidl_cb) override;
+    Return<void> getOffModeChargeState(getOffModeChargeState_cb _hidl_cb) override;
+    Return<void> getBatteryVoltageFlashingThreshold(
+            getBatteryVoltageFlashingThreshold_cb _hidl_cb) override;
+};
+
+extern "C" IFastboot* HIDL_FETCH_IFastboot(const char* name);
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace fastboot
+}  // namespace hardware
+}  // namespace android
diff --git a/gatekeeper/1.0/Android.bp b/gatekeeper/1.0/Android.bp
index 7dc2133..7eff2e8 100644
--- a/gatekeeper/1.0/Android.bp
+++ b/gatekeeper/1.0/Android.bp
@@ -13,10 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "GatekeeperResponse",
-        "GatekeeperStatusCode",
-    ],
     gen_java: true,
 }
 
diff --git a/gnss/1.0/Android.bp b/gnss/1.0/Android.bp
index dc659a3..2e3e6fd 100644
--- a/gnss/1.0/Android.bp
+++ b/gnss/1.0/Android.bp
@@ -32,12 +32,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "GnssConstellationType",
-        "GnssLocation",
-        "GnssLocationFlags",
-        "GnssMax",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/gnss/1.1/vts/functional/Android.bp b/gnss/1.1/vts/functional/Android.bp
index 147a470..cc34290 100644
--- a/gnss/1.1/vts/functional/Android.bp
+++ b/gnss/1.1/vts/functional/Android.bp
@@ -27,5 +27,8 @@
         "android.hardware.gnss@1.1",
         "android.hardware.gnss@common-vts-lib",
     ],
+    shared_libs: [
+        "android.hardware.gnss.measurement_corrections@1.0",
+    ],
     test_suites: ["general-tests"],
 }
diff --git a/gnss/2.0/Android.bp b/gnss/2.0/Android.bp
index 230dd90..c01ec55 100644
--- a/gnss/2.0/Android.bp
+++ b/gnss/2.0/Android.bp
@@ -24,11 +24,6 @@
         "android.hardware.gnss@1.1",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "ElapsedRealtime",
-        "ElapsedRealtimeFlags",
-        "GnssLocation",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/gnss/2.0/IGnssCallback.hal b/gnss/2.0/IGnssCallback.hal
index e2ac02a..7924b64 100644
--- a/gnss/2.0/IGnssCallback.hal
+++ b/gnss/2.0/IGnssCallback.hal
@@ -52,4 +52,27 @@
      */
     gnssLocationCb_2_0(GnssLocation location);
 
+    /**
+     * Callback for requesting Location.
+     *
+     * HAL implementation must call this when it wants the framework to provide locations to assist
+     * with GNSS HAL operation, for example, to assist with time to first fix, error recovery, or to
+     * supplement GNSS location for other clients of the GNSS HAL.
+     *
+     * If a request is made with independentFromGnss set to true, the framework must avoid
+     * providing locations derived from GNSS locations (such as "fused" location), to help improve
+     * information independence for situations such as error recovery.
+     *
+     * In response to this method call, GNSS HAL can expect zero, one, or more calls to
+     * IGnss::injectLocation or IGnss::injectBestLocation, dependent on availability of location
+     * from other sources, which may happen at some arbitrary delay. Generally speaking, HAL
+     * implementations must be able to handle calls to IGnss::injectLocation or
+     * IGnss::injectBestLocation at any time.
+     *
+     * @param independentFromGnss True if requesting a location that is independent from GNSS.
+     * @param isUserEmergency True if the location request is for delivery of this location to an
+     *        emergency services endpoint, during a user-initiated emergency session (e.g.
+     *        during-call to E911, or up to 5 minutes after end-of-call or text to E911).
+     */
+    gnssRequestLocationCb_2_0(bool independentFromGnss, bool isUserEmergency);
 };
\ No newline at end of file
diff --git a/gnss/2.0/default/Android.bp b/gnss/2.0/default/Android.bp
index f327197..64187e2 100644
--- a/gnss/2.0/default/Android.bp
+++ b/gnss/2.0/default/Android.bp
@@ -26,6 +26,7 @@
         "AGnssRil.cpp",
         "Gnss.cpp",
         "GnssMeasurement.cpp",
+        "GnssMeasurementCorrections.cpp",
         "GnssVisibilityControl.cpp",
         "service.cpp"
     ],
diff --git a/gnss/2.0/default/Gnss.cpp b/gnss/2.0/default/Gnss.cpp
index 599681b..ee6da53 100644
--- a/gnss/2.0/default/Gnss.cpp
+++ b/gnss/2.0/default/Gnss.cpp
@@ -25,11 +25,14 @@
 #include "AGnssRil.h"
 #include "GnssConfiguration.h"
 #include "GnssMeasurement.h"
+#include "GnssMeasurementCorrections.h"
 #include "GnssVisibilityControl.h"
 #include "Utils.h"
 
 using ::android::hardware::Status;
 using ::android::hardware::gnss::common::Utils;
+using ::android::hardware::gnss::measurement_corrections::V1_0::implementation::
+        GnssMeasurementCorrections;
 using ::android::hardware::gnss::visibility_control::V1_0::implementation::GnssVisibilityControl;
 
 namespace android {
@@ -122,8 +125,7 @@
 Return<bool> Gnss::setPositionMode(V1_0::IGnss::GnssPositionMode,
                                    V1_0::IGnss::GnssPositionRecurrence, uint32_t, uint32_t,
                                    uint32_t) {
-    // TODO(b/124012850): Implement function.
-    return bool{};
+    return true;
 }
 
 Return<sp<V1_0::IAGnssRil>> Gnss::getExtensionAGnssRil() {
@@ -249,8 +251,8 @@
 
 Return<sp<measurement_corrections::V1_0::IMeasurementCorrections>>
 Gnss::getExtensionMeasurementCorrections() {
-    // TODO(b/124012850): Implement function.
-    return sp<measurement_corrections::V1_0::IMeasurementCorrections>{};
+    ALOGD("Gnss::getExtensionMeasurementCorrections");
+    return new GnssMeasurementCorrections();
 }
 
 Return<sp<visibility_control::V1_0::IGnssVisibilityControl>> Gnss::getExtensionVisibilityControl() {
@@ -267,7 +269,7 @@
 
     sGnssCallback_2_0 = callback;
 
-    uint32_t capabilities = 0x0;
+    uint32_t capabilities = static_cast<uint32_t>(V1_0::IGnssCallback::Capabilities::MEASUREMENTS);
     auto ret = sGnssCallback_2_0->gnssSetCapabilitesCb(capabilities);
     if (!ret.isOk()) {
         ALOGE("%s: Unable to invoke callback", __func__);
diff --git a/gnss/2.0/default/GnssMeasurementCorrections.cpp b/gnss/2.0/default/GnssMeasurementCorrections.cpp
new file mode 100644
index 0000000..cbf34ba
--- /dev/null
+++ b/gnss/2.0/default/GnssMeasurementCorrections.cpp
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "GnssMeasurementCorrections"
+
+#include "GnssMeasurementCorrections.h"
+#include <log/log.h>
+
+namespace android {
+namespace hardware {
+namespace gnss {
+namespace measurement_corrections {
+namespace V1_0 {
+namespace implementation {
+
+// Methods from V1_0::IMeasurementCorrections follow.
+Return<bool> GnssMeasurementCorrections::setCorrections(const MeasurementCorrections& corrections) {
+    ALOGD("setCorrections");
+    ALOGD("corrections = lat: %f, lng: %f, alt: %f, hUnc: %f, vUnc: %f, toa: %llu, "
+          "satCorrections.size: %d",
+          corrections.latitudeDegrees, corrections.longitudeDegrees, corrections.altitudeMeters,
+          corrections.horizontalPositionUncertaintyMeters,
+          corrections.verticalPositionUncertaintyMeters,
+          static_cast<unsigned long long>(corrections.toaGpsNanosecondsOfWeek),
+          static_cast<int>(corrections.satCorrections.size()));
+    for (auto singleSatCorrection : corrections.satCorrections) {
+        ALOGD("singleSatCorrection = flags: %d, constellation: %d, svid: %d, cfHz: %f, probLos: %f,"
+              " epl: %f, eplUnc: %f",
+              static_cast<int>(singleSatCorrection.singleSatCorrectionFlags),
+              static_cast<int>(singleSatCorrection.constellation),
+              static_cast<int>(singleSatCorrection.svid), singleSatCorrection.carrierFrequencyHz,
+              singleSatCorrection.probSatIsLos, singleSatCorrection.excessPathLengthMeters,
+              singleSatCorrection.excessPathLengthUncertaintyMeters);
+        ALOGD("reflecting plane = lat: %f, lng: %f, alt: %f, azm: %f",
+              singleSatCorrection.reflectingPlane.latitudeDegrees,
+              singleSatCorrection.reflectingPlane.longitudeDegrees,
+              singleSatCorrection.reflectingPlane.altitudeMeters,
+              singleSatCorrection.reflectingPlane.azimuthDegrees);
+    }
+
+    return true;
+}
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace measurement_corrections
+}  // namespace gnss
+}  // namespace hardware
+}  // namespace android
diff --git a/gnss/2.0/default/GnssMeasurementCorrections.h b/gnss/2.0/default/GnssMeasurementCorrections.h
new file mode 100644
index 0000000..f758bc8
--- /dev/null
+++ b/gnss/2.0/default/GnssMeasurementCorrections.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <android/hardware/gnss/measurement_corrections/1.0/IMeasurementCorrections.h>
+#include <hidl/MQDescriptor.h>
+#include <hidl/Status.h>
+
+namespace android {
+namespace hardware {
+namespace gnss {
+namespace measurement_corrections {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::sp;
+using ::android::hardware::hidl_array;
+using ::android::hardware::hidl_memory;
+using ::android::hardware::hidl_string;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+
+struct GnssMeasurementCorrections : public IMeasurementCorrections {
+    // Methods from V1_0::IMeasurementCorrections follow.
+    Return<bool> setCorrections(const MeasurementCorrections& corrections) override;
+};
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace measurement_corrections
+}  // namespace gnss
+}  // namespace hardware
+}  // namespace android
diff --git a/gnss/2.0/vts/functional/gnss_hal_test.h b/gnss/2.0/vts/functional/gnss_hal_test.h
index 7793eb7..31750a6 100644
--- a/gnss/2.0/vts/functional/gnss_hal_test.h
+++ b/gnss/2.0/vts/functional/gnss_hal_test.h
@@ -99,12 +99,18 @@
         // Actual (test) callback handlers
         Return<void> gnssNameCb(const android::hardware::hidl_string& name) override;
         Return<void> gnssLocationCb(const GnssLocation_1_0& location) override;
-        Return<void> gnssLocationCb_2_0(const GnssLocation_2_0& location) override;
         Return<void> gnssSetCapabilitesCb(uint32_t capabilities) override;
-        Return<void> gnssSetCapabilitiesCb_2_0(uint32_t capabilities) override;
         Return<void> gnssSetSystemInfoCb(const IGnssCallback::GnssSystemInfo& info) override;
         Return<void> gnssSvStatusCb(const IGnssCallback::GnssSvStatus& svStatus) override;
 
+        // New in v2.0
+        Return<void> gnssLocationCb_2_0(const GnssLocation_2_0& location) override;
+        Return<void> gnssRequestLocationCb_2_0(bool /* independentFromGnss */,
+                                               bool /* isUserEmergency */) override {
+            return Void();
+        }
+        Return<void> gnssSetCapabilitiesCb_2_0(uint32_t capabilities) override;
+
       private:
         Return<void> gnssLocationCbImpl(const GnssLocation_2_0& location);
     };
diff --git a/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp b/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp
index b135dba..3703eba 100644
--- a/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp
+++ b/gnss/2.0/vts/functional/gnss_hal_test_cases.cpp
@@ -18,6 +18,7 @@
 
 #include <VtsHalHidlTargetTestBase.h>
 #include <gnss_hal_test.h>
+#include "Utils.h"
 
 using android::hardware::hidl_string;
 using android::hardware::hidl_vec;
@@ -32,6 +33,9 @@
 using IAGnss_1_0 = android::hardware::gnss::V1_0::IAGnss;
 using IAGnssCallback_2_0 = android::hardware::gnss::V2_0::IAGnssCallback;
 
+using android::hardware::gnss::common::Utils;
+using android::hardware::gnss::measurement_corrections::V1_0::IMeasurementCorrections;
+using android::hardware::gnss::measurement_corrections::V1_0::MeasurementCorrections;
 using android::hardware::gnss::V1_0::IGnssNi;
 using android::hardware::gnss::V2_0::ElapsedRealtimeFlags;
 using android::hardware::gnss::visibility_control::V1_0::IGnssVisibilityControl;
@@ -273,6 +277,24 @@
 }
 
 /*
+ * TestGnssMeasurementCorrections:
+ * Gets the GnssMeasurementCorrectionsExtension and verifies that it supports the
+ * gnss.measurement_corrections@1.0::IMeasurementCorrections interface by invoking a method.
+ */
+TEST_F(GnssHalTest, TestGnssMeasurementCorrections) {
+    // Verify IMeasurementCorrections is supported.
+    auto measurementCorrections = gnss_hal_->getExtensionMeasurementCorrections();
+    ASSERT_TRUE(measurementCorrections.isOk());
+    sp<IMeasurementCorrections> iMeasurementCorrections = measurementCorrections;
+    ASSERT_NE(iMeasurementCorrections, nullptr);
+
+    // Set a mock MeasurementCorrections.
+    auto result = iMeasurementCorrections->setCorrections(Utils::getMockMeasurementCorrections());
+    ASSERT_TRUE(result.isOk());
+    EXPECT_TRUE(result);
+}
+
+/*
  * TestGnssDataElapsedRealtimeFlags:
  * Sets a GnssMeasurementCallback, waits for a GnssData object, and verifies the flags in member
  * elapsedRealitme are valid.
diff --git a/gnss/common/utils/vts/Android.bp b/gnss/common/utils/vts/Android.bp
index 99d8cf9..1988171 100644
--- a/gnss/common/utils/vts/Android.bp
+++ b/gnss/common/utils/vts/Android.bp
@@ -29,6 +29,7 @@
     export_include_dirs: ["include"],
     shared_libs: [
         "android.hardware.gnss@1.0",
+        "android.hardware.gnss.measurement_corrections@1.0",
     ],
     static_libs: [
         "libgtest",
diff --git a/gnss/common/utils/vts/Utils.cpp b/gnss/common/utils/vts/Utils.cpp
index 24d6883..51d3ea1 100644
--- a/gnss/common/utils/vts/Utils.cpp
+++ b/gnss/common/utils/vts/Utils.cpp
@@ -22,6 +22,7 @@
 namespace gnss {
 namespace common {
 
+using V1_0::GnssConstellationType;
 using V1_0::GnssLocationFlags;
 
 void Utils::checkLocation(const GnssLocation& location, bool check_speed,
@@ -91,6 +92,53 @@
     EXPECT_GT(location.timestamp, 1.48e12);
 }
 
+const MeasurementCorrections Utils::getMockMeasurementCorrections() {
+    ReflectingPlane reflectingPlane = {
+            .latitudeDegrees = 37.4220039,
+            .longitudeDegrees = -122.0840991,
+            .altitudeMeters = 250.35,
+            .azimuthDegrees = 203.0,
+    };
+
+    SingleSatCorrection singleSatCorrection1 = {
+            .singleSatCorrectionFlags = GnssSingleSatCorrectionFlags::HAS_SAT_IS_LOS_PROBABILITY |
+                                        GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH |
+                                        GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH_UNC |
+                                        GnssSingleSatCorrectionFlags::HAS_REFLECTING_PLANE,
+            .constellation = GnssConstellationType::GPS,
+            .svid = 12,
+            .carrierFrequencyHz = 1.59975e+09,
+            .probSatIsLos = 0.50001,
+            .excessPathLengthMeters = 137.4802,
+            .excessPathLengthUncertaintyMeters = 25.5,
+            .reflectingPlane = reflectingPlane,
+    };
+    SingleSatCorrection singleSatCorrection2 = {
+            .singleSatCorrectionFlags = GnssSingleSatCorrectionFlags::HAS_SAT_IS_LOS_PROBABILITY |
+                                        GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH |
+                                        GnssSingleSatCorrectionFlags::HAS_EXCESS_PATH_LENGTH_UNC,
+            .constellation = GnssConstellationType::GPS,
+            .svid = 9,
+            .carrierFrequencyHz = 1.59975e+09,
+            .probSatIsLos = 0.873,
+            .excessPathLengthMeters = 26.294,
+            .excessPathLengthUncertaintyMeters = 10.0,
+    };
+
+    hidl_vec<SingleSatCorrection> singleSatCorrections = {singleSatCorrection1,
+                                                          singleSatCorrection2};
+    MeasurementCorrections mockCorrections = {
+            .latitudeDegrees = 37.4219999,
+            .longitudeDegrees = -122.0840575,
+            .altitudeMeters = 30.60062531,
+            .horizontalPositionUncertaintyMeters = 9.23542,
+            .verticalPositionUncertaintyMeters = 15.02341,
+            .toaGpsNanosecondsOfWeek = 2935633453L,
+            .satCorrections = singleSatCorrections,
+    };
+    return mockCorrections;
+}
+
 }  // namespace common
 }  // namespace gnss
 }  // namespace hardware
diff --git a/gnss/common/utils/vts/include/Utils.h b/gnss/common/utils/vts/include/Utils.h
index f8eeff6..dce4c7b 100644
--- a/gnss/common/utils/vts/include/Utils.h
+++ b/gnss/common/utils/vts/include/Utils.h
@@ -18,8 +18,10 @@
 #define android_hardware_gnss_common_vts_Utils_H_
 
 #include <android/hardware/gnss/1.0/IGnss.h>
+#include <android/hardware/gnss/measurement_corrections/1.0/IMeasurementCorrections.h>
 
 using GnssLocation = ::android::hardware::gnss::V1_0::GnssLocation;
+using namespace android::hardware::gnss::measurement_corrections::V1_0;
 
 namespace android {
 namespace hardware {
@@ -29,6 +31,7 @@
 struct Utils {
     static void checkLocation(const GnssLocation& location, bool check_speed,
                               bool check_more_accuracies);
+    static const MeasurementCorrections getMockMeasurementCorrections();
 };
 
 }  // namespace common
diff --git a/gnss/measurement_corrections/1.0/Android.bp b/gnss/measurement_corrections/1.0/Android.bp
index 237b008..4aac7e0 100644
--- a/gnss/measurement_corrections/1.0/Android.bp
+++ b/gnss/measurement_corrections/1.0/Android.bp
@@ -14,12 +14,6 @@
         "android.hardware.gnss@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "GnssSingleSatCorrectionFlags",
-        "MeasurementCorrections",
-        "ReflectingPlane",
-        "SingleSatCorrection",
-    ],
     gen_java: true,
 }
 
diff --git a/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal b/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal
index c59a16c..21cbc2e 100644
--- a/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal
+++ b/graphics/bufferqueue/1.0/IGraphicBufferProducer.hal
@@ -546,7 +546,7 @@
      */
     disconnect(
             int32_t api,
-            DisconnectMode mode /* = DisconnectMode::API */
+            DisconnectMode mode
         ) generates (
             Status status
         );
diff --git a/graphics/bufferqueue/2.0/Android.bp b/graphics/bufferqueue/2.0/Android.bp
index 5385f28..97c05fa 100644
--- a/graphics/bufferqueue/2.0/Android.bp
+++ b/graphics/bufferqueue/2.0/Android.bp
@@ -17,11 +17,6 @@
         "android.hardware.graphics.common@1.2",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "ConnectionType",
-        "SlotIndex",
-        "Status",
-    ],
     gen_java: true,
 }
 
diff --git a/graphics/common/1.0/Android.bp b/graphics/common/1.0/Android.bp
index f88cbdf..175166d 100644
--- a/graphics/common/1.0/Android.bp
+++ b/graphics/common/1.0/Android.bp
@@ -10,15 +10,6 @@
     srcs: [
         "types.hal",
     ],
-    types: [
-        "BufferUsage",
-        "ColorMode",
-        "ColorTransform",
-        "Dataspace",
-        "Hdr",
-        "PixelFormat",
-        "Transform",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/graphics/common/1.1/Android.bp b/graphics/common/1.1/Android.bp
index 8bc68f5..0647d12d 100644
--- a/graphics/common/1.1/Android.bp
+++ b/graphics/common/1.1/Android.bp
@@ -13,13 +13,6 @@
     interfaces: [
         "android.hardware.graphics.common@1.0",
     ],
-    types: [
-        "BufferUsage",
-        "ColorMode",
-        "Dataspace",
-        "PixelFormat",
-        "RenderIntent",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/graphics/common/1.2/Android.bp b/graphics/common/1.2/Android.bp
index b6cd865..088bc37 100644
--- a/graphics/common/1.2/Android.bp
+++ b/graphics/common/1.2/Android.bp
@@ -14,14 +14,6 @@
         "android.hardware.graphics.common@1.0",
         "android.hardware.graphics.common@1.1",
     ],
-    types: [
-        "BufferUsage",
-        "ColorMode",
-        "Dataspace",
-        "HardwareBuffer",
-        "Hdr",
-        "PixelFormat",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/graphics/composer/2.1/Android.bp b/graphics/composer/2.1/Android.bp
index 8fbc8c2..38786fd 100644
--- a/graphics/composer/2.1/Android.bp
+++ b/graphics/composer/2.1/Android.bp
@@ -16,9 +16,6 @@
         "android.hardware.graphics.common@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Error",
-    ],
     gen_java: false,
 }
 
diff --git a/graphics/composer/2.1/IComposerClient.hal b/graphics/composer/2.1/IComposerClient.hal
index 5ad46f0..e036ce9 100644
--- a/graphics/composer/2.1/IComposerClient.hal
+++ b/graphics/composer/2.1/IComposerClient.hal
@@ -992,10 +992,10 @@
      *
      *   setLayerDataspace(Dataspace dataspace);
      *
-     * Sets the dataspace that the current buffer on this layer is in.
+     * Sets the dataspace of the layer.
      *
-     * The dataspace provides more information about how to interpret the
-     * buffer contents, such as the encoding standard and color transform.
+     * The dataspace provides more information about how to interpret the buffer
+     * or solid color, such as the encoding standard and color transform.
      *
      * See the values of Dataspace for more information.
      *
diff --git a/graphics/composer/2.3/IComposerClient.hal b/graphics/composer/2.3/IComposerClient.hal
index a3b7792..1eea306 100644
--- a/graphics/composer/2.3/IComposerClient.hal
+++ b/graphics/composer/2.3/IComposerClient.hal
@@ -28,7 +28,6 @@
 
 interface IComposerClient extends @2.2::IComposerClient {
 
-    // Bug: Move this enum to LLNDK after we decide where to put graphic types.
     /**
      * Required capabilities which are supported by the display. The
      * particular set of supported capabilities for a given display may be
@@ -62,9 +61,13 @@
          * PowerMode::DOZE_SUSPEND.
          */
         DOZE = 2,
+
+        /**
+         * Indicates that the display supports brightness operations.
+         */
+        BRIGHTNESS = 3,
     };
 
-    //Bug: Move this enum to LLNDK after we decide where to put graphic types.
     /**
      * PerFrameMetadataKey
      *
@@ -497,4 +500,38 @@
                        float maxLuminance,
                        float maxAverageLuminance,
                        float minLuminance);
+
+    /**
+     * Gets whether brightness operations are supported on a display.
+     *
+     * @param display
+     *      The display.
+     *
+     * @return error is NONE upon success. Otherwise,
+     *      BAD_DISPLAY   when the display is invalid, or
+     *      BAD_PARAMETER when the output parameter is invalid.
+     * @return support
+     *      Whether brightness operations are supported on the display.
+     */
+    getDisplayBrightnessSupport(Display display) generates (Error error, bool support);
+
+    /**
+     * Sets the brightness of a display.
+     *
+     * Ideally, the brightness change should take effect in the next frame post (so that it can be
+     * aligned with color transforms).
+     *
+     * @param display
+     *      The display whose brightness is set.
+     * @param brightness
+     *      A number between 0.0f (minimum brightness) and 1.0f (maximum brightness), or -1.0 to
+     *      turn the backlight off.
+     *
+     * @return error is NONE upon success. Otherwise,
+     *         BAD_DISPLAY   when the display is invalid, or
+     *         UNSUPPORTED   when brightness operations are not supported, or
+     *         BAD_PARAMETER when the brightness is invalid, or
+     *         NO_RESOURCES  when the brightness cannot be applied.
+     */
+    setDisplayBrightness(Display display, float brightness) generates (Error error);
 };
diff --git a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
index a272e72..1b40795 100644
--- a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
+++ b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerClient.h
@@ -172,7 +172,19 @@
         return Void();
     }
 
-   protected:
+    Return<void> getDisplayBrightnessSupport(
+            Display display, IComposerClient::getDisplayBrightnessSupport_cb hidl_cb) override {
+        bool support = false;
+        Error error = mHal->getDisplayBrightnessSupport(display, &support);
+        hidl_cb(error, support);
+        return Void();
+    }
+
+    Return<Error> setDisplayBrightness(Display display, float brightness) override {
+        return mHal->setDisplayBrightness(display, brightness);
+    }
+
+  protected:
     std::unique_ptr<V2_1::hal::ComposerCommandEngine> createCommandEngine() override {
         return std::make_unique<ComposerCommandEngine>(
             mHal, static_cast<V2_2::hal::ComposerResources*>(mResources.get()));
diff --git a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h
index a0812ad..186b004 100644
--- a/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h
+++ b/graphics/composer/2.3/utils/hal/include/composer-hal/2.3/ComposerHal.h
@@ -119,6 +119,8 @@
     virtual Error setLayerPerFrameMetadataBlobs(
         Display display, Layer layer,
         std::vector<IComposerClient::PerFrameMetadataBlob>& blobs) = 0;
+    virtual Error getDisplayBrightnessSupport(Display display, bool* outSupport) = 0;
+    virtual Error setDisplayBrightness(Display display, float brightness) = 0;
 };
 
 }  // namespace hal
diff --git a/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h b/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
index 41e333a..070cf80 100644
--- a/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
+++ b/graphics/composer/2.3/utils/passthrough/include/composer-passthrough/2.3/HwcHal.h
@@ -245,7 +245,29 @@
         return static_cast<Error>(err);
     }
 
-   protected:
+    Error getDisplayBrightnessSupport(Display display, bool* outSupport) {
+        if (!mDispatch.getDisplayBrightnessSupport) {
+            return Error::UNSUPPORTED;
+        }
+        bool support = false;
+        int32_t error = mDispatch.getDisplayBrightnessSupport(mDevice, display, &support);
+        *outSupport = support;
+        return static_cast<Error>(error);
+    }
+
+    Error setDisplayBrightness(Display display, float brightness) {
+        if (std::isnan(brightness) || brightness > 1.0f ||
+            (brightness < 0.0f && brightness != -1.0f)) {
+            return Error::BAD_PARAMETER;
+        }
+        if (!mDispatch.setDisplayBrightness) {
+            return Error::UNSUPPORTED;
+        }
+        int32_t error = mDispatch.setDisplayBrightness(mDevice, display, brightness);
+        return static_cast<Error>(error);
+    }
+
+  protected:
     bool initDispatch() override {
         if (!BaseType2_2::initDispatch()) {
             return false;
@@ -265,6 +287,10 @@
                                    &mDispatch.getDisplayCapabilities);
         this->initOptionalDispatch(HWC2_FUNCTION_SET_LAYER_PER_FRAME_METADATA_BLOBS,
                                    &mDispatch.setLayerPerFrameMetadataBlobs);
+        this->initOptionalDispatch(HWC2_FUNCTION_GET_DISPLAY_BRIGHTNESS_SUPPORT,
+                                   &mDispatch.getDisplayBrightnessSupport);
+        this->initOptionalDispatch(HWC2_FUNCTION_SET_DISPLAY_BRIGHTNESS,
+                                   &mDispatch.setDisplayBrightness);
         return true;
     }
 
@@ -277,6 +303,8 @@
         HWC2_PFN_GET_DISPLAYED_CONTENT_SAMPLE getDisplayedContentSample;
         HWC2_PFN_GET_DISPLAY_CAPABILITIES getDisplayCapabilities;
         HWC2_PFN_SET_LAYER_PER_FRAME_METADATA_BLOBS setLayerPerFrameMetadataBlobs;
+        HWC2_PFN_GET_DISPLAY_BRIGHTNESS_SUPPORT getDisplayBrightnessSupport;
+        HWC2_PFN_SET_DISPLAY_BRIGHTNESS setDisplayBrightness;
     } mDispatch = {};
 
     using BaseType2_2 = V2_2::passthrough::detail::HwcHalImpl<Hal>;
diff --git a/graphics/composer/2.3/utils/vts/ComposerVts.cpp b/graphics/composer/2.3/utils/vts/ComposerVts.cpp
index 0e541ed..4de85d6 100644
--- a/graphics/composer/2.3/utils/vts/ComposerVts.cpp
+++ b/graphics/composer/2.3/utils/vts/ComposerVts.cpp
@@ -186,6 +186,19 @@
     return capabilities;
 }
 
+bool ComposerClient::getDisplayBrightnessSupport(Display display) {
+    bool support = false;
+    mClient->getDisplayBrightnessSupport(display, [&](const auto& error, const auto& tmpSupport) {
+        ASSERT_EQ(Error::NONE, error) << "failed to get brightness support";
+        support = tmpSupport;
+    });
+    return support;
+}
+
+Error ComposerClient::setDisplayBrightness(Display display, float brightness) {
+    return mClient->setDisplayBrightness(display, brightness);
+}
+
 }  // namespace vts
 }  // namespace V2_3
 }  // namespace composer
diff --git a/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h b/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
index ad4ef0b..a0e764d 100644
--- a/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
+++ b/graphics/composer/2.3/utils/vts/include/composer-vts/2.3/ComposerVts.h
@@ -52,7 +52,7 @@
 
     std::unique_ptr<ComposerClient> createClient();
 
-   protected:
+  protected:
     explicit Composer(const sp<IComposer>& composer);
 
    private:
@@ -99,7 +99,11 @@
 
     std::vector<IComposerClient::PerFrameMetadataKey> getPerFrameMetadataKeys_2_3(Display display);
 
-   private:
+    bool getDisplayBrightnessSupport(Display display);
+
+    Error setDisplayBrightness(Display display, float brightness);
+
+  private:
     const sp<IComposerClient> mClient;
 };
 
diff --git a/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp b/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
index de74e28..b983e42 100644
--- a/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
+++ b/graphics/composer/2.3/vts/functional/VtsHalGraphicsComposerV2_3TargetTest.cpp
@@ -600,6 +600,36 @@
     }
 }
 
+/*
+ * Test that getDisplayBrightnessSupport works as expected.
+ */
+TEST_F(GraphicsComposerHidlTest, getDisplayBrightnessSupport) {
+    auto capabilities = mComposerClient->getDisplayCapabilities(mPrimaryDisplay);
+    bool brightnessSupport =
+            std::find(capabilities.begin(), capabilities.end(),
+                      IComposerClient::DisplayCapability::BRIGHTNESS) != capabilities.end();
+    EXPECT_EQ(mComposerClient->getDisplayBrightnessSupport(mPrimaryDisplay), brightnessSupport);
+}
+
+/*
+ * Test that if brightness operations are supported, setDisplayBrightness works as expected.
+ */
+TEST_F(GraphicsComposerHidlTest, setDisplayBrightness) {
+    if (!mComposerClient->getDisplayBrightnessSupport(mPrimaryDisplay)) {
+        EXPECT_EQ(mComposerClient->getRaw()->setDisplayBrightness(mPrimaryDisplay, 0.5f),
+                  Error::UNSUPPORTED);
+        GTEST_SUCCEED() << "Brightness operations are not supported";
+    }
+
+    EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, 0.0f), Error::NONE);
+    EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, 0.5f), Error::NONE);
+    EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, 1.0f), Error::NONE);
+    EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, -1.0f), Error::NONE);
+
+    EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, +2.0f), Error::BAD_PARAMETER);
+    EXPECT_EQ(mComposerClient->setDisplayBrightness(mPrimaryDisplay, -2.0f), Error::BAD_PARAMETER);
+}
+
 }  // namespace
 }  // namespace vts
 }  // namespace V2_3
diff --git a/graphics/mapper/2.0/Android.bp b/graphics/mapper/2.0/Android.bp
index 2f9a344..96e812b 100644
--- a/graphics/mapper/2.0/Android.bp
+++ b/graphics/mapper/2.0/Android.bp
@@ -15,10 +15,6 @@
         "android.hardware.graphics.common@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Error",
-        "YCbCrLayout",
-    ],
     gen_java: false,
 }
 
diff --git a/graphics/mapper/3.0/Android.bp b/graphics/mapper/3.0/Android.bp
index b2f0aa6..e348296 100644
--- a/graphics/mapper/3.0/Android.bp
+++ b/graphics/mapper/3.0/Android.bp
@@ -17,10 +17,6 @@
         "android.hardware.graphics.common@1.2",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Error",
-        "YCbCrLayout",
-    ],
     gen_java: false,
 }
 
diff --git a/health/1.0/Android.bp b/health/1.0/Android.bp
index dcbaf58..e03b142 100644
--- a/health/1.0/Android.bp
+++ b/health/1.0/Android.bp
@@ -13,13 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "BatteryHealth",
-        "BatteryStatus",
-        "HealthConfig",
-        "HealthInfo",
-        "Result",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/health/2.0/Android.bp b/health/2.0/Android.bp
index 0325467..f472b27 100644
--- a/health/2.0/Android.bp
+++ b/health/2.0/Android.bp
@@ -15,13 +15,6 @@
         "android.hardware.health@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "DiskStats",
-        "HealthInfo",
-        "Result",
-        "StorageAttribute",
-        "StorageInfo",
-    ],
     gen_java: true,
 }
 
diff --git a/health/2.0/vts/functional/Android.bp b/health/2.0/vts/functional/Android.bp
index 3544e5f..b090548 100644
--- a/health/2.0/vts/functional/Android.bp
+++ b/health/2.0/vts/functional/Android.bp
@@ -19,6 +19,7 @@
     defaults: ["VtsHalTargetTestDefaults"],
     srcs: ["VtsHalHealthV2_0TargetTest.cpp"],
     static_libs: [
+        "libgflags",
         "android.hardware.health@1.0",
         "android.hardware.health@2.0",
     ],
diff --git a/health/2.0/vts/functional/VtsHalHealthV2_0TargetTest.cpp b/health/2.0/vts/functional/VtsHalHealthV2_0TargetTest.cpp
index f895aec..74fe4fb 100644
--- a/health/2.0/vts/functional/VtsHalHealthV2_0TargetTest.cpp
+++ b/health/2.0/vts/functional/VtsHalHealthV2_0TargetTest.cpp
@@ -17,11 +17,14 @@
 #define LOG_TAG "health_hidl_hal_test"
 
 #include <mutex>
+#include <set>
+#include <string>
 
 #include <VtsHalHidlTargetTestBase.h>
 #include <android-base/logging.h>
 #include <android/hardware/health/2.0/IHealth.h>
 #include <android/hardware/health/2.0/types.h>
+#include <gflags/gflags.h>
 
 using ::testing::AssertionFailure;
 using ::testing::AssertionResult;
@@ -29,6 +32,41 @@
 using ::testing::VtsHalHidlTargetTestBase;
 using ::testing::VtsHalHidlTargetTestEnvBase;
 
+DEFINE_bool(force, false, "Force test healthd even when the default instance is present.");
+
+// If GTEST_SKIP is not implemented, use our own skipping mechanism
+#ifndef GTEST_SKIP
+static std::mutex gSkippedTestsMutex;
+static std::set<std::string> gSkippedTests;
+static std::string GetCurrentTestName() {
+    const auto& info = ::testing::UnitTest::GetInstance()->current_test_info();
+#ifdef GTEST_REMOVE_LEGACY_TEST_CASEAPI_
+    std::string test_suite = info->test_suite_name();
+#else
+    std::string test_suite = info->test_case_name();
+#endif
+    return test_suite + "." + info->name();
+}
+
+#define GTEST_SKIP()                                           \
+    do {                                                       \
+        std::unique_lock<std::mutex> lock(gSkippedTestsMutex); \
+        gSkippedTests.insert(GetCurrentTestName());            \
+        return;                                                \
+    } while (0)
+
+#define SKIP_IF_SKIPPED()                                                      \
+    do {                                                                       \
+        std::unique_lock<std::mutex> lock(gSkippedTestsMutex);                 \
+        if (gSkippedTests.find(GetCurrentTestName()) != gSkippedTests.end()) { \
+            std::cerr << "[  SKIPPED ] " << GetCurrentTestName() << std::endl; \
+            return;                                                            \
+        }                                                                      \
+    } while (0)
+#else
+#define SKIP_IF_SKIPPED()
+#endif
+
 namespace android {
 namespace hardware {
 namespace health {
@@ -57,6 +95,14 @@
    public:
     virtual void SetUp() override {
         std::string serviceName = HealthHidlEnvironment::Instance()->getServiceName<IHealth>();
+
+        if (serviceName == "backup" && !FLAGS_force &&
+            ::testing::VtsHalHidlTargetTestBase::getService<IHealth>() != nullptr) {
+            LOG(INFO) << "Skipping tests on healthd because the default instance is present. "
+                      << "Use --force if you really want to test healthd.";
+            GTEST_SKIP();
+        }
+
         LOG(INFO) << "get service with name:" << serviceName;
         ASSERT_FALSE(serviceName.empty());
         mHealth = ::testing::VtsHalHidlTargetTestBase::getService<IHealth>(serviceName);
@@ -111,6 +157,7 @@
  * unregisterCallback, and update.
  */
 TEST_F(HealthHidlTest, Callbacks) {
+    SKIP_IF_SKIPPED();
     using namespace std::chrono_literals;
     sp<Callback> firstCallback = new Callback();
     sp<Callback> secondCallback = new Callback();
@@ -147,6 +194,7 @@
 }
 
 TEST_F(HealthHidlTest, UnregisterNonExistentCallback) {
+    SKIP_IF_SKIPPED();
     sp<Callback> callback = new Callback();
     auto ret = mHealth->unregisterCallback(callback);
     ASSERT_OK(ret);
@@ -225,6 +273,7 @@
  * Tests the values returned by getChargeCounter() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getChargeCounter) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getChargeCounter([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, std::to_string(value), value > 0);
     }));
@@ -234,6 +283,7 @@
  * Tests the values returned by getCurrentNow() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getCurrentNow) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getCurrentNow([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, std::to_string(value), value != INT32_MIN);
     }));
@@ -243,6 +293,7 @@
  * Tests the values returned by getCurrentAverage() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getCurrentAverage) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getCurrentAverage([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, std::to_string(value), value != INT32_MIN);
     }));
@@ -252,6 +303,7 @@
  * Tests the values returned by getCapacity() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getCapacity) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getCapacity([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, std::to_string(value), 0 <= value && value <= 100);
     }));
@@ -261,6 +313,7 @@
  * Tests the values returned by getEnergyCounter() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getEnergyCounter) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getEnergyCounter([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, std::to_string(value), value != INT64_MIN);
     }));
@@ -270,6 +323,7 @@
  * Tests the values returned by getChargeStatus() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getChargeStatus) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getChargeStatus([](auto result, auto value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(
             result, toString(value),
@@ -281,6 +335,7 @@
  * Tests the values returned by getStorageInfo() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getStorageInfo) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getStorageInfo([](auto result, auto& value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, toString(value), verifyStorageInfo(value));
     }));
@@ -290,6 +345,7 @@
  * Tests the values returned by getDiskStats() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getDiskStats) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getDiskStats([](auto result, auto& value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, toString(value), true);
     }));
@@ -299,6 +355,7 @@
  * Tests the values returned by getHealthInfo() from interface IHealth.
  */
 TEST_F(HealthHidlTest, getHealthInfo) {
+    SKIP_IF_SKIPPED();
     EXPECT_OK(mHealth->getHealthInfo([](auto result, auto& value) {
         EXPECT_VALID_OR_UNSUPPORTED_PROP(result, toString(value), verifyHealthInfo(value));
     }));
@@ -314,6 +371,7 @@
     ::testing::AddGlobalTestEnvironment(HealthHidlEnvironment::Instance());
     ::testing::InitGoogleTest(&argc, argv);
     HealthHidlEnvironment::Instance()->init(&argc, argv);
+    gflags::ParseCommandLineFlags(&argc, &argv, true /* remove flags */);
     int status = RUN_ALL_TESTS();
     LOG(INFO) << "Test result = " << status;
     return status;
diff --git a/health/storage/1.0/Android.bp b/health/storage/1.0/Android.bp
index 35ee34f..45fa01f 100644
--- a/health/storage/1.0/Android.bp
+++ b/health/storage/1.0/Android.bp
@@ -14,9 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Result",
-    ],
     gen_java: true,
 }
 
diff --git a/input/common/1.0/Android.bp b/input/common/1.0/Android.bp
index 3de18b4..07b38cf 100644
--- a/input/common/1.0/Android.bp
+++ b/input/common/1.0/Android.bp
@@ -9,23 +9,6 @@
     srcs: [
         "types.hal",
     ],
-    types: [
-        "Action",
-        "Axis",
-        "Button",
-        "Classification",
-        "EdgeFlag",
-        "Flag",
-        "Meta",
-        "MotionEvent",
-        "PointerCoords",
-        "PointerProperties",
-        "PolicyFlag",
-        "Source",
-        "SourceClass",
-        "ToolType",
-        "VideoFrame",
-    ],
     gen_java: true,
 }
 
diff --git a/ir/1.0/Android.bp b/ir/1.0/Android.bp
index 272acb3..5f25172 100644
--- a/ir/1.0/Android.bp
+++ b/ir/1.0/Android.bp
@@ -13,9 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "ConsumerIrFreqRange",
-    ],
     gen_java: true,
 }
 
diff --git a/keymaster/3.0/Android.bp b/keymaster/3.0/Android.bp
index e0f1b94..ca17a9b 100644
--- a/keymaster/3.0/Android.bp
+++ b/keymaster/3.0/Android.bp
@@ -13,26 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Algorithm",
-        "BlockMode",
-        "Digest",
-        "EcCurve",
-        "ErrorCode",
-        "HardwareAuthToken",
-        "HardwareAuthenticatorType",
-        "KeyBlobUsageRequirements",
-        "KeyCharacteristics",
-        "KeyDerivationFunction",
-        "KeyFormat",
-        "KeyOrigin",
-        "KeyParameter",
-        "KeyPurpose",
-        "PaddingMode",
-        "SecurityLevel",
-        "Tag",
-        "TagType",
-    ],
     gen_java: false,
 }
 
diff --git a/keymaster/4.0/Android.bp b/keymaster/4.0/Android.bp
index 2daad41..cd46fd9 100644
--- a/keymaster/4.0/Android.bp
+++ b/keymaster/4.0/Android.bp
@@ -14,29 +14,6 @@
         "android.hardware.keymaster@3.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Algorithm",
-        "BlockMode",
-        "Constants",
-        "Digest",
-        "EcCurve",
-        "ErrorCode",
-        "HardwareAuthToken",
-        "HardwareAuthenticatorType",
-        "HmacSharingParameters",
-        "KeyBlobUsageRequirements",
-        "KeyCharacteristics",
-        "KeyDerivationFunction",
-        "KeyFormat",
-        "KeyOrigin",
-        "KeyParameter",
-        "KeyPurpose",
-        "PaddingMode",
-        "SecurityLevel",
-        "Tag",
-        "TagType",
-        "VerificationToken",
-    ],
     gen_java: false,
 }
 
diff --git a/light/2.0/Android.bp b/light/2.0/Android.bp
index ee58f93..6068752 100644
--- a/light/2.0/Android.bp
+++ b/light/2.0/Android.bp
@@ -13,13 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Brightness",
-        "Flash",
-        "LightState",
-        "Status",
-        "Type",
-    ],
     gen_java: true,
 }
 
diff --git a/media/1.0/Android.bp b/media/1.0/Android.bp
index 45fedb9..844cfa2 100644
--- a/media/1.0/Android.bp
+++ b/media/1.0/Android.bp
@@ -12,11 +12,6 @@
     interfaces: [
         "android.hardware.graphics.common@1.0",
     ],
-    types: [
-        "AnwBuffer",
-        "AnwBufferAttributes",
-        "Rect",
-    ],
     gen_java: true,
 }
 
diff --git a/media/bufferpool/1.0/Android.bp b/media/bufferpool/1.0/Android.bp
index 986da8a..86297d3 100644
--- a/media/bufferpool/1.0/Android.bp
+++ b/media/bufferpool/1.0/Android.bp
@@ -15,12 +15,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Buffer",
-        "BufferStatus",
-        "BufferStatusMessage",
-        "ResultStatus",
-    ],
     gen_java: false,
 }
 
diff --git a/media/bufferpool/2.0/Android.bp b/media/bufferpool/2.0/Android.bp
index 1f8bbdb..0faa00e 100644
--- a/media/bufferpool/2.0/Android.bp
+++ b/media/bufferpool/2.0/Android.bp
@@ -16,13 +16,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Buffer",
-        "BufferInvalidationMessage",
-        "BufferStatus",
-        "BufferStatusMessage",
-        "ResultStatus",
-    ],
     gen_java: false,
 }
 
diff --git a/media/c2/1.0/Android.bp b/media/c2/1.0/Android.bp
index 56c78b2..6c836af 100644
--- a/media/c2/1.0/Android.bp
+++ b/media/c2/1.0/Android.bp
@@ -25,28 +25,6 @@
         "android.hardware.media@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "BaseBlock",
-        "Block",
-        "Buffer",
-        "FieldDescriptor",
-        "FieldId",
-        "FieldSupportedValues",
-        "FieldSupportedValuesQuery",
-        "FieldSupportedValuesQueryResult",
-        "FrameData",
-        "InfoBuffer",
-        "ParamDescriptor",
-        "ParamField",
-        "ParamFieldValues",
-        "SettingResult",
-        "Status",
-        "StructDescriptor",
-        "Work",
-        "WorkBundle",
-        "WorkOrdinal",
-        "Worklet",
-    ],
     gen_java: false,
 }
 
diff --git a/media/c2/1.0/IComponent.hal b/media/c2/1.0/IComponent.hal
index 7fd551f..abd1448 100644
--- a/media/c2/1.0/IComponent.hal
+++ b/media/c2/1.0/IComponent.hal
@@ -22,6 +22,7 @@
 import IConfigurable;
 import IComponentInterface;
 import IComponentListener;
+import IInputSink;
 import IInputSurface;
 import IInputSurfaceConnection;
 
@@ -355,11 +356,19 @@
      * Returns the @ref IComponentInterface instance associated to this
      * component.
      *
-     * An @p IConfigurable instance for the component can be obtained by calling
+     * An @ref IConfigurable instance for the component can be obtained by calling
      * IComponentInterface::getConfigurable() on the returned @p intf.
      *
      * @return intf `IComponentInterface` instance. This must not be null.
      */
     getInterface() generates (IComponentInterface intf);
+
+    /**
+     * Returns an @ref IInputSink instance that has the component as the
+     * underlying implementation.
+     *
+     * @return sink `IInputSink` instance.
+     */
+    asInputSink() generates (IInputSink sink);
 };
 
diff --git a/media/omx/1.0/Android.bp b/media/omx/1.0/Android.bp
index 89709bd..ee51d5d 100644
--- a/media/omx/1.0/Android.bp
+++ b/media/omx/1.0/Android.bp
@@ -21,13 +21,6 @@
         "android.hardware.media@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "CodecBuffer",
-        "ColorAspects",
-        "Message",
-        "PortMode",
-        "Status",
-    ],
     gen_java: false,
 }
 
diff --git a/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp b/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp
index 88a9e26..f299e36 100644
--- a/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp
+++ b/media/omx/1.0/vts/functional/common/media_hidl_test_common.cpp
@@ -387,17 +387,28 @@
                                   OMX_StateIdle);
     ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
 
+    OMX_PARAM_PORTDEFINITIONTYPE portDefInput;
+    OMX_PARAM_PORTDEFINITIONTYPE portDefOutput;
+    status = getPortParam(omxNode, OMX_IndexParamPortDefinition, kPortIndexInput, &portDefInput);
+    EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+    status = getPortParam(omxNode, OMX_IndexParamPortDefinition, kPortIndexOutput, &portDefOutput);
+    EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+
     // Dont switch states until the ports are populated
-    status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
-    ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+    if (portDefInput.nBufferCountActual || portDefOutput.nBufferCountActual) {
+        status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
+        ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+    }
 
     // allocate buffers on input port
     ASSERT_NO_FATAL_FAILURE(allocatePortBuffers(
         omxNode, iBuffer, kPortIndexInput, pm[0], allocGrap));
 
     // Dont switch states until the ports are populated
-    status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
-    ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+    if (portDefOutput.nBufferCountActual) {
+        status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
+        ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+    }
 
     // allocate buffers on output port
     ASSERT_NO_FATAL_FAILURE(allocatePortBuffers(
@@ -430,9 +441,18 @@
                                   OMX_StateLoaded);
     ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
 
+    OMX_PARAM_PORTDEFINITIONTYPE portDefInput;
+    OMX_PARAM_PORTDEFINITIONTYPE portDefOutput;
+    status = getPortParam(omxNode, OMX_IndexParamPortDefinition, kPortIndexInput, &portDefInput);
+    EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+    status = getPortParam(omxNode, OMX_IndexParamPortDefinition, kPortIndexOutput, &portDefOutput);
+    EXPECT_EQ(status, ::android::hardware::media::omx::V1_0::Status::OK);
+
     // dont change state until all buffers are freed
-    status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
-    ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+    if (portDefInput.nBufferCountActual || portDefOutput.nBufferCountActual) {
+        status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
+        ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+    }
 
     for (size_t i = 0; i < iBuffer->size(); ++i) {
         status = omxNode->freeBuffer(kPortIndexInput, (*iBuffer)[i].id);
@@ -440,8 +460,10 @@
     }
 
     // dont change state until all buffers are freed
-    status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
-    ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+    if (portDefOutput.nBufferCountActual) {
+        status = observer->dequeueMessage(&msg, DEFAULT_TIMEOUT, iBuffer, oBuffer);
+        ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::TIMED_OUT);
+    }
 
     for (size_t i = 0; i < oBuffer->size(); ++i) {
         status = omxNode->freeBuffer(kPortIndexOutput, (*oBuffer)[i].id);
diff --git a/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp b/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
index 4ddc833..1c1d39b 100644
--- a/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
+++ b/media/omx/1.0/vts/functional/component/VtsHalMediaOmxV1_0TargetComponentTest.cpp
@@ -115,6 +115,7 @@
         }
         if (compClass == unknown_class) disableTest = true;
         isSecure = false;
+        mTunnel = false;
         size_t suffixLen = strlen(".secure");
         if (strlen(gEnv->getComponent().c_str()) >= suffixLen) {
             isSecure =
@@ -122,6 +123,18 @@
                             strlen(gEnv->getComponent().c_str()) - suffixLen,
                         ".secure");
         }
+        if (compClass == video_decoder) {
+            omxNode->configureVideoTunnelMode(
+                1, OMX_TRUE, 0,
+                [&](android::hardware::media::omx::V1_0::Status _s,
+                    const ::android::hardware::hidl_handle& sidebandHandle) {
+                    (void)sidebandHandle;
+                    if (_s == android::hardware::media::omx::V1_0::Status::OK)
+                        this->mTunnel = true;
+                });
+        }
+        // NOTES: secure components are not covered in these tests.
+        // we are disabling tests for them
         if (disableTest) std::cout << "[   WARN   ] Test Disabled \n";
     }
 
@@ -149,6 +162,7 @@
     sp<CodecObserver> observer;
     sp<IOmxNode> omxNode;
     standardCompClass compClass;
+    bool mTunnel;
     bool isSecure;
     bool disableTest;
 
@@ -991,7 +1005,8 @@
     ASSERT_NO_FATAL_FAILURE(
         changeStateLoadedtoIdle(omxNode, observer, &pBuffer[0], &pBuffer[1],
                                 kPortIndexInput, kPortIndexOutput, portMode));
-    for (size_t i = portBase; i < portBase + 2; i++) {
+    int range = mTunnel ? 1 : 2;
+    for (size_t i = portBase; i < portBase + range; i++) {
         status =
             omxNode->sendCommand(toRawCommandType(OMX_CommandPortDisable), i);
         ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
@@ -1104,7 +1119,8 @@
             dispatchOutputBuffer(omxNode, &pBuffer[1], i, portMode[1]));
     }
 
-    for (size_t i = portBase; i < portBase + 2; i++) {
+    int range = mTunnel ? 1 : 2;
+    for (size_t i = portBase; i < portBase + range; i++) {
         status =
             omxNode->sendCommand(toRawCommandType(OMX_CommandPortDisable), i);
         ASSERT_EQ(status, android::hardware::media::omx::V1_0::Status::OK);
diff --git a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
index 1db9f75..df048c6 100644
--- a/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
+++ b/media/omx/1.0/vts/functional/video/VtsHalMediaOmxV1_0TargetVideoDecTest.cpp
@@ -153,7 +153,17 @@
                         ".secure");
         }
         if (isSecure) disableTest = true;
+        omxNode->configureVideoTunnelMode(
+            1, OMX_TRUE, 0,
+            [&](android::hardware::media::omx::V1_0::Status _s,
+                const ::android::hardware::hidl_handle& sidebandHandle) {
+                (void)sidebandHandle;
+                if (_s == android::hardware::media::omx::V1_0::Status::OK)
+                    this->disableTest = true;
+            });
         if (disableTest) std::cout << "[   WARN   ] Test Disabled \n";
+        // NOTES: secure and tunneled components are not covered in these tests.
+        // we are disabling tests for them
     }
 
     virtual void TearDown() override {
diff --git a/memtrack/1.0/Android.bp b/memtrack/1.0/Android.bp
index d56aa64..0f24977 100644
--- a/memtrack/1.0/Android.bp
+++ b/memtrack/1.0/Android.bp
@@ -13,12 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "MemtrackFlag",
-        "MemtrackRecord",
-        "MemtrackStatus",
-        "MemtrackType",
-    ],
     gen_java: true,
 }
 
diff --git a/neuralnetworks/1.0/Android.bp b/neuralnetworks/1.0/Android.bp
index e8600d3..63b5b98 100644
--- a/neuralnetworks/1.0/Android.bp
+++ b/neuralnetworks/1.0/Android.bp
@@ -16,22 +16,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Capabilities",
-        "DataLocation",
-        "DeviceStatus",
-        "ErrorStatus",
-        "FusedActivationFunc",
-        "Model",
-        "Operand",
-        "OperandLifeTime",
-        "OperandType",
-        "Operation",
-        "OperationType",
-        "PerformanceInfo",
-        "Request",
-        "RequestArgument",
-    ],
     gen_java: false,
 }
 
diff --git a/neuralnetworks/1.1/Android.bp b/neuralnetworks/1.1/Android.bp
index 24d8396..1158a90 100644
--- a/neuralnetworks/1.1/Android.bp
+++ b/neuralnetworks/1.1/Android.bp
@@ -14,13 +14,6 @@
         "android.hardware.neuralnetworks@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Capabilities",
-        "ExecutionPreference",
-        "Model",
-        "Operation",
-        "OperationType",
-    ],
     gen_java: false,
 }
 
diff --git a/neuralnetworks/1.2/Android.bp b/neuralnetworks/1.2/Android.bp
index daf0c18..085bda1 100644
--- a/neuralnetworks/1.2/Android.bp
+++ b/neuralnetworks/1.2/Android.bp
@@ -21,24 +21,6 @@
         "android.hidl.base@1.0",
         "android.hidl.safe_union@1.0",
     ],
-    types: [
-        "Constant",
-        "DeviceType",
-        "Extension",
-        "FmqRequestDatum",
-        "FmqResultDatum",
-        "MeasureTiming",
-        "Model",
-        "Operand",
-        "OperandType",
-        "OperandTypeRange",
-        "Operation",
-        "OperationType",
-        "OperationTypeRange",
-        "OutputShape",
-        "SymmPerChannelQuantParams",
-        "Timing",
-    ],
     gen_java: false,
 }
 
diff --git a/neuralnetworks/1.2/types.hal b/neuralnetworks/1.2/types.hal
index ab17598..bb14dec 100644
--- a/neuralnetworks/1.2/types.hal
+++ b/neuralnetworks/1.2/types.hal
@@ -218,6 +218,7 @@
      *         ) / sum(1)
      *
      * Supported tensor {@link OperandType}:
+     * * {@link OperandType::TENSOR_FLOAT16} (since API level 29)
      * * {@link OperandType::TENSOR_FLOAT32}
      * * {@link OperandType::TENSOR_QUANT8_ASYMM}
      *
@@ -333,7 +334,7 @@
      *         ) + bias[channel]
      *
      * Supported tensor {@link OperandType} configurations:
-     * * 32 bit Floating point :
+     * * 32 bit floating point:
      * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias.
      *
      * * Quantized:
@@ -342,15 +343,15 @@
      * * * input.scale * filter.scale).
      *
      * Available since API level 29:
+     * * 16 bit floating point:
+     * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
+     *
      * * Quantized with symmetric per channel quantization for the filter:
      * * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, and output.
      * * * {@link OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter.
      * * * {@link OperandType::TENSOR_INT32} for bias (scale set to 0.0,
      * * * each value scaling is separate and equal to input.scale * filter.scales[channel]).
      *
-     * * 16 bit Floating point:
-     * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
-     *
      * Supported tensor rank: 4, with "NHWC" or "NCHW" data layout.
      * With the default data layout NHWC, the data is stored in the order of:
      * [batch, height, width, channels]. Alternatively, the data layout could
@@ -482,7 +483,7 @@
      *         ) + bias[k * channel_multiplier + q]
      *
      * Supported tensor {@link OperandType} configurations:
-     * * 32 bit Floating point :
+     * * 32 bit floating point:
      * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias.
      *
      * * Quantized:
@@ -491,6 +492,9 @@
      * * * input.scale * filter.scale).
      *
      * Available since API level 29:
+     * * 16 bit floating point:
+     * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
+     *
      * * Quantized with symmetric per channel quantization for the filter:
      * * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, and output.
      * * * {@link OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter.
@@ -1010,6 +1014,7 @@
      *     output = 1 / (1 + exp(-input))
      *
      * Supported tensor {@link OperandType}:
+     * * {@link OperandType::TENSOR_FLOAT16} (since API level 29)
      * * {@link OperandType::TENSOR_FLOAT32}
      * * {@link OperandType::TENSOR_QUANT8_ASYMM}
      *
@@ -1315,6 +1320,7 @@
      *         )
      *
      * Supported tensor {@link OperandType}:
+     * * {@link OperandType::TENSOR_FLOAT16} (since API level 29)
      * * {@link OperandType::TENSOR_FLOAT32}
      * * {@link OperandType::TENSOR_QUANT8_ASYMM}
      *
@@ -1623,6 +1629,7 @@
      * independently on each 1-D slice along specified dimension.
      *
      * Supported tensor {@link OperandType}:
+     * * {@link OperandType::TENSOR_FLOAT16} (since API level 29)
      * * {@link OperandType::TENSOR_FLOAT32}
      * * {@link OperandType::TENSOR_QUANT8_ASYMM}
      *
@@ -1631,8 +1638,12 @@
      *
      * Inputs:
      * * 0: A 2-D or 4-D tensor, specifying the tensor to be reshaped.
-     * * 1: An {@link OperandType::FLOAT32} scalar, specifying the positive
-     *      scaling factor for the exponent, beta.
+     * * 1: A scalar, specifying the positive scaling factor for the exponent,
+     *      beta. If input0 is of {@link OperandType::TENSOR_FLOAT32} or
+     *      {@link OperandType::TENSOR_QUANT8_ASYMM}, the scalar must be of
+     *      {@link OperandType::FLOAT32}. If input0 is of {@link
+     *      OperandType::TENSOR_FLOAT16}, then the scalar must be of {@link
+     *      OperandType::FLOAT16}.
      * * 2: An optional {@link OperandType::INT32} scalar, default to -1,
      *      specifying the dimension the activation would be performed on.
      *      Negative index is used to specify axis from the end (e.g. -1 for
@@ -2706,11 +2717,17 @@
      * * 10: An {@link OperandType::INT32} scalar, only used when input7 is
      *       set to true, specifying the maximum number of detections when
      *       applying NMS algorithm for each single class.
-     * * 11: An {@link OperandType::FLOAT32} scalar, score_threshold. Boxes
-     *       with scores lower than the threshold are filtered before sending
-     *       to the NMS algorithm.
-     * * 12: An {@link OperandType::FLOAT32} scalar, specifying the IoU
-     *       threshold for hard NMS.
+     * * 11: A scalar, score_threshold. Boxes with scores lower than the
+     *       threshold are filtered before sending to the NMS algorithm. The
+     *       scalar must be of {@link OperandType::FLOAT16} if input0 is of
+     *       {@link OperandType::TENSOR_FLOAT16} and of {@link
+     *       OperandType::FLOAT32} if input0 is of {@link
+     *       OperandType::TENSOR_FLOAT32}.
+     * * 12: A scalar, specifying the IoU threshold for hard NMS. The scalar
+     *       must be of {@link OperandType::FLOAT16} if input0 is of {@link
+     *       OperandType::TENSOR_FLOAT16} and of {@link
+     *       OperandType::FLOAT32} if input0 is of {@link
+     *       OperandType::TENSOR_FLOAT32}.
      * * 13: An {@link OperandType::BOOL} scalar, set to true to include
      *       background class in the list of label map for the output, set
      *       to false to not include the background. When the background
@@ -3007,11 +3024,11 @@
      * where channel_multiplier = depth_out / num_groups
      *
      * Supported tensor {@link OperandType} configurations:
-     * * 32 bit Floating point :
-     * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias.
+     * * 16 bit floating point:
+     * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
      *
-     * * 16 bit Floating point:
-     * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
+     * * 32 bit floating point:
+     * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias.
      *
      * * Quantized:
      * * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, filter, and output.
@@ -3188,12 +3205,21 @@
      *
      * Inputs:
      * * 0: An n-D tensor, specifying the tensor to be normalized.
-     * * 1: An {@link OperandType::FLOAT32} scalar, specifying gamma, the
-     *      scale applied to the normalized tensor.
-     * * 2: An {@link OperandType::FLOAT32} scalar, specifying beta, the
-     *      offset applied to the normalized tensor.
-     * * 3: An {@link OperandType::FLOAT32} scalar, specifying epsilon, the
-     *      small value added to variance to avoid dividing by zero.
+     * * 1: A scalar, specifying gamma, the scale applied to the normalized
+     *      tensor. The scalar must be of {@link OperandType::FLOAT16} if
+     *      input0 is of {@link OperandType::TENSOR_FLOAT16} and of {@link
+     *      OperandType::FLOAT32} if input0 is of {@link
+     *      OperandType::TENSOR_FLOAT32}.
+     * * 2: A scalar, specifying beta, the offset applied to the normalized
+     *      tensor. The scalar must be of {@link OperandType::FLOAT16} if
+     *      input0 is of {@link OperandType::TENSOR_FLOAT16} and of {@link
+     *      OperandType::FLOAT32} if input0 is of {@link
+     *      OperandType::TENSOR_FLOAT32}.
+     * * 3: A scalar, specifying epsilon, the small value added to variance to
+     *      avoid dividing by zero. The scalar must be of {@link OperandType::FLOAT16} if
+     *      input0 is of {@link OperandType::TENSOR_FLOAT16} and of {@link
+     *      OperandType::FLOAT32} if input0 is of {@link
+     *      OperandType::TENSOR_FLOAT32}.
      * * 4: An {@link OperandType::BOOL} scalar, set to true to specify
      *      NCHW data layout for input0 and output0. Set to false for NHWC.
      *
@@ -3475,10 +3501,12 @@
      *      padding[i, 1] specifies the number of elements to be padded after
      *      the end of dimension i.
      * * 2: An scalar specifying the value to use for padding input0.
+     *      For input tensor of {@link OperandType::TENSOR_FLOAT16}, the
+     *      pad value must be of {@link OperandType::FLOAT16}.
      *      For input tensor of {@link OperandType::TENSOR_FLOAT32}, the
-     *      pad value should be of {@link OperandType::FLOAT32}.
+     *      pad value must be of {@link OperandType::FLOAT32}.
      *      For input tensor of {@link OperandType::TENSOR_QUANT8_ASYMM},
-     *      the pad value should be of {@link OperandType::INT32}. The
+     *      the pad value must be of {@link OperandType::INT32}. The
      *      scale and zeroPoint are assumed to be the same as in input0.
      *
      * Outputs:
@@ -3627,25 +3655,25 @@
      *      weights.
      * * 5: The recurrent-to-input weights.
      *      A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM}
-     *      and shape [outputSize, inputSize] specifying recurrent-to-input part
+     *      and shape [outputSize, outputSize] specifying recurrent-to-input part
      *      of weights for fully-connected layer inside the LSTM cell.
      *      Quantization zero point and scale must be the same across all the
      *      weights.
      * * 6: The recurrent-to-forget weights.
      *      A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM}
-     *      and shape [outputSize, inputSize] specifying recurrent-to-forget
+     *      and shape [outputSize, outputSize] specifying recurrent-to-forget
      *      part of weights for fully-connected layer inside the LSTM cell.
      *      Quantization zero point and scale must be the same across all the
      *      weights.
      * * 7: The recurrent-to-cell weights.
      *      A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM}
-     *      and shape [outputSize, inputSize] specifying recurrent-to-cell part
+     *      and shape [outputSize, outputSize] specifying recurrent-to-cell part
      *      of weights for fully-connected layer inside the LSTM cell.
      *      Quantization zero point and scale must be the same across all the
      *      weights.
      * * 8: The recurrent-to-output weights.
      *      A 2-D tensor of type {@link OperandType::TENSOR_QUANT8_ASYMM}
-     *      and shape [outputSize, inputSize] specifying recurrent-to-output
+     *      and shape [outputSize, outputSize] specifying recurrent-to-output
      *      part of weights for fully-connected layer inside the LSTM cell.
      *      Quantization zero point and scale must be the same across all the
      *      weights.
@@ -4195,7 +4223,7 @@
     TOPK_V2 = 90,
 
     /**
-     * Performs the tranpose of 2-D convolution operation.
+     * Performs the transpose of 2-D convolution operation.
      *
      * This operation is sometimes called "deconvolution" after Deconvolutional
      * Networks, but is actually the transpose (gradient) of
@@ -4205,7 +4233,10 @@
      * padding.
      *
      * Supported tensor {@link OperandCode} configurations:
-     * * 32 bit Floating point :
+     * * 16 bit floating point:
+     * * * {@link OperandType::TENSOR_FLOAT16} for input, filter, output, and bias.
+     *
+     * * 32 bit floating point:
      * * * {@link OperandType::TENSOR_FLOAT32} for input, filter, output, and bias.
      *
      * * Quantized:
@@ -4213,7 +4244,6 @@
      * * * {@link OperandType::TENSOR_INT32} for bias (with scale set to
      * * * input.scale * filter.scale).
      *
-     * Available since API level 29:
      * * Quantized with symmetric per channel quantization for the filter:
      * * * {@link OperandType::TENSOR_QUANT8_ASYMM} for input, and output.
      * * * {@link OperandType::TENSOR_QUANT8_SYMM_PER_CHANNEL} for filter.
@@ -4814,7 +4844,7 @@
         /**
          * The extension name.
          *
-         * See {@link Extension::name}.
+         * See {@link Extension::name} for the format specification.
          */
         string name;
 
@@ -5098,7 +5128,11 @@
     /**
      * The extension name.
      *
+     * The name must consist of lowercase latin letters, numbers, periods, and
+     * underscore signs. The name must contain at least one period.
+     *
      * The name must start with the reverse domain name of the vendor.
+     *
      * Example: com.google.test_extension
      */
     string name;
diff --git a/neuralnetworks/1.2/vts/functional/BasicTests.cpp b/neuralnetworks/1.2/vts/functional/BasicTests.cpp
index 2b88edd..365a750 100644
--- a/neuralnetworks/1.2/vts/functional/BasicTests.cpp
+++ b/neuralnetworks/1.2/vts/functional/BasicTests.cpp
@@ -64,7 +64,12 @@
                 for (auto& extension : extensions) {
                     std::string extensionName = extension.name;
                     EXPECT_FALSE(extensionName.empty());
-                    EXPECT_NE(extensionName.find("."), std::string::npos)
+                    for (char c : extensionName) {
+                        EXPECT_TRUE(('a' <= c && c <= 'z') || ('0' <= c && c <= '9') || c == '_' ||
+                                    c == '.')
+                                << "Extension name contains an illegal character: " << c;
+                    }
+                    EXPECT_NE(extensionName.find('.'), std::string::npos)
                             << "Extension name must start with the reverse domain name of the "
                                "vendor";
                 }
diff --git a/nfc/1.0/Android.bp b/nfc/1.0/Android.bp
index f821355..e0625d0 100644
--- a/nfc/1.0/Android.bp
+++ b/nfc/1.0/Android.bp
@@ -14,10 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "NfcEvent",
-        "NfcStatus",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/nfc/1.1/Android.bp b/nfc/1.1/Android.bp
index 9a1392e..bbf49b2 100644
--- a/nfc/1.1/Android.bp
+++ b/nfc/1.1/Android.bp
@@ -15,13 +15,6 @@
         "android.hardware.nfc@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Constant",
-        "NfcConfig",
-        "NfcEvent",
-        "PresenceCheckAlgorithm",
-        "ProtocolDiscoveryConfig",
-    ],
     gen_java: true,
 }
 
diff --git a/nfc/1.2/Android.bp b/nfc/1.2/Android.bp
index c338e02..cfb8b85 100644
--- a/nfc/1.2/Android.bp
+++ b/nfc/1.2/Android.bp
@@ -15,9 +15,6 @@
         "android.hardware.nfc@1.1",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "NfcConfig",
-    ],
     gen_java: true,
 }
 
diff --git a/oemlock/1.0/Android.bp b/oemlock/1.0/Android.bp
index c4ad989..894188b 100644
--- a/oemlock/1.0/Android.bp
+++ b/oemlock/1.0/Android.bp
@@ -13,10 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "OemLockSecureStatus",
-        "OemLockStatus",
-    ],
     gen_java: true,
 }
 
diff --git a/power/1.0/Android.bp b/power/1.0/Android.bp
index 92c9483..dbc0a36 100644
--- a/power/1.0/Android.bp
+++ b/power/1.0/Android.bp
@@ -13,13 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Feature",
-        "PowerHint",
-        "PowerStatePlatformSleepState",
-        "PowerStateVoter",
-        "Status",
-    ],
     gen_java: true,
 }
 
diff --git a/power/1.1/Android.bp b/power/1.1/Android.bp
index d1d8021..de55396 100644
--- a/power/1.1/Android.bp
+++ b/power/1.1/Android.bp
@@ -14,10 +14,6 @@
         "android.hardware.power@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "PowerStateSubsystem",
-        "PowerStateSubsystemSleepState",
-    ],
     gen_java: true,
 }
 
diff --git a/power/1.2/Android.bp b/power/1.2/Android.bp
index 0eb73e7..284e736 100644
--- a/power/1.2/Android.bp
+++ b/power/1.2/Android.bp
@@ -15,9 +15,6 @@
         "android.hardware.power@1.1",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "PowerHint",
-    ],
     gen_java: true,
 }
 
diff --git a/power/1.3/Android.bp b/power/1.3/Android.bp
index 1869b56..320f1e6 100644
--- a/power/1.3/Android.bp
+++ b/power/1.3/Android.bp
@@ -16,9 +16,6 @@
         "android.hardware.power@1.2",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "PowerHint",
-    ],
     gen_java: true,
 }
 
diff --git a/power/stats/1.0/Android.bp b/power/stats/1.0/Android.bp
index 9a956e4..9cf24cf 100644
--- a/power/stats/1.0/Android.bp
+++ b/power/stats/1.0/Android.bp
@@ -13,17 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "EnergyData",
-        "PowerEntityInfo",
-        "PowerEntityStateInfo",
-        "PowerEntityStateResidencyData",
-        "PowerEntityStateResidencyResult",
-        "PowerEntityStateSpace",
-        "PowerEntityType",
-        "RailInfo",
-        "Status",
-    ],
     gen_java: false,
 }
 
diff --git a/radio/1.0/Android.bp b/radio/1.0/Android.bp
index 72a3ca6..f023471 100644
--- a/radio/1.0/Android.bp
+++ b/radio/1.0/Android.bp
@@ -17,162 +17,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "ActivityStatsInfo",
-        "ApnAuthType",
-        "ApnTypes",
-        "AppState",
-        "AppStatus",
-        "AppType",
-        "Call",
-        "CallForwardInfo",
-        "CallForwardInfoStatus",
-        "CallPresentation",
-        "CallState",
-        "CardState",
-        "CardStatus",
-        "Carrier",
-        "CarrierMatchType",
-        "CarrierRestrictions",
-        "CdmaBroadcastSmsConfigInfo",
-        "CdmaCallWaiting",
-        "CdmaCallWaitingNumberPlan",
-        "CdmaCallWaitingNumberPresentation",
-        "CdmaCallWaitingNumberType",
-        "CdmaDisplayInfoRecord",
-        "CdmaInfoRecName",
-        "CdmaInformationRecord",
-        "CdmaInformationRecords",
-        "CdmaLineControlInfoRecord",
-        "CdmaNumberInfoRecord",
-        "CdmaOtaProvisionStatus",
-        "CdmaRedirectingNumberInfoRecord",
-        "CdmaRedirectingReason",
-        "CdmaRoamingType",
-        "CdmaSignalInfoRecord",
-        "CdmaSignalStrength",
-        "CdmaSmsAck",
-        "CdmaSmsAddress",
-        "CdmaSmsDigitMode",
-        "CdmaSmsErrorClass",
-        "CdmaSmsMessage",
-        "CdmaSmsNumberMode",
-        "CdmaSmsNumberPlan",
-        "CdmaSmsNumberType",
-        "CdmaSmsSubaddress",
-        "CdmaSmsSubaddressType",
-        "CdmaSmsWriteArgs",
-        "CdmaSmsWriteArgsStatus",
-        "CdmaSubscriptionSource",
-        "CdmaT53AudioControlInfoRecord",
-        "CdmaT53ClirInfoRecord",
-        "CellIdentity",
-        "CellIdentityCdma",
-        "CellIdentityGsm",
-        "CellIdentityLte",
-        "CellIdentityTdscdma",
-        "CellIdentityWcdma",
-        "CellInfo",
-        "CellInfoCdma",
-        "CellInfoGsm",
-        "CellInfoLte",
-        "CellInfoTdscdma",
-        "CellInfoType",
-        "CellInfoWcdma",
-        "CfData",
-        "ClipStatus",
-        "Clir",
-        "DataCallFailCause",
-        "DataProfileId",
-        "DataProfileInfo",
-        "DataProfileInfoType",
-        "DataRegStateResult",
-        "DeviceStateType",
-        "Dial",
-        "EvdoSignalStrength",
-        "GsmBroadcastSmsConfigInfo",
-        "GsmSignalStrength",
-        "GsmSmsMessage",
-        "HardwareConfig",
-        "HardwareConfigModem",
-        "HardwareConfigSim",
-        "HardwareConfigState",
-        "HardwareConfigType",
-        "IccIo",
-        "IccIoResult",
-        "ImsSmsMessage",
-        "IndicationFilter",
-        "LastCallFailCause",
-        "LastCallFailCauseInfo",
-        "LceDataInfo",
-        "LceStatus",
-        "LceStatusInfo",
-        "LteSignalStrength",
-        "MvnoType",
-        "NeighboringCell",
-        "NvItem",
-        "NvWriteItem",
-        "OperatorInfo",
-        "OperatorStatus",
-        "P2Constant",
-        "PcoDataInfo",
-        "PersoSubstate",
-        "PhoneRestrictedState",
-        "PinState",
-        "PreferredNetworkType",
-        "RadioAccessFamily",
-        "RadioBandMode",
-        "RadioCapability",
-        "RadioCapabilityPhase",
-        "RadioCapabilityStatus",
-        "RadioCdmaSmsConst",
-        "RadioConst",
-        "RadioError",
-        "RadioIndicationType",
-        "RadioResponseInfo",
-        "RadioResponseType",
-        "RadioState",
-        "RadioTechnology",
-        "RadioTechnologyFamily",
-        "RegState",
-        "ResetNvType",
-        "RestrictedState",
-        "SapApduType",
-        "SapConnectRsp",
-        "SapDisconnectType",
-        "SapResultCode",
-        "SapStatus",
-        "SapTransferProtocol",
-        "SelectUiccSub",
-        "SendSmsResult",
-        "SetupDataCallResult",
-        "SignalStrength",
-        "SimApdu",
-        "SimRefreshResult",
-        "SimRefreshType",
-        "SmsAcknowledgeFailCause",
-        "SmsWriteArgs",
-        "SmsWriteArgsStatus",
-        "SrvccState",
-        "SsInfoData",
-        "SsRequestType",
-        "SsServiceType",
-        "SsTeleserviceType",
-        "StkCcUnsolSsResult",
-        "SubscriptionType",
-        "SuppServiceClass",
-        "SuppSvcNotification",
-        "TdScdmaSignalStrength",
-        "TimeStampType",
-        "TtyMode",
-        "UiccSubActStatus",
-        "UssdModeType",
-        "UusDcs",
-        "UusInfo",
-        "UusType",
-        "VoiceRegStateResult",
-        "WcdmaSignalStrength",
-    ],
     gen_java: true,
 }
 
diff --git a/radio/1.1/Android.bp b/radio/1.1/Android.bp
index 5eecb31..4375d8c 100644
--- a/radio/1.1/Android.bp
+++ b/radio/1.1/Android.bp
@@ -17,23 +17,6 @@
         "android.hardware.radio@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "CardPowerState",
-        "EutranBands",
-        "GeranBands",
-        "ImsiEncryptionInfo",
-        "KeepaliveRequest",
-        "KeepaliveStatus",
-        "KeepaliveStatusCode",
-        "KeepaliveType",
-        "NetworkScanRequest",
-        "NetworkScanResult",
-        "RadioAccessNetworks",
-        "RadioAccessSpecifier",
-        "ScanStatus",
-        "ScanType",
-        "UtranBands",
-    ],
     gen_java: true,
 }
 
diff --git a/radio/1.2/Android.bp b/radio/1.2/Android.bp
index c90a03c..b7364a8 100644
--- a/radio/1.2/Android.bp
+++ b/radio/1.2/Android.bp
@@ -18,41 +18,6 @@
         "android.hardware.radio@1.1",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "AccessNetwork",
-        "AudioQuality",
-        "Call",
-        "CardStatus",
-        "CellConnectionStatus",
-        "CellIdentity",
-        "CellIdentityCdma",
-        "CellIdentityGsm",
-        "CellIdentityLte",
-        "CellIdentityOperatorNames",
-        "CellIdentityTdscdma",
-        "CellIdentityWcdma",
-        "CellInfo",
-        "CellInfoCdma",
-        "CellInfoGsm",
-        "CellInfoLte",
-        "CellInfoTdscdma",
-        "CellInfoWcdma",
-        "DataRegStateResult",
-        "DataRequestReason",
-        "IncrementalResultsPeriodicityRange",
-        "IndicationFilter",
-        "LinkCapacityEstimate",
-        "MaxSearchTimeRange",
-        "NetworkScanRequest",
-        "NetworkScanResult",
-        "PhysicalChannelConfig",
-        "RadioConst",
-        "ScanIntervalRange",
-        "SignalStrength",
-        "TdscdmaSignalStrength",
-        "VoiceRegStateResult",
-        "WcdmaSignalStrength",
-    ],
     gen_java: true,
 }
 
diff --git a/radio/1.3/Android.bp b/radio/1.3/Android.bp
index 63056cc..de2a3e5 100644
--- a/radio/1.3/Android.bp
+++ b/radio/1.3/Android.bp
@@ -18,9 +18,6 @@
         "android.hardware.radio@1.2",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "RadioResponseInfoModem",
-    ],
     gen_java: true,
 }
 
diff --git a/radio/1.3/IRadio.hal b/radio/1.3/IRadio.hal
index 95cf615..922b35d 100644
--- a/radio/1.3/IRadio.hal
+++ b/radio/1.3/IRadio.hal
@@ -49,8 +49,13 @@
             vec<RadioAccessSpecifier> specifiers);
 
    /**
-    * Toggle logical modem on and off. The difference with setRadioPower is,
-    * setRadioPower affects all logical modems while this controls just one.
+    * Toggle logical modem on/off. This is similar to @1.0::IRadio.setRadioPower(), however that
+    * does not enforce that radio power is toggled only for the corresponding radio and certain
+    * vendor implementations do it for all radios. This new API should affect only the modem for
+    * which it is called. A modem stack must be on/active only when both setRadioPower() and
+    * enableModem() are set to on for it.
+    *
+    * SIM must be read if available even if modem is off/inactive.
     *
     * @param serial Serial number of request.
     * @param on True to turn on the logical modem, otherwise turn it off.
diff --git a/radio/1.3/vts/functional/radio_hidl_hal_api.cpp b/radio/1.3/vts/functional/radio_hidl_hal_api.cpp
index 6208c67..1bebae7 100644
--- a/radio/1.3/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.3/vts/functional/radio_hidl_hal_api.cpp
@@ -75,3 +75,36 @@
             radioRsp_v1_3->rspInfo.error,
             {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::MODEM_ERR}));
 }
+
+/*
+ * Test IRadio.setSystemSelectionChannels() for the response returned.
+ */
+TEST_F(RadioHidlTest_v1_3, setSystemSelectionChannels) {
+    serial = GetRandomSerialNumber();
+
+    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
+                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
+                                      .channels = {1, 2}};
+
+    Return<void> res = radio_v1_3->setSystemSelectionChannels(serial, true, {specifier});
+    ASSERT_OK(res);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_3->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp_v1_3->rspInfo.serial);
+    ALOGI("setSystemSelectionChannels, rspInfo.error = %s\n",
+          toString(radioRsp_v1_3->rspInfo.error).c_str());
+    ASSERT_TRUE(CheckAnyOfErrors(
+            radioRsp_v1_3->rspInfo.error,
+            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INTERNAL_ERR}));
+
+    if (radioRsp_v1_3->rspInfo.error == RadioError::NONE) {
+        Return<void> res = radio_v1_3->setSystemSelectionChannels(serial, false, {specifier});
+        ASSERT_OK(res);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_3->rspInfo.type);
+        EXPECT_EQ(serial, radioRsp_v1_3->rspInfo.serial);
+        ALOGI("setSystemSelectionChannels, rspInfo.error = %s\n",
+              toString(radioRsp_v1_3->rspInfo.error).c_str());
+        EXPECT_EQ(RadioError::NONE, radioRsp_v1_3->rspInfo.error);
+    }
+}
\ No newline at end of file
diff --git a/radio/1.3/vts/functional/radio_response.cpp b/radio/1.3/vts/functional/radio_response.cpp
index 900794e..84a9890 100644
--- a/radio/1.3/vts/functional/radio_response.cpp
+++ b/radio/1.3/vts/functional/radio_response.cpp
@@ -769,12 +769,14 @@
 /* 1.3 Api */
 Return<void> RadioResponse_v1_3::setSystemSelectionChannelsResponse(const RadioResponseInfo& info) {
     rspInfo = info;
+    parent_v1_3.notify(info.serial);
     return Void();
 }
 
 Return<void> RadioResponse_v1_3::enableModemResponse(const RadioResponseInfo& info) {
     rspInfo = info;
     enableModemResponseToggle = !enableModemResponseToggle;
+    parent_v1_3.notify(info.serial);
     return Void();
 }
 
@@ -782,5 +784,6 @@
                                                              const bool enabled) {
     rspInfo = info;
     isModemEnabled = enabled;
+    parent_v1_3.notify(info.serial);
     return Void();
 }
diff --git a/radio/1.4/Android.bp b/radio/1.4/Android.bp
index e8b8777..9f5f2f9 100644
--- a/radio/1.4/Android.bp
+++ b/radio/1.4/Android.bp
@@ -20,38 +20,6 @@
         "android.hidl.base@1.0",
         "android.hidl.safe_union@1.0",
     ],
-    types: [
-        "AccessNetwork",
-        "CardStatus",
-        "CarrierRestrictionsWithPriority",
-        "CellConfigLte",
-        "CellIdentityNr",
-        "CellInfo",
-        "CellInfoLte",
-        "CellInfoNr",
-        "DataCallFailCause",
-        "DataConnActiveStatus",
-        "DataProfileInfo",
-        "DataRegStateResult",
-        "EmergencyCallRouting",
-        "EmergencyNumber",
-        "EmergencyNumberSource",
-        "EmergencyServiceCategory",
-        "FrequencyRange",
-        "LteVopsInfo",
-        "NetworkScanResult",
-        "NrIndicators",
-        "NrSignalStrength",
-        "PdpProtocolType",
-        "PhysicalChannelConfig",
-        "RadioAccessFamily",
-        "RadioCapability",
-        "RadioFrequencyInfo",
-        "RadioTechnology",
-        "SetupDataCallResult",
-        "SignalStrength",
-        "SimLockMultiSimPolicy",
-    ],
     gen_java: true,
 }
 
diff --git a/radio/1.4/IRadio.hal b/radio/1.4/IRadio.hal
index 046f074..3f28ebb 100644
--- a/radio/1.4/IRadio.hal
+++ b/radio/1.4/IRadio.hal
@@ -207,7 +207,7 @@
      *        as defined in types.hal
      * @param multiSimPolicy Policy to be used for devices with multiple SIMs.
      *
-     * Response callback is IRadioResponse.setAllowedCarriersResponse()
+     * Response callback is IRadioResponse.setAllowedCarriersResponse_1_4()
      */
     oneway setAllowedCarriers_1_4(int32_t serial, CarrierRestrictionsWithPriority carriers,
             SimLockMultiSimPolicy multiSimPolicy);
@@ -217,7 +217,7 @@
      *
      * @param serial Serial number of request.
      *
-     * Response callback is IRadioResponse.getAllowedCarriersResponse_1_3()
+     * Response callback is IRadioResponse.getAllowedCarriersResponse_1_4()
      */
     oneway getAllowedCarriers_1_4(int32_t serial);
 
diff --git a/radio/1.4/types.hal b/radio/1.4/types.hal
index dc3bba0..393716b 100644
--- a/radio/1.4/types.hal
+++ b/radio/1.4/types.hal
@@ -64,6 +64,15 @@
     UNKNOWN = 0,
 };
 
+enum ApnTypes : @1.0::ApnTypes {
+    /**
+     * Due to the addition of this new value, the value ALL defined in 1.0::ApnTypes is now
+     * deprecated and should not be used.
+     */
+    MCX = 1 << 10,            // APN type for Mission Critical Service
+                              // Reference: 3GPP TS 22.280 V15.3.0
+};
+
 /**
  * Emergency number contains information of number, one or more service category(s), zero or more
  * emergency uniform resource names, mobile country code (mcc), mobile network country (mnc) and
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
index c395df6..76d8758 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
@@ -96,6 +96,56 @@
 }
 
 /*
+ * Test IRadio.getPreferredNetworkTypeBitmap() for the response returned.
+ */
+TEST_F(RadioHidlTest_v1_4, getPreferredNetworkTypeBitmap) {
+    serial = GetRandomSerialNumber();
+
+    Return<void> res = radio_v1_4->getPreferredNetworkTypeBitmap(serial);
+
+    ASSERT_OK(res);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+    ALOGI("getPreferredNetworkTypeBitmap, rspInfo.error = %s\n",
+          toString(radioRsp_v1_4->rspInfo.error).c_str());
+    EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error);
+}
+
+TEST_F(RadioHidlTest_v1_4, setPreferredNetworkTypeBitmap) {
+    serial = GetRandomSerialNumber();
+    ::android::hardware::hidl_bitfield<::android::hardware::radio::V1_4::RadioAccessFamily>
+            network_type_bitmap{};
+
+    network_type_bitmap |= ::android::hardware::radio::V1_4::RadioAccessFamily::LTE;
+
+    Return<void> res = radio_v1_4->setPreferredNetworkTypeBitmap(serial, network_type_bitmap);
+
+    ASSERT_OK(res);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+    ALOGI("setPreferredNetworkTypeBitmap, rspInfo.error = %s\n",
+          toString(radioRsp_v1_4->rspInfo.error).c_str());
+    EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error);
+    if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
+         // give some time for modem to set the value.
+        sleep(3);
+        serial = GetRandomSerialNumber();
+        Return<void> res = radio_v1_4->getPreferredNetworkTypeBitmap(serial);
+
+        ASSERT_OK(res);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+        EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+        ALOGI("getPreferredNetworkTypeBitmap, rspInfo.error = %s\n",
+              toString(radioRsp_v1_4->rspInfo.error).c_str());
+        EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error);
+        EXPECT_EQ(network_type_bitmap, radioRsp_v1_4->networkTypeBitmapResponse);
+    }
+}
+
+/*
  * Test IRadio.startNetworkScan() for the response returned.
  */
 TEST_F(RadioHidlTest_v1_4, startNetworkScan) {
@@ -472,8 +522,8 @@
     memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
     dataProfileInfo.profileId = DataProfileId::DEFAULT;
     dataProfileInfo.apn = hidl_string("internet");
-    dataProfileInfo.protocol = PdpProtocolType::IPV4V6;
-    dataProfileInfo.roamingProtocol = PdpProtocolType::IPV4V6;
+    dataProfileInfo.protocol = PdpProtocolType::IP;
+    dataProfileInfo.roamingProtocol = PdpProtocolType::IP;
     dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP;
     dataProfileInfo.user = hidl_string("username");
     dataProfileInfo.password = hidl_string("password");
@@ -513,3 +563,198 @@
                                       RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW}));
     }
 }
+
+/*
+ * Test IRadio.getAllowedCarriers_1_4() for the response returned.
+ */
+TEST_F(RadioHidlTest_v1_4, getAllowedCarriers_1_4) {
+    serial = GetRandomSerialNumber();
+
+    radio_v1_4->getAllowedCarriers_1_4(serial);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+
+    ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+                                 {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
+}
+
+/**
+ * Test IRadio.setAllowedCarriers_1_4() for the response returned.
+ */
+TEST_F(RadioHidlTest_v1_4, setAllowedCarriers_1_4) {
+    serial = GetRandomSerialNumber();
+    CarrierRestrictionsWithPriority carrierRestrictions;
+    memset(&carrierRestrictions, 0, sizeof(carrierRestrictions));
+    carrierRestrictions.allowedCarriers.resize(1);
+    carrierRestrictions.excludedCarriers.resize(0);
+    carrierRestrictions.allowedCarriers[0].mcc = hidl_string("123");
+    carrierRestrictions.allowedCarriers[0].mnc = hidl_string("456");
+    carrierRestrictions.allowedCarriers[0].matchType = CarrierMatchType::ALL;
+    carrierRestrictions.allowedCarriers[0].matchData = hidl_string();
+    carrierRestrictions.allowedCarriersPrioritized = true;
+    SimLockMultiSimPolicy multisimPolicy = SimLockMultiSimPolicy::NO_MULTISIM_POLICY;
+
+    radio_v1_4->setAllowedCarriers_1_4(serial, carrierRestrictions, multisimPolicy);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+
+    ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+                                 {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
+
+    if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
+        /* Verify the update of the SIM status. This might need some time */
+        if (cardStatus.base.base.cardState != CardState::ABSENT) {
+            updateSimCardStatus();
+            auto startTime = std::chrono::system_clock::now();
+            while (cardStatus.base.base.cardState != CardState::RESTRICTED &&
+                   std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() -
+                                                               startTime)
+                                   .count() < 10) {
+                /* Set 2 seconds as interval to check card status */
+                sleep(2);
+                updateSimCardStatus();
+            }
+            EXPECT_EQ(CardState::RESTRICTED, cardStatus.base.base.cardState);
+        }
+
+        /* Verify that configuration was set correctly, retrieving it from the modem */
+        serial = GetRandomSerialNumber();
+
+        radio_v1_4->getAllowedCarriers_1_4(serial);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+        EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+        EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error);
+
+        EXPECT_EQ(1, radioRsp_v1_4->carrierRestrictionsResp.allowedCarriers.size());
+        EXPECT_EQ(0, radioRsp_v1_4->carrierRestrictionsResp.excludedCarriers.size());
+        ASSERT_TRUE(hidl_string("123") ==
+                    radioRsp_v1_4->carrierRestrictionsResp.allowedCarriers[0].mcc);
+        ASSERT_TRUE(hidl_string("456") ==
+                    radioRsp_v1_4->carrierRestrictionsResp.allowedCarriers[0].mnc);
+        EXPECT_EQ(CarrierMatchType::ALL,
+                  radioRsp_v1_4->carrierRestrictionsResp.allowedCarriers[0].matchType);
+        ASSERT_TRUE(radioRsp_v1_4->carrierRestrictionsResp.allowedCarriersPrioritized);
+        EXPECT_EQ(SimLockMultiSimPolicy::NO_MULTISIM_POLICY, radioRsp_v1_4->multiSimPolicyResp);
+
+        sleep(10);
+
+        /**
+         * Another test case of the API to cover to allow carrier.
+         * If the API is supported, this is also used to reset to no carrier restriction
+         * status for cardStatus.
+         */
+        memset(&carrierRestrictions, 0, sizeof(carrierRestrictions));
+        carrierRestrictions.allowedCarriers.resize(0);
+        carrierRestrictions.excludedCarriers.resize(0);
+        carrierRestrictions.allowedCarriersPrioritized = false;
+
+        serial = GetRandomSerialNumber();
+        radio_v1_4->setAllowedCarriers_1_4(serial, carrierRestrictions, multisimPolicy);
+        EXPECT_EQ(std::cv_status::no_timeout, wait());
+        EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+        EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+
+        EXPECT_EQ(RadioError::NONE, radioRsp_v1_4->rspInfo.error);
+
+        if (cardStatus.base.base.cardState != CardState::ABSENT) {
+            /* Resetting back to no carrier restriction needs some time */
+            updateSimCardStatus();
+            auto startTime = std::chrono::system_clock::now();
+            while (cardStatus.base.base.cardState == CardState::RESTRICTED &&
+                   std::chrono::duration_cast<chrono::seconds>(std::chrono::system_clock::now() -
+                                                               startTime)
+                                   .count() < 10) {
+                /* Set 2 seconds as interval to check card status */
+                sleep(2);
+                updateSimCardStatus();
+            }
+            EXPECT_NE(CardState::RESTRICTED, cardStatus.base.base.cardState);
+            sleep(10);
+        }
+    }
+}
+
+TEST_F(RadioHidlTest_v1_4, setDataProfile_1_4) {
+    serial = GetRandomSerialNumber();
+
+    // Create a dataProfileInfo
+    android::hardware::radio::V1_4::DataProfileInfo dataProfileInfo;
+    memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
+    dataProfileInfo.profileId = DataProfileId::DEFAULT;
+    dataProfileInfo.apn = hidl_string("internet");
+    dataProfileInfo.protocol = PdpProtocolType::IPV4V6;
+    dataProfileInfo.roamingProtocol = PdpProtocolType::IPV4V6;
+    dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP;
+    dataProfileInfo.user = hidl_string("username");
+    dataProfileInfo.password = hidl_string("password");
+    dataProfileInfo.type = DataProfileInfoType::THREE_GPP;
+    dataProfileInfo.maxConnsTime = 300;
+    dataProfileInfo.maxConns = 20;
+    dataProfileInfo.waitTime = 0;
+    dataProfileInfo.enabled = true;
+    dataProfileInfo.supportedApnTypesBitmap = 320;
+    dataProfileInfo.bearerBitmap = 161543;
+    dataProfileInfo.mtu = 0;
+    dataProfileInfo.preferred = true;
+    dataProfileInfo.persistent = true;
+
+    // Create a dataProfileInfoList
+    android::hardware::hidl_vec<android::hardware::radio::V1_4::DataProfileInfo>
+            dataProfileInfoList = {dataProfileInfo};
+
+    radio_v1_4->setDataProfile_1_4(serial, dataProfileInfoList);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+
+    if (cardStatus.base.base.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+                                     {RadioError::SIM_ABSENT, RadioError::RADIO_NOT_AVAILABLE}));
+    } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+                                     {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE}));
+    }
+}
+
+TEST_F(RadioHidlTest_v1_4, setInitialAttachApn_1_4) {
+    serial = GetRandomSerialNumber();
+
+    // Create a dataProfileInfo
+    android::hardware::radio::V1_4::DataProfileInfo dataProfileInfo;
+    memset(&dataProfileInfo, 0, sizeof(dataProfileInfo));
+    dataProfileInfo.profileId = DataProfileId::DEFAULT;
+    dataProfileInfo.apn = hidl_string("internet");
+    dataProfileInfo.protocol = PdpProtocolType::IPV4V6;
+    dataProfileInfo.roamingProtocol = PdpProtocolType::IPV4V6;
+    dataProfileInfo.authType = ApnAuthType::NO_PAP_NO_CHAP;
+    dataProfileInfo.user = hidl_string("username");
+    dataProfileInfo.password = hidl_string("password");
+    dataProfileInfo.type = DataProfileInfoType::THREE_GPP;
+    dataProfileInfo.maxConnsTime = 300;
+    dataProfileInfo.maxConns = 20;
+    dataProfileInfo.waitTime = 0;
+    dataProfileInfo.enabled = true;
+    dataProfileInfo.supportedApnTypesBitmap = 320;
+    dataProfileInfo.bearerBitmap = 161543;
+    dataProfileInfo.mtu = 0;
+    dataProfileInfo.preferred = true;
+    dataProfileInfo.persistent = false;
+
+    radio_v1_4->setInitialAttachApn_1_4(serial, dataProfileInfo);
+
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_4->rspInfo.type);
+    EXPECT_EQ(serial, radioRsp_v1_4->rspInfo.serial);
+
+    if (cardStatus.base.base.cardState == CardState::ABSENT) {
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+                                     {RadioError::SIM_ABSENT, RadioError::RADIO_NOT_AVAILABLE}));
+    } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
+        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+                                     {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE}));
+    }
+}
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h b/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
index b77814f..de7742c 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
+++ b/radio/1.4/vts/functional/radio_hidl_hal_utils_v1_4.h
@@ -61,9 +61,16 @@
     bool isModemEnabled;
     bool enableModemResponseToggle;
 
+    ::android::hardware::hidl_bitfield<::android::hardware::radio::V1_4::RadioAccessFamily>
+    networkTypeBitmapResponse;
+
     // Data
     ::android::hardware::radio::V1_4::DataRegStateResult dataRegResp;
 
+    // SimLock status
+    ::android::hardware::radio::V1_4::CarrierRestrictionsWithPriority carrierRestrictionsResp;
+    ::android::hardware::radio::V1_4::SimLockMultiSimPolicy multiSimPolicyResp;
+
     RadioResponse_v1_4(RadioHidlTest_v1_4& parent_v1_4);
     virtual ~RadioResponse_v1_4() = default;
 
diff --git a/radio/1.4/vts/functional/radio_response.cpp b/radio/1.4/vts/functional/radio_response.cpp
index 10ecead..eac0c68 100644
--- a/radio/1.4/vts/functional/radio_response.cpp
+++ b/radio/1.4/vts/functional/radio_response.cpp
@@ -533,7 +533,9 @@
     return Void();
 }
 
-Return<void> RadioResponse_v1_4::setInitialAttachApnResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_4::setInitialAttachApnResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent_v1_4.notify(info.serial);
     return Void();
 }
 
@@ -604,7 +606,9 @@
     return Void();
 }
 
-Return<void> RadioResponse_v1_4::setDataProfileResponse(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_4::setDataProfileResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent_v1_4.notify(info.serial);
     return Void();
 }
 
@@ -776,7 +780,6 @@
 
 Return<void> RadioResponse_v1_4::enableModemResponse(const RadioResponseInfo& info) {
     rspInfo = info;
-    enableModemResponseToggle = !enableModemResponseToggle;
     parent_v1_4.notify(info.serial);
     return Void();
 }
@@ -832,9 +835,9 @@
 Return<void> RadioResponse_v1_4::getPreferredNetworkTypeBitmapResponse(
         const RadioResponseInfo& info, const ::android::hardware::hidl_bitfield<
                                                ::android::hardware::radio::V1_4::RadioAccessFamily>
-        /*networkTypeBitmap*/) {
+                                               networkTypeBitmap) {
     rspInfo = info;
-    // TODO: may need a new member for bitfield networkTypeBitmap.
+    networkTypeBitmapResponse = networkTypeBitmap;
     parent_v1_4.notify(info.serial);
     return Void();
 }
@@ -863,12 +866,18 @@
     return Void();
 }
 
-Return<void> RadioResponse_v1_4::setAllowedCarriersResponse_1_4(const RadioResponseInfo& /*info*/) {
+Return<void> RadioResponse_v1_4::setAllowedCarriersResponse_1_4(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent_v1_4.notify(info.serial);
     return Void();
 }
 
 Return<void> RadioResponse_v1_4::getAllowedCarriersResponse_1_4(
-        const RadioResponseInfo& /*info*/, const CarrierRestrictionsWithPriority& /*carriers*/,
-        SimLockMultiSimPolicy /*multiSimPolicy*/) {
+        const RadioResponseInfo& info, const CarrierRestrictionsWithPriority& carriers,
+        SimLockMultiSimPolicy multiSimPolicy) {
+    rspInfo = info;
+    carrierRestrictionsResp = carriers;
+    multiSimPolicyResp = multiSimPolicy;
+    parent_v1_4.notify(info.serial);
     return Void();
 }
diff --git a/radio/config/1.0/Android.bp b/radio/config/1.0/Android.bp
index c50e71c..7fb0ea1 100644
--- a/radio/config/1.0/Android.bp
+++ b/radio/config/1.0/Android.bp
@@ -16,10 +16,6 @@
         "android.hardware.radio@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "SimSlotStatus",
-        "SlotState",
-    ],
     gen_java: true,
 }
 
diff --git a/radio/config/1.1/Android.bp b/radio/config/1.1/Android.bp
index 151a0a3..5c9ad7c 100644
--- a/radio/config/1.1/Android.bp
+++ b/radio/config/1.1/Android.bp
@@ -17,11 +17,6 @@
         "android.hardware.radio@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "ModemInfo",
-        "ModemsConfig",
-        "PhoneCapability",
-    ],
     gen_java: true,
 }
 
diff --git a/radio/config/1.1/vts/functional/radio_config_hidl_hal_api.cpp b/radio/config/1.1/vts/functional/radio_config_hidl_hal_api.cpp
index a1639d8..122ce58 100644
--- a/radio/config/1.1/vts/functional/radio_config_hidl_hal_api.cpp
+++ b/radio/config/1.1/vts/functional/radio_config_hidl_hal_api.cpp
@@ -69,3 +69,89 @@
     ASSERT_TRUE(CheckAnyOfErrors(radioConfigRsp->rspInfo.error,
                                  {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
 }
+
+/*
+ * Test IRadioConfig.getPhoneCapability()
+ */
+TEST_F(RadioConfigHidlTest, getPhoneCapability) {
+    serial = GetRandomSerialNumber();
+    Return<void> res = radioConfig->getPhoneCapability(serial);
+    ASSERT_OK(res);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioConfigRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioConfigRsp->rspInfo.serial);
+    ALOGI("getPhoneCapability, rspInfo.error = %s\n",
+          toString(radioConfigRsp->rspInfo.error).c_str());
+
+    ASSERT_TRUE(CheckAnyOfErrors(
+            radioConfigRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INTERNAL_ERR}));
+
+    if (radioConfigRsp->rspInfo.error == RadioError ::NONE) {
+        // maxActiveData should be greater than or equal to maxActiveInternetData.
+        EXPECT_GE(radioConfigRsp->phoneCap.maxActiveData,
+                  radioConfigRsp->phoneCap.maxActiveInternetData);
+        // maxActiveData and maxActiveInternetData should be 0 or positive numbers.
+        EXPECT_GE(radioConfigRsp->phoneCap.maxActiveInternetData, 0);
+    }
+}
+
+/*
+ * Test IRadioConfig.getPhoneCapability()
+ */
+TEST_F(RadioConfigHidlTest, setPreferredDataModem) {
+    serial = GetRandomSerialNumber();
+    Return<void> res = radioConfig->getPhoneCapability(serial);
+    ASSERT_OK(res);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioConfigRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioConfigRsp->rspInfo.serial);
+    ALOGI("getPhoneCapability, rspInfo.error = %s\n",
+          toString(radioConfigRsp->rspInfo.error).c_str());
+
+    ASSERT_TRUE(CheckAnyOfErrors(
+            radioConfigRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INTERNAL_ERR}));
+
+    if (radioConfigRsp->rspInfo.error != RadioError ::NONE) {
+        return;
+    }
+
+    if (radioConfigRsp->phoneCap.logicalModemList.size() == 0) {
+        return;
+    }
+
+    // We get phoneCapability. send setPreferredDataModem command
+    serial = GetRandomSerialNumber();
+    uint8_t modemId = radioConfigRsp->phoneCap.logicalModemList[0].modemId;
+    res = radioConfig->setPreferredDataModem(serial, modemId);
+
+    ASSERT_OK(res);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioConfigRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioConfigRsp->rspInfo.serial);
+    ALOGI("getModemsConfig, rspInfo.error = %s\n", toString(radioConfigRsp->rspInfo.error).c_str());
+
+    ASSERT_TRUE(CheckAnyOfErrors(
+            radioConfigRsp->rspInfo.error,
+            {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::INTERNAL_ERR}));
+}
+
+/*
+ * Test IRadioConfig.getPhoneCapability()
+ */
+TEST_F(RadioConfigHidlTest, setPreferredDataModem_invalidArgument) {
+    serial = GetRandomSerialNumber();
+    uint8_t modemId = -1;
+    Return<void> res = radioConfig->setPreferredDataModem(serial, modemId);
+
+    ASSERT_OK(res);
+    EXPECT_EQ(std::cv_status::no_timeout, wait());
+    EXPECT_EQ(RadioResponseType::SOLICITED, radioConfigRsp->rspInfo.type);
+    EXPECT_EQ(serial, radioConfigRsp->rspInfo.serial);
+    ALOGI("getModemsConfig, rspInfo.error = %s\n", toString(radioConfigRsp->rspInfo.error).c_str());
+
+    ASSERT_TRUE(CheckAnyOfErrors(radioConfigRsp->rspInfo.error,
+                                 {RadioError::INVALID_ARGUMENTS, RadioError::RADIO_NOT_AVAILABLE,
+                                  RadioError::INTERNAL_ERR}));
+}
diff --git a/radio/config/1.1/vts/functional/radio_config_hidl_hal_utils.h b/radio/config/1.1/vts/functional/radio_config_hidl_hal_utils.h
index 1747ce8..c980901 100644
--- a/radio/config/1.1/vts/functional/radio_config_hidl_hal_utils.h
+++ b/radio/config/1.1/vts/functional/radio_config_hidl_hal_utils.h
@@ -51,6 +51,7 @@
 
    public:
     RadioResponseInfo rspInfo;
+    PhoneCapability phoneCap;
 
     RadioConfigResponse(RadioConfigHidlTest& parent);
     virtual ~RadioConfigResponse() = default;
diff --git a/radio/config/1.1/vts/functional/radio_config_response.cpp b/radio/config/1.1/vts/functional/radio_config_response.cpp
index 8c9e4d7..ce3dfdf 100644
--- a/radio/config/1.1/vts/functional/radio_config_response.cpp
+++ b/radio/config/1.1/vts/functional/radio_config_response.cpp
@@ -31,7 +31,10 @@
 }
 
 Return<void> RadioConfigResponse::getPhoneCapabilityResponse(
-    const RadioResponseInfo& /* info */, const PhoneCapability& /* phoneCapability */) {
+        const RadioResponseInfo& info, const PhoneCapability& phoneCapability) {
+    rspInfo = info;
+    phoneCap = phoneCapability;
+    parent.notify(info.serial);
     return Void();
 }
 
@@ -47,4 +50,4 @@
 
 Return<void> RadioConfigResponse::setModemsConfigResponse(const RadioResponseInfo& /* info */) {
     return Void();
-}
\ No newline at end of file
+}
diff --git a/radio/config/1.2/Android.bp b/radio/config/1.2/Android.bp
index 3e6a425..e69be40 100644
--- a/radio/config/1.2/Android.bp
+++ b/radio/config/1.2/Android.bp
@@ -17,9 +17,6 @@
         "android.hardware.radio@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "SimSlotStatus",
-    ],
     gen_java: true,
 }
 
diff --git a/renderscript/1.0/Android.bp b/renderscript/1.0/Android.bp
index 79b2ff7..1d7efad 100644
--- a/renderscript/1.0/Android.bp
+++ b/renderscript/1.0/Android.bp
@@ -15,23 +15,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "AllocationCubemapFace",
-        "AllocationMipmapControl",
-        "AllocationUsageType",
-        "ContextFlags",
-        "ContextType",
-        "DataKind",
-        "DataType",
-        "ForEachStrategy",
-        "MessageToClientType",
-        "MetadataSignatureBitval",
-        "SamplerValue",
-        "ScriptCall",
-        "ScriptIntrinsicID",
-        "ThreadPriorities",
-        "YuvFormat",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/secure_element/1.0/Android.bp b/secure_element/1.0/Android.bp
index e8081df..c6fa6a9 100644
--- a/secure_element/1.0/Android.bp
+++ b/secure_element/1.0/Android.bp
@@ -14,10 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "LogicalChannelResponse",
-        "SecureElementStatus",
-    ],
     gen_java: true,
 }
 
diff --git a/sensors/1.0/Android.bp b/sensors/1.0/Android.bp
index 92c3c1b..3a41f9c 100644
--- a/sensors/1.0/Android.bp
+++ b/sensors/1.0/Android.bp
@@ -13,31 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "AdditionalInfo",
-        "AdditionalInfoType",
-        "DynamicSensorInfo",
-        "Event",
-        "EventPayload",
-        "HeartRate",
-        "MetaData",
-        "MetaDataEventType",
-        "OperationMode",
-        "RateLevel",
-        "Result",
-        "SensorFlagBits",
-        "SensorFlagShift",
-        "SensorInfo",
-        "SensorStatus",
-        "SensorType",
-        "SensorsEventFormatOffset",
-        "SharedMemFormat",
-        "SharedMemInfo",
-        "SharedMemType",
-        "Uncal",
-        "Vec3",
-        "Vec4",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/sensors/2.0/Android.bp b/sensors/2.0/Android.bp
index 57d45ff..eead1d3 100644
--- a/sensors/2.0/Android.bp
+++ b/sensors/2.0/Android.bp
@@ -15,11 +15,6 @@
         "android.hardware.sensors@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "EventQueueFlagBits",
-        "SensorTimeout",
-        "WakeLockQueueFlagBits",
-    ],
     gen_java: false,
 }
 
diff --git a/soundtrigger/2.0/Android.bp b/soundtrigger/2.0/Android.bp
index 92f031a..b805be8 100644
--- a/soundtrigger/2.0/Android.bp
+++ b/soundtrigger/2.0/Android.bp
@@ -15,12 +15,6 @@
         "android.hardware.audio.common@2.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "ConfidenceLevel",
-        "PhraseRecognitionExtra",
-        "RecognitionMode",
-        "SoundModelType",
-    ],
     gen_java: false,
 }
 
diff --git a/tests/bar/1.0/Android.bp b/tests/bar/1.0/Android.bp
index 45c84bc..a1b6b88 100644
--- a/tests/bar/1.0/Android.bp
+++ b/tests/bar/1.0/Android.bp
@@ -15,9 +15,6 @@
         "android.hardware.tests.foo@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Def",
-    ],
     gen_java: false,
 }
 
diff --git a/tests/baz/1.0/Android.bp b/tests/baz/1.0/Android.bp
index edf8fe6..618f4f8 100644
--- a/tests/baz/1.0/Android.bp
+++ b/tests/baz/1.0/Android.bp
@@ -13,8 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-    ],
     gen_java: true,
 }
 
diff --git a/tests/extension/light/2.0/Android.bp b/tests/extension/light/2.0/Android.bp
index 58c8392..916af71 100644
--- a/tests/extension/light/2.0/Android.bp
+++ b/tests/extension/light/2.0/Android.bp
@@ -11,11 +11,6 @@
         "android.hardware.light@2.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Brightness",
-        "Default",
-        "LightState",
-    ],
     gen_java: true,
 }
 
diff --git a/tests/foo/1.0/Android.bp b/tests/foo/1.0/Android.bp
index 769de2d..1c3b3c5 100644
--- a/tests/foo/1.0/Android.bp
+++ b/tests/foo/1.0/Android.bp
@@ -14,13 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Abc",
-        "Def",
-        "EnumIterators",
-        "Outer",
-        "Unrelated",
-    ],
     gen_java: false,
 }
 
diff --git a/tests/trie/1.0/Android.bp b/tests/trie/1.0/Android.bp
index 870a350..0795f66 100644
--- a/tests/trie/1.0/Android.bp
+++ b/tests/trie/1.0/Android.bp
@@ -10,15 +10,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "A",
-        "B",
-        "E1",
-        "E2",
-        "S",
-        "TrieEdge",
-        "TrieNode",
-    ],
     gen_java: false,
 }
 
diff --git a/tetheroffload/control/1.0/Android.bp b/tetheroffload/control/1.0/Android.bp
index 8e3fd27..dc2487b 100644
--- a/tetheroffload/control/1.0/Android.bp
+++ b/tetheroffload/control/1.0/Android.bp
@@ -14,12 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "IPv4AddrPortPair",
-        "NatTimeoutUpdate",
-        "NetworkProtocol",
-        "OffloadCallbackEvent",
-    ],
     gen_java: true,
 }
 
diff --git a/thermal/1.0/Android.bp b/thermal/1.0/Android.bp
index e764e28..8428977 100644
--- a/thermal/1.0/Android.bp
+++ b/thermal/1.0/Android.bp
@@ -13,15 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "CoolingDevice",
-        "CoolingType",
-        "CpuUsage",
-        "Temperature",
-        "TemperatureType",
-        "ThermalStatus",
-        "ThermalStatusCode",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/thermal/2.0/Android.bp b/thermal/2.0/Android.bp
index c513739..af23ee3 100644
--- a/thermal/2.0/Android.bp
+++ b/thermal/2.0/Android.bp
@@ -15,14 +15,6 @@
         "android.hardware.thermal@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "CoolingDevice",
-        "CoolingType",
-        "Temperature",
-        "TemperatureThreshold",
-        "TemperatureType",
-        "ThrottlingSeverity",
-    ],
     gen_java: true,
 }
 
diff --git a/tv/cec/1.0/Android.bp b/tv/cec/1.0/Android.bp
index 2aa155e..7626dc0 100644
--- a/tv/cec/1.0/Android.bp
+++ b/tv/cec/1.0/Android.bp
@@ -14,20 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "AbortReason",
-        "CecDeviceType",
-        "CecLogicalAddress",
-        "CecMessage",
-        "CecMessageType",
-        "HdmiPortInfo",
-        "HdmiPortType",
-        "HotplugEvent",
-        "MaxLength",
-        "OptionKey",
-        "Result",
-        "SendMessageResult",
-    ],
     gen_java: true,
 }
 
diff --git a/tv/cec/2.0/Android.bp b/tv/cec/2.0/Android.bp
index 998cb23..5a67fa5 100644
--- a/tv/cec/2.0/Android.bp
+++ b/tv/cec/2.0/Android.bp
@@ -15,32 +15,6 @@
         "android.hidl.base@1.0",
         "android.hidl.safe_union@1.0",
     ],
-    types: [
-        "AbortReason",
-        "CecAllDeviceTypeValue",
-        "CecDeviceFeature",
-        "CecDeviceInfo",
-        "CecDeviceType",
-        "CecLogicalAddress",
-        "CecMessage",
-        "CecMessageType",
-        "CecPowerState",
-        "CecRcProfile",
-        "CecRcProfile1",
-        "CecRcProfileId",
-        "CecRcProfileSource",
-        "CecTopologyEvent",
-        "CecTopologyEventType",
-        "CecUICommandCodes",
-        "CecVersion",
-        "HdmiPortInfo",
-        "HdmiPortType",
-        "HotplugEvent",
-        "MaxLength",
-        "OptionKey",
-        "Result",
-        "SendMessageResult",
-    ],
     gen_java: true,
 }
 
diff --git a/tv/input/1.0/Android.bp b/tv/input/1.0/Android.bp
index 1bf3930..a6c1959 100644
--- a/tv/input/1.0/Android.bp
+++ b/tv/input/1.0/Android.bp
@@ -15,15 +15,6 @@
         "android.hardware.audio.common@2.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "CableConnectionStatus",
-        "Result",
-        "TvInputDeviceInfo",
-        "TvInputEvent",
-        "TvInputEventType",
-        "TvInputType",
-        "TvStreamConfig",
-    ],
     gen_java: false,
     gen_java_constants: true,
 }
diff --git a/update-makefiles.sh b/update-makefiles.sh
index 14c5b01..c58240f 100755
--- a/update-makefiles.sh
+++ b/update-makefiles.sh
@@ -13,9 +13,3 @@
 do_makefiles_update \
   "android.hardware:hardware/interfaces" \
   "android.hidl:system/libhidl/transport"
-
-echo "Updating files at $ANDROID_BUILD_TOP/test/vts-testcase/hal"
-pushd $ANDROID_BUILD_TOP/test/vts-testcase/hal
-./script/update_makefiles.py
-popd
-
diff --git a/usb/1.0/Android.bp b/usb/1.0/Android.bp
index 6676fa5..a00b671 100644
--- a/usb/1.0/Android.bp
+++ b/usb/1.0/Android.bp
@@ -14,15 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "PortDataRole",
-        "PortMode",
-        "PortPowerRole",
-        "PortRole",
-        "PortRoleType",
-        "PortStatus",
-        "Status",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/usb/1.1/Android.bp b/usb/1.1/Android.bp
index c398f94..fb2cc4e 100644
--- a/usb/1.1/Android.bp
+++ b/usb/1.1/Android.bp
@@ -15,10 +15,6 @@
         "android.hardware.usb@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "PortMode_1_1",
-        "PortStatus_1_1",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/usb/1.2/Android.bp b/usb/1.2/Android.bp
index 55ffad0..5206754 100644
--- a/usb/1.2/Android.bp
+++ b/usb/1.2/Android.bp
@@ -16,13 +16,6 @@
         "android.hardware.usb@1.1",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "ContaminantDetectionStatus",
-        "ContaminantProtectionMode",
-        "ContaminantProtectionStatus",
-        "PortStatus",
-        "Status",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/usb/gadget/1.0/Android.bp b/usb/gadget/1.0/Android.bp
index f38002f..7ee432b 100644
--- a/usb/gadget/1.0/Android.bp
+++ b/usb/gadget/1.0/Android.bp
@@ -14,10 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "GadgetFunction",
-        "Status",
-    ],
     gen_java: true,
 }
 
diff --git a/vibrator/1.0/Android.bp b/vibrator/1.0/Android.bp
index 6913c88..acc97d4 100644
--- a/vibrator/1.0/Android.bp
+++ b/vibrator/1.0/Android.bp
@@ -13,11 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Effect",
-        "EffectStrength",
-        "Status",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/vibrator/1.1/Android.bp b/vibrator/1.1/Android.bp
index 810797b..2055e5a 100644
--- a/vibrator/1.1/Android.bp
+++ b/vibrator/1.1/Android.bp
@@ -14,9 +14,6 @@
         "android.hardware.vibrator@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Effect_1_1",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/vibrator/1.2/Android.bp b/vibrator/1.2/Android.bp
index 88192c1..481adee 100644
--- a/vibrator/1.2/Android.bp
+++ b/vibrator/1.2/Android.bp
@@ -15,9 +15,6 @@
         "android.hardware.vibrator@1.1",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Effect",
-    ],
     gen_java: true,
 }
 
diff --git a/weaver/1.0/Android.bp b/weaver/1.0/Android.bp
index e088a16..7f93b10 100644
--- a/weaver/1.0/Android.bp
+++ b/weaver/1.0/Android.bp
@@ -13,12 +13,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "WeaverConfig",
-        "WeaverReadResponse",
-        "WeaverReadStatus",
-        "WeaverStatus",
-    ],
     gen_java: true,
 }
 
diff --git a/wifi/1.0/Android.bp b/wifi/1.0/Android.bp
index 096fb6c..c5ee1bb 100644
--- a/wifi/1.0/Android.bp
+++ b/wifi/1.0/Android.bp
@@ -25,90 +25,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "IfaceType",
-        "NanBandIndex",
-        "NanBandSpecificConfig",
-        "NanCapabilities",
-        "NanCipherSuiteType",
-        "NanClusterEventInd",
-        "NanClusterEventType",
-        "NanConfigRequest",
-        "NanDataPathChannelCfg",
-        "NanDataPathConfirmInd",
-        "NanDataPathRequestInd",
-        "NanDataPathSecurityConfig",
-        "NanDataPathSecurityType",
-        "NanDebugConfig",
-        "NanDiscoveryCommonConfig",
-        "NanEnableRequest",
-        "NanFollowupReceivedInd",
-        "NanInitiateDataPathRequest",
-        "NanMatchAlg",
-        "NanMatchInd",
-        "NanParamSizeLimits",
-        "NanPublishRequest",
-        "NanPublishType",
-        "NanRangingIndication",
-        "NanRespondToDataPathIndicationRequest",
-        "NanSrfType",
-        "NanStatusType",
-        "NanSubscribeRequest",
-        "NanSubscribeType",
-        "NanTransmitFollowupRequest",
-        "NanTxType",
-        "RttBw",
-        "RttCapabilities",
-        "RttConfig",
-        "RttLciInformation",
-        "RttLcrInformation",
-        "RttMotionPattern",
-        "RttPeerType",
-        "RttPreamble",
-        "RttResponder",
-        "RttResult",
-        "RttStatus",
-        "RttType",
-        "StaApfPacketFilterCapabilities",
-        "StaBackgroundScanBucketEventReportSchemeMask",
-        "StaBackgroundScanBucketParameters",
-        "StaBackgroundScanCapabilities",
-        "StaBackgroundScanParameters",
-        "StaLinkLayerIfacePacketStats",
-        "StaLinkLayerIfaceStats",
-        "StaLinkLayerRadioStats",
-        "StaLinkLayerStats",
-        "StaRoamingCapabilities",
-        "StaRoamingConfig",
-        "StaRoamingState",
-        "StaScanData",
-        "StaScanDataFlagMask",
-        "StaScanLimits",
-        "StaScanResult",
-        "WifiBand",
-        "WifiChannelInfo",
-        "WifiChannelWidthInMhz",
-        "WifiDebugHostWakeReasonRxIcmpPacketDetails",
-        "WifiDebugHostWakeReasonRxMulticastPacketDetails",
-        "WifiDebugHostWakeReasonRxPacketDetails",
-        "WifiDebugHostWakeReasonStats",
-        "WifiDebugPacketFateFrameInfo",
-        "WifiDebugPacketFateFrameType",
-        "WifiDebugRingBufferFlags",
-        "WifiDebugRingBufferStatus",
-        "WifiDebugRingBufferVerboseLevel",
-        "WifiDebugRxPacketFate",
-        "WifiDebugRxPacketFateReport",
-        "WifiDebugTxPacketFate",
-        "WifiDebugTxPacketFateReport",
-        "WifiInformationElement",
-        "WifiNanStatus",
-        "WifiRateInfo",
-        "WifiRateNss",
-        "WifiRatePreamble",
-        "WifiStatus",
-        "WifiStatusCode",
-    ],
     gen_java: true,
     gen_java_constants: true,
 }
diff --git a/wifi/1.2/Android.bp b/wifi/1.2/Android.bp
index c144f22..1863eaf 100644
--- a/wifi/1.2/Android.bp
+++ b/wifi/1.2/Android.bp
@@ -20,12 +20,6 @@
         "android.hardware.wifi@1.1",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "NanConfigRequestSupplemental",
-        "NanDataPathChannelInfo",
-        "NanDataPathConfirmInd",
-        "NanDataPathScheduleUpdateInd",
-    ],
     gen_java: true,
 }
 
diff --git a/wifi/1.3/Android.bp b/wifi/1.3/Android.bp
index 8af1dc4..401c7a6 100644
--- a/wifi/1.3/Android.bp
+++ b/wifi/1.3/Android.bp
@@ -18,11 +18,6 @@
         "android.hardware.wifi@1.2",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "StaLinkLayerRadioStats",
-        "StaLinkLayerStats",
-        "WifiChannelStats",
-    ],
     gen_java: true,
 }
 
diff --git a/wifi/1.3/default/tests/runtests.sh b/wifi/1.3/default/tests/runtests.sh
index eefc697..6bce3ef 100755
--- a/wifi/1.3/default/tests/runtests.sh
+++ b/wifi/1.3/default/tests/runtests.sh
@@ -23,4 +23,4 @@
 $ANDROID_BUILD_TOP/build/soong/soong_ui.bash --make-mode android.hardware.wifi@1.0-service-tests
 adb root
 adb sync data
-adb shell /data/nativetest64/android.hardware.wifi@1.0-service-tests/android.hardware.wifi@1.0-service-tests
+adb shell /data/nativetest64/vendor/android.hardware.wifi@1.0-service-tests/android.hardware.wifi@1.0-service-tests
diff --git a/wifi/1.3/default/wifi_chip.cpp b/wifi/1.3/default/wifi_chip.cpp
index 906f14a..d4c0329 100644
--- a/wifi/1.3/default/wifi_chip.cpp
+++ b/wifi/1.3/default/wifi_chip.cpp
@@ -86,16 +86,15 @@
     }
 
     std::array<char, PROPERTY_VALUE_MAX> buffer;
-    std::string propName = "wifi.interface." + std::to_string(idx);
-    auto res = property_get(propName.c_str(), buffer.data(), nullptr);
-    if (res > 0) return buffer.data();
-
     if (idx == 0 || idx == 1) {
         const char* altPropName =
             (idx == 0) ? "wifi.interface" : "wifi.concurrent.interface";
-        res = property_get(altPropName, buffer.data(), nullptr);
+        auto res = property_get(altPropName, buffer.data(), nullptr);
         if (res > 0) return buffer.data();
     }
+    std::string propName = "wifi.interface." + std::to_string(idx);
+    auto res = property_get(propName.c_str(), buffer.data(), nullptr);
+    if (res > 0) return buffer.data();
 
     return "wlan" + std::to_string(idx);
 }
@@ -115,7 +114,7 @@
     std::unique_ptr<DIR, decltype(&closedir)> dir_dump(
         opendir(kTombstoneFolderPath), closedir);
     if (!dir_dump) {
-        LOG(ERROR) << "Failed to open directory: " << strerror(errno);
+        PLOG(ERROR) << "Failed to open directory";
         return false;
     }
     struct dirent* dp;
@@ -129,8 +128,7 @@
         struct stat cur_file_stat;
         std::string cur_file_path = kTombstoneFolderPath + cur_file_name;
         if (stat(cur_file_path.c_str(), &cur_file_stat) == -1) {
-            LOG(ERROR) << "Failed to get file stat for " << cur_file_path
-                       << ": " << strerror(errno);
+            PLOG(ERROR) << "Failed to get file stat for " << cur_file_path;
             success = false;
             continue;
         }
@@ -145,7 +143,7 @@
         if (cur_file_count > kMaxRingBufferFileNum ||
             cur_file.first < delete_files_before) {
             if (unlink(cur_file.second.c_str()) != 0) {
-                LOG(ERROR) << "Error deleting file " << strerror(errno);
+                PLOG(ERROR) << "Error deleting file";
                 success = false;
             }
             cur_file_count--;
@@ -169,13 +167,11 @@
                 major(st.st_dev), minor(st.st_dev), major(st.st_rdev),
                 minor(st.st_rdev), static_cast<uint32_t>(file_name_len), 0);
     if (write(out_fd, read_buf.data(), llen) == -1) {
-        LOG(ERROR) << "Error writing cpio header to file " << file_name << " "
-                   << strerror(errno);
+        PLOG(ERROR) << "Error writing cpio header to file " << file_name;
         return false;
     }
     if (write(out_fd, file_name, file_name_len) == -1) {
-        LOG(ERROR) << "Error writing filename to file " << file_name << " "
-                   << strerror(errno);
+        PLOG(ERROR) << "Error writing filename to file " << file_name;
         return false;
     }
 
@@ -184,8 +180,7 @@
     if (llen != 0) {
         const uint32_t zero = 0;
         if (write(out_fd, &zero, 4 - llen) == -1) {
-            LOG(ERROR) << "Error padding 0s to file " << file_name << " "
-                       << strerror(errno);
+            PLOG(ERROR) << "Error padding 0s to file " << file_name;
             return false;
         }
     }
@@ -201,17 +196,17 @@
     while (llen > 0) {
         ssize_t bytes_read = read(fd_read, read_buf.data(), read_buf.size());
         if (bytes_read == -1) {
-            LOG(ERROR) << "Error reading file " << strerror(errno);
+            PLOG(ERROR) << "Error reading file";
             return ++n_error;
         }
         llen -= bytes_read;
         if (write(out_fd, read_buf.data(), bytes_read) == -1) {
-            LOG(ERROR) << "Error writing data to file " << strerror(errno);
+            PLOG(ERROR) << "Error writing data to file";
             return ++n_error;
         }
         if (bytes_read == 0) {  // this should never happen, but just in case
                                 // to unstuck from while loop
-            LOG(ERROR) << "Unexpected read result for " << strerror(errno);
+            PLOG(ERROR) << "Unexpected read result";
             n_error++;
             break;
         }
@@ -220,7 +215,7 @@
     if (llen != 0) {
         const uint32_t zero = 0;
         if (write(out_fd, &zero, 4 - llen) == -1) {
-            LOG(ERROR) << "Error padding 0s to file " << strerror(errno);
+            PLOG(ERROR) << "Error padding 0s to file";
             return ++n_error;
         }
     }
@@ -235,7 +230,7 @@
               sprintf(read_buf.data(), "070701%040X%056X%08XTRAILER!!!", 1,
                       0x0b, 0) +
                   4) == -1) {
-        LOG(ERROR) << "Error writing trailing bytes " << strerror(errno);
+        PLOG(ERROR) << "Error writing trailing bytes";
         return false;
     }
     return true;
@@ -250,7 +245,7 @@
     std::unique_ptr<DIR, decltype(&closedir)> dir_dump(opendir(input_dir),
                                                        closedir);
     if (!dir_dump) {
-        LOG(ERROR) << "Failed to open directory: " << strerror(errno);
+        PLOG(ERROR) << "Failed to open directory";
         return ++n_error;
     }
     while ((dp = readdir(dir_dump.get()))) {
@@ -264,15 +259,13 @@
         struct stat st;
         const std::string cur_file_path = kTombstoneFolderPath + cur_file_name;
         if (stat(cur_file_path.c_str(), &st) == -1) {
-            LOG(ERROR) << "Failed to get file stat for " << cur_file_path
-                       << ": " << strerror(errno);
+            PLOG(ERROR) << "Failed to get file stat for " << cur_file_path;
             n_error++;
             continue;
         }
         const int fd_read = open(cur_file_path.c_str(), O_RDONLY);
         if (fd_read == -1) {
-            LOG(ERROR) << "Failed to open file " << cur_file_path << " "
-                       << strerror(errno);
+            PLOG(ERROR) << "Failed to open file " << cur_file_path;
             n_error++;
             continue;
         }
@@ -1374,14 +1367,14 @@
             kTombstoneFolderPath + item.first + "XXXXXXXXXX";
         const int dump_fd = mkstemp(makeCharVec(file_path_raw).data());
         if (dump_fd == -1) {
-            LOG(ERROR) << "create file failed: " << strerror(errno);
+            PLOG(ERROR) << "create file failed";
             return false;
         }
         unique_fd file_auto_closer(dump_fd);
         for (const auto& cur_block : cur_buffer.getData()) {
             if (write(dump_fd, cur_block.data(),
                       sizeof(cur_block[0]) * cur_block.size()) == -1) {
-                LOG(ERROR) << "Error writing to file " << strerror(errno);
+                PLOG(ERROR) << "Error writing to file";
             }
         }
     }
diff --git a/wifi/1.3/default/wifi_legacy_hal.cpp b/wifi/1.3/default/wifi_legacy_hal.cpp
index 2b90f92..5aa98c4 100644
--- a/wifi/1.3/default/wifi_legacy_hal.cpp
+++ b/wifi/1.3/default/wifi_legacy_hal.cpp
@@ -424,6 +424,8 @@
     return WIFI_SUCCESS;
 }
 
+bool WifiLegacyHal::isStarted() { return is_started_; }
+
 std::pair<wifi_error, std::string> WifiLegacyHal::getDriverVersion(
     const std::string& iface_name) {
     std::array<char, kMaxVersionStringLength> buffer;
diff --git a/wifi/1.3/default/wifi_legacy_hal.h b/wifi/1.3/default/wifi_legacy_hal.h
index d6f05ae..70a919f 100644
--- a/wifi/1.3/default/wifi_legacy_hal.h
+++ b/wifi/1.3/default/wifi_legacy_hal.h
@@ -181,6 +181,8 @@
     // using a predefined timeout.
     virtual wifi_error stop(std::unique_lock<std::recursive_mutex>* lock,
                             const std::function<void()>& on_complete_callback);
+    // Checks if legacy HAL has successfully started
+    bool isStarted();
     // Wrappers for all the functions in the legacy HAL function table.
     std::pair<wifi_error, std::string> getDriverVersion(
         const std::string& iface_name);
diff --git a/wifi/hostapd/1.0/Android.bp b/wifi/hostapd/1.0/Android.bp
index a17e153..9ee976e 100644
--- a/wifi/hostapd/1.0/Android.bp
+++ b/wifi/hostapd/1.0/Android.bp
@@ -14,10 +14,6 @@
         "android.hardware.wifi.supplicant@1.0",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "HostapdStatus",
-        "HostapdStatusCode",
-    ],
     gen_java: true,
 }
 
diff --git a/wifi/offload/1.0/Android.bp b/wifi/offload/1.0/Android.bp
index c6c0e7a..1a9ae73 100644
--- a/wifi/offload/1.0/Android.bp
+++ b/wifi/offload/1.0/Android.bp
@@ -14,20 +14,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "Capability",
-        "LogRecord",
-        "NetworkInfo",
-        "OffloadStatus",
-        "OffloadStatusCode",
-        "RecordName",
-        "ScanFilter",
-        "ScanParam",
-        "ScanRecord",
-        "ScanResult",
-        "ScanStats",
-        "SecurityMode",
-    ],
     gen_java: false,
 }
 
diff --git a/wifi/supplicant/1.0/Android.bp b/wifi/supplicant/1.0/Android.bp
index fc7ce55..c99706d 100644
--- a/wifi/supplicant/1.0/Android.bp
+++ b/wifi/supplicant/1.0/Android.bp
@@ -24,13 +24,6 @@
     interfaces: [
         "android.hidl.base@1.0",
     ],
-    types: [
-        "IfaceType",
-        "P2pGroupCapabilityMask",
-        "SupplicantStatus",
-        "SupplicantStatusCode",
-        "WpsConfigMethods",
-    ],
     gen_java: true,
 }
 
diff --git a/wifi/supplicant/1.2/Android.bp b/wifi/supplicant/1.2/Android.bp
index a0fc2b1..c685022 100644
--- a/wifi/supplicant/1.2/Android.bp
+++ b/wifi/supplicant/1.2/Android.bp
@@ -19,12 +19,6 @@
         "android.hardware.wifi.supplicant@1.1",
         "android.hidl.base@1.0",
     ],
-    types: [
-        "DppAkm",
-        "DppFailureCode",
-        "DppNetRole",
-        "DppProgressCode",
-    ],
     gen_java: true,
 }