Merge "target-side test for vibrator hal."
diff --git a/audio/2.0/Android.bp b/audio/2.0/Android.bp
index 2fd2d67..984a095 100644
--- a/audio/2.0/Android.bp
+++ b/audio/2.0/Android.bp
@@ -93,9 +93,9 @@
         "android.hardware.audio.common@2.0",
         "android.hardware.audio.effect@2.0",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/audio/2.0/default/service.cpp b/audio/2.0/default/service.cpp
index f254512..39708c2 100644
--- a/audio/2.0/default/service.cpp
+++ b/audio/2.0/default/service.cpp
@@ -19,7 +19,6 @@
 #include <hwbinder/IInterface.h>
 #include <hwbinder/IPCThreadState.h>
 #include <hwbinder/ProcessState.h>
-#include <hidl/IServiceManager.h>
 #include <utils/Errors.h>
 #include <utils/Log.h>
 #include <utils/Looper.h>
diff --git a/audio/common/2.0/Android.bp b/audio/common/2.0/Android.bp
index 783623a..a00e2bd 100644
--- a/audio/common/2.0/Android.bp
+++ b/audio/common/2.0/Android.bp
@@ -35,9 +35,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/audio/effect/2.0/Android.bp b/audio/effect/2.0/Android.bp
index 31c1b90..a7b4131 100644
--- a/audio/effect/2.0/Android.bp
+++ b/audio/effect/2.0/Android.bp
@@ -148,9 +148,9 @@
         "libcutils",
         "android.hardware.audio.common@2.0",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/biometrics/fingerprint/2.1/Android.bp b/biometrics/fingerprint/2.1/Android.bp
index e1fd755..5ade9f3 100644
--- a/biometrics/fingerprint/2.1/Android.bp
+++ b/biometrics/fingerprint/2.1/Android.bp
@@ -51,9 +51,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/broadcastradio/1.0/Android.bp b/broadcastradio/1.0/Android.bp
index 7883d67..75736d1 100644
--- a/broadcastradio/1.0/Android.bp
+++ b/broadcastradio/1.0/Android.bp
@@ -67,9 +67,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/example/extension/light/2.0/Android.bp b/example/extension/light/2.0/Android.bp
index 3e6d2b1..5d58512 100644
--- a/example/extension/light/2.0/Android.bp
+++ b/example/extension/light/2.0/Android.bp
@@ -44,9 +44,9 @@
         "libcutils",
         "android.hardware.light@2.0",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/example/extension/light/2.0/default/service.cpp b/example/extension/light/2.0/default/service.cpp
index 55121d9..d21afa6 100644
--- a/example/extension/light/2.0/default/service.cpp
+++ b/example/extension/light/2.0/default/service.cpp
@@ -1,15 +1,7 @@
 #define LOG_TAG "android.hardware.light@2.0-service"
+
 #include <utils/Log.h>
 
-// #include <iostream>
-// #include <unistd.h>
-
-// #include <hidl/IServiceManager.h>
-// #include <hwbinder/IPCThreadState.h>
-// #include <hwbinder/ProcessState.h>
-// #include <utils/Errors.h>
-// #include <utils/StrongPointer.h>
-
 #include "Light.h"
 
 using android::sp;
diff --git a/gnss/1.0/Android.bp b/gnss/1.0/Android.bp
index fe90f1e..9b9abe3 100644
--- a/gnss/1.0/Android.bp
+++ b/gnss/1.0/Android.bp
@@ -171,9 +171,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/graphics/Android.bp b/graphics/Android.bp
index 92bcb2a..4ac7766 100644
--- a/graphics/Android.bp
+++ b/graphics/Android.bp
@@ -2,6 +2,7 @@
 subdirs = [
     "allocator/2.0",
     "allocator/2.0/default",
+    "common/1.0",
     "composer/2.1",
     "composer/2.1/default",
     "mapper/2.0",
diff --git a/graphics/allocator/2.0/Android.bp b/graphics/allocator/2.0/Android.bp
index 1e9edac..0d800be 100644
--- a/graphics/allocator/2.0/Android.bp
+++ b/graphics/allocator/2.0/Android.bp
@@ -43,9 +43,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/graphics/common/1.0/Android.bp b/graphics/common/1.0/Android.bp
new file mode 100644
index 0000000..ba66f94
--- /dev/null
+++ b/graphics/common/1.0/Android.bp
@@ -0,0 +1,43 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+    name: "android.hardware.graphics.common@1.0_genc++",
+    tool: "hidl-gen",
+    cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.graphics.common@1.0",
+    srcs: [
+        "types.hal",
+    ],
+    out: [
+        "android/hardware/graphics/common/1.0/types.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.graphics.common@1.0_genc++_headers",
+    tool: "hidl-gen",
+    cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.graphics.common@1.0",
+    srcs: [
+        "types.hal",
+    ],
+    out: [
+        "android/hardware/graphics/common/1.0/types.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.graphics.common@1.0",
+    generated_sources: ["android.hardware.graphics.common@1.0_genc++"],
+    generated_headers: ["android.hardware.graphics.common@1.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.graphics.common@1.0_genc++_headers"],
+    shared_libs: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
+        "libcutils",
+    ],
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
+    ],
+}
diff --git a/graphics/common/1.0/types.hal b/graphics/common/1.0/types.hal
new file mode 100644
index 0000000..395af49
--- /dev/null
+++ b/graphics/common/1.0/types.hal
@@ -0,0 +1,1207 @@
+/*
+ * Copyright (C) 2016 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.graphics.common@1.0;
+
+/**
+ * pixel format definitions
+ */
+@export(name="android_pixel_format_t", value_prefix="HAL_PIXEL_FORMAT_")
+enum PixelFormat : int32_t {
+    /*
+     * "linear" color pixel formats:
+     *
+     * When used with ANativeWindow, the dataSpace field describes the color
+     * space of the buffer.
+     *
+     * The color space determines, for example, if the formats are linear or
+     * gamma-corrected; or whether any special operations are performed when
+     * reading or writing into a buffer in one of these formats.
+     */
+    RGBA_8888          = 1,
+    RGBX_8888          = 2,
+    RGB_888            = 3,
+    RGB_565            = 4,
+    BGRA_8888          = 5,
+
+    /*
+     * 0x100 - 0x1FF
+     *
+     * This range is reserved for pixel formats that are specific to the HAL
+     * implementation.  Implementations can use any value in this range to
+     * communicate video pixel formats between their HAL modules.  These formats
+     * must not have an alpha channel.  Additionally, an EGLimage created from a
+     * gralloc buffer of one of these formats must be supported for use with the
+     * GL_OES_EGL_image_external OpenGL ES extension.
+     */
+
+    /*
+     * Android YUV format:
+     *
+     * This format is exposed outside of the HAL to software decoders and
+     * applications.  EGLImageKHR must support it in conjunction with the
+     * OES_EGL_image_external extension.
+     *
+     * YV12 is a 4:2:0 YCrCb planar format comprised of a WxH Y plane followed
+     * by (W/2) x (H/2) Cr and Cb planes.
+     *
+     * This format assumes
+     * - an even width
+     * - an even height
+     * - a horizontal stride multiple of 16 pixels
+     * - a vertical stride equal to the height
+     *
+     *   y_size = stride * height
+     *   c_stride = ALIGN(stride/2, 16)
+     *   c_size = c_stride * height/2
+     *   size = y_size + c_size * 2
+     *   cr_offset = y_size
+     *   cb_offset = y_size + c_size
+     *
+     * When used with ANativeWindow, the dataSpace field describes the color
+     * space of the buffer.
+     */
+    YV12   = 0x32315659, // YCrCb 4:2:0 Planar
+
+
+    /*
+     * Android Y8 format:
+     *
+     * This format is exposed outside of the HAL to the framework.
+     * The expected gralloc usage flags are SW_* and HW_CAMERA_*,
+     * and no other HW_ flags will be used.
+     *
+     * Y8 is a YUV planar format comprised of a WxH Y plane,
+     * with each pixel being represented by 8 bits.
+     *
+     * It is equivalent to just the Y plane from YV12.
+     *
+     * This format assumes
+     * - an even width
+     * - an even height
+     * - a horizontal stride multiple of 16 pixels
+     * - a vertical stride equal to the height
+     *
+     *   size = stride * height
+     *
+     * When used with ANativeWindow, the dataSpace field describes the color
+     * space of the buffer.
+     */
+    Y8     = 0x20203859,
+
+    /*
+     * Android Y16 format:
+     *
+     * This format is exposed outside of the HAL to the framework.
+     * The expected gralloc usage flags are SW_* and HW_CAMERA_*,
+     * and no other HW_ flags will be used.
+     *
+     * Y16 is a YUV planar format comprised of a WxH Y plane,
+     * with each pixel being represented by 16 bits.
+     *
+     * It is just like Y8, but has double the bits per pixel (little endian).
+     *
+     * This format assumes
+     * - an even width
+     * - an even height
+     * - a horizontal stride multiple of 16 pixels
+     * - a vertical stride equal to the height
+     * - strides are specified in pixels, not in bytes
+     *
+     *   size = stride * height * 2
+     *
+     * When used with ANativeWindow, the dataSpace field describes the color
+     * space of the buffer, except that dataSpace field
+     * HAL_DATASPACE_DEPTH indicates that this buffer contains a depth
+     * image where each sample is a distance value measured by a depth camera,
+     * plus an associated confidence value.
+     */
+    Y16    = 0x20363159,
+
+    /*
+     * Android RAW sensor format:
+     *
+     * This format is exposed outside of the camera HAL to applications.
+     *
+     * RAW16 is a single-channel, 16-bit, little endian format, typically
+     * representing raw Bayer-pattern images from an image sensor, with minimal
+     * processing.
+     *
+     * The exact pixel layout of the data in the buffer is sensor-dependent, and
+     * needs to be queried from the camera device.
+     *
+     * Generally, not all 16 bits are used; more common values are 10 or 12
+     * bits. If not all bits are used, the lower-order bits are filled first.
+     * All parameters to interpret the raw data (black and white points,
+     * color space, etc) must be queried from the camera device.
+     *
+     * This format assumes
+     * - an even width
+     * - an even height
+     * - a horizontal stride multiple of 16 pixels
+     * - a vertical stride equal to the height
+     * - strides are specified in pixels, not in bytes
+     *
+     *   size = stride * height * 2
+     *
+     * This format must be accepted by the gralloc module when used with the
+     * following usage flags:
+     *    - GRALLOC_USAGE_HW_CAMERA_*
+     *    - GRALLOC_USAGE_SW_*
+     *    - GRALLOC_USAGE_RENDERSCRIPT
+     *
+     * When used with ANativeWindow, the dataSpace should be
+     * HAL_DATASPACE_ARBITRARY, as raw image sensor buffers require substantial
+     * extra metadata to define.
+     */
+    RAW16 = 0x20,
+
+    /*
+     * Android RAW10 format:
+     *
+     * This format is exposed outside of the camera HAL to applications.
+     *
+     * RAW10 is a single-channel, 10-bit per pixel, densely packed in each row,
+     * unprocessed format, usually representing raw Bayer-pattern images coming from
+     * an image sensor.
+     *
+     * In an image buffer with this format, starting from the first pixel of each
+     * row, each 4 consecutive pixels are packed into 5 bytes (40 bits). Each one
+     * of the first 4 bytes contains the top 8 bits of each pixel, The fifth byte
+     * contains the 2 least significant bits of the 4 pixels, the exact layout data
+     * for each 4 consecutive pixels is illustrated below (Pi[j] stands for the jth
+     * bit of the ith pixel):
+     *
+     *          bit 7                                     bit 0
+     *          =====|=====|=====|=====|=====|=====|=====|=====|
+     * Byte 0: |P0[9]|P0[8]|P0[7]|P0[6]|P0[5]|P0[4]|P0[3]|P0[2]|
+     *         |-----|-----|-----|-----|-----|-----|-----|-----|
+     * Byte 1: |P1[9]|P1[8]|P1[7]|P1[6]|P1[5]|P1[4]|P1[3]|P1[2]|
+     *         |-----|-----|-----|-----|-----|-----|-----|-----|
+     * Byte 2: |P2[9]|P2[8]|P2[7]|P2[6]|P2[5]|P2[4]|P2[3]|P2[2]|
+     *         |-----|-----|-----|-----|-----|-----|-----|-----|
+     * Byte 3: |P3[9]|P3[8]|P3[7]|P3[6]|P3[5]|P3[4]|P3[3]|P3[2]|
+     *         |-----|-----|-----|-----|-----|-----|-----|-----|
+     * Byte 4: |P3[1]|P3[0]|P2[1]|P2[0]|P1[1]|P1[0]|P0[1]|P0[0]|
+     *          ===============================================
+     *
+     * This format assumes
+     * - a width multiple of 4 pixels
+     * - an even height
+     * - a vertical stride equal to the height
+     * - strides are specified in bytes, not in pixels
+     *
+     *   size = stride * height
+     *
+     * When stride is equal to width * (10 / 8), there will be no padding bytes at
+     * the end of each row, the entire image data is densely packed. When stride is
+     * larger than width * (10 / 8), padding bytes will be present at the end of each
+     * row (including the last row).
+     *
+     * This format must be accepted by the gralloc module when used with the
+     * following usage flags:
+     *    - GRALLOC_USAGE_HW_CAMERA_*
+     *    - GRALLOC_USAGE_SW_*
+     *    - GRALLOC_USAGE_RENDERSCRIPT
+     *
+     * When used with ANativeWindow, the dataSpace field should be
+     * HAL_DATASPACE_ARBITRARY, as raw image sensor buffers require substantial
+     * extra metadata to define.
+     */
+    RAW10 = 0x25,
+
+    /*
+     * Android RAW12 format:
+     *
+     * This format is exposed outside of camera HAL to applications.
+     *
+     * RAW12 is a single-channel, 12-bit per pixel, densely packed in each row,
+     * unprocessed format, usually representing raw Bayer-pattern images coming from
+     * an image sensor.
+     *
+     * In an image buffer with this format, starting from the first pixel of each
+     * row, each two consecutive pixels are packed into 3 bytes (24 bits). The first
+     * and second byte contains the top 8 bits of first and second pixel. The third
+     * byte contains the 4 least significant bits of the two pixels, the exact layout
+     * data for each two consecutive pixels is illustrated below (Pi[j] stands for
+     * the jth bit of the ith pixel):
+     *
+     *           bit 7                                            bit 0
+     *          ======|======|======|======|======|======|======|======|
+     * Byte 0: |P0[11]|P0[10]|P0[ 9]|P0[ 8]|P0[ 7]|P0[ 6]|P0[ 5]|P0[ 4]|
+     *         |------|------|------|------|------|------|------|------|
+     * Byte 1: |P1[11]|P1[10]|P1[ 9]|P1[ 8]|P1[ 7]|P1[ 6]|P1[ 5]|P1[ 4]|
+     *         |------|------|------|------|------|------|------|------|
+     * Byte 2: |P1[ 3]|P1[ 2]|P1[ 1]|P1[ 0]|P0[ 3]|P0[ 2]|P0[ 1]|P0[ 0]|
+     *          =======================================================
+     *
+     * This format assumes:
+     * - a width multiple of 4 pixels
+     * - an even height
+     * - a vertical stride equal to the height
+     * - strides are specified in bytes, not in pixels
+     *
+     *   size = stride * height
+     *
+     * When stride is equal to width * (12 / 8), there will be no padding bytes at
+     * the end of each row, the entire image data is densely packed. When stride is
+     * larger than width * (12 / 8), padding bytes will be present at the end of
+     * each row (including the last row).
+     *
+     * This format must be accepted by the gralloc module when used with the
+     * following usage flags:
+     *    - GRALLOC_USAGE_HW_CAMERA_*
+     *    - GRALLOC_USAGE_SW_*
+     *    - GRALLOC_USAGE_RENDERSCRIPT
+     *
+     * When used with ANativeWindow, the dataSpace field should be
+     * HAL_DATASPACE_ARBITRARY, as raw image sensor buffers require substantial
+     * extra metadata to define.
+     */
+    RAW12 = 0x26,
+
+    /*
+     * Android opaque RAW format:
+     *
+     * This format is exposed outside of the camera HAL to applications.
+     *
+     * RAW_OPAQUE is a format for unprocessed raw image buffers coming from an
+     * image sensor. The actual structure of buffers of this format is
+     * implementation-dependent.
+     *
+     * This format must be accepted by the gralloc module when used with the
+     * following usage flags:
+     *    - GRALLOC_USAGE_HW_CAMERA_*
+     *    - GRALLOC_USAGE_SW_*
+     *    - GRALLOC_USAGE_RENDERSCRIPT
+     *
+     * When used with ANativeWindow, the dataSpace field should be
+     * HAL_DATASPACE_ARBITRARY, as raw image sensor buffers require substantial
+     * extra metadata to define.
+     */
+    RAW_OPAQUE = 0x24,
+
+    /*
+     * Android binary blob graphics buffer format:
+     *
+     * This format is used to carry task-specific data which does not have a
+     * standard image structure. The details of the format are left to the two
+     * endpoints.
+     *
+     * A typical use case is for transporting JPEG-compressed images from the
+     * Camera HAL to the framework or to applications.
+     *
+     * Buffers of this format must have a height of 1, and width equal to their
+     * size in bytes.
+     *
+     * When used with ANativeWindow, the mapping of the dataSpace field to
+     * buffer contents for BLOB is as follows:
+     *
+     *  dataSpace value               | Buffer contents
+     * -------------------------------+-----------------------------------------
+     *  HAL_DATASPACE_JFIF            | An encoded JPEG image
+     *  HAL_DATASPACE_DEPTH           | An android_depth_points buffer
+     *  Other                         | Unsupported
+     *
+     */
+    BLOB = 0x21,
+
+    /*
+     * Android format indicating that the choice of format is entirely up to the
+     * device-specific Gralloc implementation.
+     *
+     * The Gralloc implementation should examine the usage bits passed in when
+     * allocating a buffer with this format, and it should derive the pixel
+     * format from those usage flags.  This format will never be used with any
+     * of the GRALLOC_USAGE_SW_* usage flags.
+     *
+     * If a buffer of this format is to be used as an OpenGL ES texture, the
+     * framework will assume that sampling the texture will always return an
+     * alpha value of 1.0 (i.e. the buffer contains only opaque pixel values).
+     *
+     * When used with ANativeWindow, the dataSpace field describes the color
+     * space of the buffer.
+     */
+    IMPLEMENTATION_DEFINED = 0x22,
+
+    /*
+     * Android flexible YCbCr 4:2:0 formats
+     *
+     * This format allows platforms to use an efficient YCbCr/YCrCb 4:2:0
+     * buffer layout, while still describing the general format in a
+     * layout-independent manner.  While called YCbCr, it can be
+     * used to describe formats with either chromatic ordering, as well as
+     * whole planar or semiplanar layouts.
+     *
+     * struct android_ycbcr (below) is the the struct used to describe it.
+     *
+     * This format must be accepted by the gralloc module when
+     * USAGE_SW_WRITE_* or USAGE_SW_READ_* are set.
+     *
+     * This format is locked for use by gralloc's (*lock_ycbcr) method, and
+     * locking with the (*lock) method will return an error.
+     *
+     * When used with ANativeWindow, the dataSpace field describes the color
+     * space of the buffer.
+     */
+    YCBCR_420_888 = 0x23,
+
+    /*
+     * Android flexible YCbCr 4:2:2 formats
+     *
+     * This format allows platforms to use an efficient YCbCr/YCrCb 4:2:2
+     * buffer layout, while still describing the general format in a
+     * layout-independent manner.  While called YCbCr, it can be
+     * used to describe formats with either chromatic ordering, as well as
+     * whole planar or semiplanar layouts.
+     *
+     * This format is currently only used by SW readable buffers
+     * produced by MediaCodecs, so the gralloc module can ignore this format.
+     */
+    YCBCR_422_888 = 0x27,
+
+    /*
+     * Android flexible YCbCr 4:4:4 formats
+     *
+     * This format allows platforms to use an efficient YCbCr/YCrCb 4:4:4
+     * buffer layout, while still describing the general format in a
+     * layout-independent manner.  While called YCbCr, it can be
+     * used to describe formats with either chromatic ordering, as well as
+     * whole planar or semiplanar layouts.
+     *
+     * This format is currently only used by SW readable buffers
+     * produced by MediaCodecs, so the gralloc module can ignore this format.
+     */
+    YCBCR_444_888 = 0x28,
+
+    /*
+     * Android flexible RGB 888 formats
+     *
+     * This format allows platforms to use an efficient RGB/BGR/RGBX/BGRX
+     * buffer layout, while still describing the general format in a
+     * layout-independent manner.  While called RGB, it can be
+     * used to describe formats with either color ordering and optional
+     * padding, as well as whole planar layout.
+     *
+     * This format is currently only used by SW readable buffers
+     * produced by MediaCodecs, so the gralloc module can ignore this format.
+     */
+    FLEX_RGB_888 = 0x29,
+
+    /*
+     * Android flexible RGBA 8888 formats
+     *
+     * This format allows platforms to use an efficient RGBA/BGRA/ARGB/ABGR
+     * buffer layout, while still describing the general format in a
+     * layout-independent manner.  While called RGBA, it can be
+     * used to describe formats with any of the component orderings, as
+     * well as whole planar layout.
+     *
+     * This format is currently only used by SW readable buffers
+     * produced by MediaCodecs, so the gralloc module can ignore this format.
+     */
+    FLEX_RGBA_8888 = 0x2A,
+
+    /* Legacy formats (deprecated), used by ImageFormat.java */
+    YCBCR_422_SP       = 0x10, // NV16
+    YCRCB_420_SP       = 0x11, // NV21
+    YCBCR_422_I        = 0x14, // YUY2
+};
+
+/**
+ * Transformation definitions
+ *
+ * IMPORTANT NOTE:
+ * ROT_90 is applied CLOCKWISE and AFTER FLIP_{H|V}.
+ *
+ */
+@export(name="android_transform_t", value_prefix="HAL_TRANSFORM_")
+enum Transform : int32_t {
+    /* flip source image horizontally (around the vertical axis) */
+    FLIP_H    = 0x01,
+    /* flip source image vertically (around the horizontal axis)*/
+    FLIP_V    = 0x02,
+    /* rotate source image 90 degrees clockwise */
+    ROT_90    = 0x04,
+    /* rotate source image 180 degrees */
+    ROT_180   = 0x03,
+    /* rotate source image 270 degrees clockwise */
+    ROT_270   = 0x07,
+
+    /* 0x08 is reserved */
+};
+
+/**
+ * Dataspace Definitions
+ * ======================
+ *
+ * Dataspace is the definition of how pixel values should be interpreted.
+ *
+ * For many formats, this is the colorspace of the image data, which includes
+ * primaries (including white point) and the transfer characteristic function,
+ * which describes both gamma curve and numeric range (within the bit depth).
+ *
+ * Other dataspaces include depth measurement data from a depth camera.
+ *
+ * A dataspace is comprised of a number of fields.
+ *
+ * Version
+ * --------
+ * The top 2 bits represent the revision of the field specification. This is
+ * currently always 0.
+ *
+ *
+ * bits    31-30 29                      -                          0
+ *        +-----+----------------------------------------------------+
+ * fields | Rev |            Revision specific fields                |
+ *        +-----+----------------------------------------------------+
+ *
+ * Field layout for version = 0:
+ * ----------------------------
+ *
+ * A dataspace is comprised of the following fields:
+ *      Standard
+ *      Transfer function
+ *      Range
+ *
+ * bits    31-30 29-27 26 -  22 21 -  16 15             -           0
+ *        +-----+-----+--------+--------+----------------------------+
+ * fields |  0  |Range|Transfer|Standard|    Legacy and custom       |
+ *        +-----+-----+--------+--------+----------------------------+
+ *          VV    RRR   TTTTT    SSSSSS    LLLLLLLL       LLLLLLLL
+ *
+ * If range, transfer and standard fields are all 0 (e.g. top 16 bits are
+ * all zeroes), the bottom 16 bits contain either a legacy dataspace value,
+ * or a custom value.
+ */
+@export(name="android_dataspace_t", value_prefix="HAL_DATASPACE_")
+enum Dataspace : int32_t {
+    /*
+     * Default-assumption data space, when not explicitly specified.
+     *
+     * It is safest to assume the buffer is an image with sRGB primaries and
+     * encoding ranges, but the consumer and/or the producer of the data may
+     * simply be using defaults. No automatic gamma transform should be
+     * expected, except for a possible display gamma transform when drawn to a
+     * screen.
+     */
+    UNKNOWN = 0x0,
+
+    /*
+     * Arbitrary dataspace with manually defined characteristics.  Definition
+     * for colorspaces or other meaning must be communicated separately.
+     *
+     * This is used when specifying primaries, transfer characteristics,
+     * etc. separately.
+     *
+     * A typical use case is in video encoding parameters (e.g. for H.264),
+     * where a colorspace can have separately defined primaries, transfer
+     * characteristics, etc.
+     */
+    ARBITRARY = 0x1,
+
+    /*
+     * Color-description aspects
+     *
+     * The following aspects define various characteristics of the color
+     * specification. These represent bitfields, so that a data space value
+     * can specify each of them independently.
+     */
+
+    STANDARD_SHIFT = 16,
+
+    /*
+     * Standard aspect
+     *
+     * Defines the chromaticity coordinates of the source primaries in terms of
+     * the CIE 1931 definition of x and y specified in ISO 11664-1.
+     */
+    STANDARD_MASK = 63 << STANDARD_SHIFT,  // 0x3F
+
+    /*
+     * Chromacity coordinates are unknown or are determined by the application.
+     * Implementations shall use the following suggested standards:
+     *
+     * All YCbCr formats: BT709 if size is 720p or larger (since most video
+     *                    content is letterboxed this corresponds to width is
+     *                    1280 or greater, or height is 720 or greater).
+     *                    BT601_625 if size is smaller than 720p or is JPEG.
+     * All RGB formats:   BT709.
+     *
+     * For all other formats standard is undefined, and implementations should use
+     * an appropriate standard for the data represented.
+     */
+    STANDARD_UNSPECIFIED = 0 << STANDARD_SHIFT,
+
+    /*
+     * Primaries:       x       y
+     *  green           0.300   0.600
+     *  blue            0.150   0.060
+     *  red             0.640   0.330
+     *  white (D65)     0.3127  0.3290
+     *
+     * Use the unadjusted KR = 0.2126, KB = 0.0722 luminance interpretation
+     * for RGB conversion.
+     */
+    STANDARD_BT709 = 1 << STANDARD_SHIFT,
+
+    /*
+     * Primaries:       x       y
+     *  green           0.290   0.600
+     *  blue            0.150   0.060
+     *  red             0.640   0.330
+     *  white (D65)     0.3127  0.3290
+     *
+     *  KR = 0.299, KB = 0.114. This adjusts the luminance interpretation
+     *  for RGB conversion from the one purely determined by the primaries
+     *  to minimize the color shift into RGB space that uses BT.709
+     *  primaries.
+     */
+    STANDARD_BT601_625 = 2 << STANDARD_SHIFT,
+
+    /*
+     * Primaries:       x       y
+     *  green           0.290   0.600
+     *  blue            0.150   0.060
+     *  red             0.640   0.330
+     *  white (D65)     0.3127  0.3290
+     *
+     * Use the unadjusted KR = 0.222, KB = 0.071 luminance interpretation
+     * for RGB conversion.
+     */
+    STANDARD_BT601_625_UNADJUSTED = 3 << STANDARD_SHIFT,
+
+    /*
+     * Primaries:       x       y
+     *  green           0.310   0.595
+     *  blue            0.155   0.070
+     *  red             0.630   0.340
+     *  white (D65)     0.3127  0.3290
+     *
+     *  KR = 0.299, KB = 0.114. This adjusts the luminance interpretation
+     *  for RGB conversion from the one purely determined by the primaries
+     *  to minimize the color shift into RGB space that uses BT.709
+     *  primaries.
+     */
+    STANDARD_BT601_525 = 4 << STANDARD_SHIFT,
+
+    /*
+     * Primaries:       x       y
+     *  green           0.310   0.595
+     *  blue            0.155   0.070
+     *  red             0.630   0.340
+     *  white (D65)     0.3127  0.3290
+     *
+     * Use the unadjusted KR = 0.212, KB = 0.087 luminance interpretation
+     * for RGB conversion (as in SMPTE 240M).
+     */
+    STANDARD_BT601_525_UNADJUSTED = 5 << STANDARD_SHIFT,
+
+    /*
+     * Primaries:       x       y
+     *  green           0.170   0.797
+     *  blue            0.131   0.046
+     *  red             0.708   0.292
+     *  white (D65)     0.3127  0.3290
+     *
+     * Use the unadjusted KR = 0.2627, KB = 0.0593 luminance interpretation
+     * for RGB conversion.
+     */
+    STANDARD_BT2020 = 6 << STANDARD_SHIFT,
+
+    /*
+     * Primaries:       x       y
+     *  green           0.170   0.797
+     *  blue            0.131   0.046
+     *  red             0.708   0.292
+     *  white (D65)     0.3127  0.3290
+     *
+     * Use the unadjusted KR = 0.2627, KB = 0.0593 luminance interpretation
+     * for RGB conversion using the linear domain.
+     */
+    STANDARD_BT2020_CONSTANT_LUMINANCE = 7 << STANDARD_SHIFT,
+
+    /*
+     * Primaries:       x      y
+     *  green           0.21   0.71
+     *  blue            0.14   0.08
+     *  red             0.67   0.33
+     *  white (C)       0.310  0.316
+     *
+     * Use the unadjusted KR = 0.30, KB = 0.11 luminance interpretation
+     * for RGB conversion.
+     */
+    STANDARD_BT470M = 8 << STANDARD_SHIFT,
+
+    /*
+     * Primaries:       x       y
+     *  green           0.243   0.692
+     *  blue            0.145   0.049
+     *  red             0.681   0.319
+     *  white (C)       0.310   0.316
+     *
+     * Use the unadjusted KR = 0.254, KB = 0.068 luminance interpretation
+     * for RGB conversion.
+     */
+    STANDARD_FILM = 9 << STANDARD_SHIFT,
+
+    TRANSFER_SHIFT = 22,
+
+    /*
+     * Transfer aspect
+     *
+     * Transfer characteristics are the opto-electronic transfer characteristic
+     * at the source as a function of linear optical intensity (luminance).
+     *
+     * For digital signals, E corresponds to the recorded value. Normally, the
+     * transfer function is applied in RGB space to each of the R, G and B
+     * components independently. This may result in color shift that can be
+     * minized by applying the transfer function in Lab space only for the L
+     * component. Implementation may apply the transfer function in RGB space
+     * for all pixel formats if desired.
+     */
+
+    TRANSFER_MASK = 31 << TRANSFER_SHIFT,  // 0x1F
+
+    /*
+     * Transfer characteristics are unknown or are determined by the
+     * application.
+     *
+     * Implementations should use the following transfer functions:
+     *
+     * For YCbCr formats: use TRANSFER_SMPTE_170M
+     * For RGB formats: use TRANSFER_SRGB
+     *
+     * For all other formats transfer function is undefined, and implementations
+     * should use an appropriate standard for the data represented.
+     */
+    TRANSFER_UNSPECIFIED = 0 << TRANSFER_SHIFT,
+
+    /*
+     * Transfer characteristic curve:
+     *  E = L
+     *      L - luminance of image 0 <= L <= 1 for conventional colorimetry
+     *      E - corresponding electrical signal
+     */
+    TRANSFER_LINEAR = 1 << TRANSFER_SHIFT,
+
+    /*
+     * Transfer characteristic curve:
+     *
+     * E = 1.055 * L^(1/2.4) - 0.055  for 0.0031308 <= L <= 1
+     *   = 12.92 * L                  for 0 <= L < 0.0031308
+     *     L - luminance of image 0 <= L <= 1 for conventional colorimetry
+     *     E - corresponding electrical signal
+     */
+    TRANSFER_SRGB = 2 << TRANSFER_SHIFT,
+
+    /*
+     * BT.601 525, BT.601 625, BT.709, BT.2020
+     *
+     * Transfer characteristic curve:
+     *  E = 1.099 * L ^ 0.45 - 0.099  for 0.018 <= L <= 1
+     *    = 4.500 * L                 for 0 <= L < 0.018
+     *      L - luminance of image 0 <= L <= 1 for conventional colorimetry
+     *      E - corresponding electrical signal
+     */
+    TRANSFER_SMPTE_170M = 3 << TRANSFER_SHIFT,
+
+    /*
+     * Assumed display gamma 2.2.
+     *
+     * Transfer characteristic curve:
+     *  E = L ^ (1/2.2)
+     *      L - luminance of image 0 <= L <= 1 for conventional colorimetry
+     *      E - corresponding electrical signal
+     */
+    TRANSFER_GAMMA2_2 = 4 << TRANSFER_SHIFT,
+
+    /*
+     *  display gamma 2.8.
+     *
+     * Transfer characteristic curve:
+     *  E = L ^ (1/2.8)
+     *      L - luminance of image 0 <= L <= 1 for conventional colorimetry
+     *      E - corresponding electrical signal
+     */
+    TRANSFER_GAMMA2_8 = 5 << TRANSFER_SHIFT,
+
+    /*
+     * SMPTE ST 2084
+     *
+     * Transfer characteristic curve:
+     *  E = ((c1 + c2 * L^n) / (1 + c3 * L^n)) ^ m
+     *  c1 = c3 - c2 + 1 = 3424 / 4096 = 0.8359375
+     *  c2 = 32 * 2413 / 4096 = 18.8515625
+     *  c3 = 32 * 2392 / 4096 = 18.6875
+     *  m = 128 * 2523 / 4096 = 78.84375
+     *  n = 0.25 * 2610 / 4096 = 0.1593017578125
+     *      L - luminance of image 0 <= L <= 1 for HDR colorimetry.
+     *          L = 1 corresponds to 10000 cd/m2
+     *      E - corresponding electrical signal
+     */
+    TRANSFER_ST2084 = 6 << TRANSFER_SHIFT,
+
+    /*
+     * ARIB STD-B67 Hybrid Log Gamma
+     *
+     * Transfer characteristic curve:
+     *  E = r * L^0.5                 for 0 <= L <= 1
+     *    = a * ln(L - b) + c         for 1 < L
+     *  a = 0.17883277
+     *  b = 0.28466892
+     *  c = 0.55991073
+     *  r = 0.5
+     *      L - luminance of image 0 <= L for HDR colorimetry. L = 1 corresponds
+     *          to reference white level of 100 cd/m2
+     *      E - corresponding electrical signal
+     */
+    TRANSFER_HLG = 7 << TRANSFER_SHIFT,
+
+    RANGE_SHIFT = 27,
+
+    /*
+     * Range aspect
+     *
+     * Defines the range of values corresponding to the unit range of 0-1.
+     * This is defined for YCbCr only, but can be expanded to RGB space.
+     */
+    RANGE_MASK = 7 << RANGE_SHIFT,  // 0x7
+
+    /*
+     * Range is unknown or are determined by the application.  Implementations
+     * shall use the following suggested ranges:
+     *
+     * All YCbCr formats: limited range.
+     * All RGB or RGBA formats (including RAW and Bayer): full range.
+     * All Y formats: full range
+     *
+     * For all other formats range is undefined, and implementations should use
+     * an appropriate range for the data represented.
+     */
+    RANGE_UNSPECIFIED = 0 << RANGE_SHIFT,
+
+    /*
+     * Full range uses all values for Y, Cb and Cr from
+     * 0 to 2^b-1, where b is the bit depth of the color format.
+     */
+    RANGE_FULL = 1 << RANGE_SHIFT,
+
+    /*
+     * Limited range uses values 16/256*2^b to 235/256*2^b for Y, and
+     * 1/16*2^b to 15/16*2^b for Cb, Cr, R, G and B, where b is the bit depth of
+     * the color format.
+     *
+     * E.g. For 8-bit-depth formats:
+     * Luma (Y) samples should range from 16 to 235, inclusive
+     * Chroma (Cb, Cr) samples should range from 16 to 240, inclusive
+     *
+     * For 10-bit-depth formats:
+     * Luma (Y) samples should range from 64 to 940, inclusive
+     * Chroma (Cb, Cr) samples should range from 64 to 960, inclusive
+     */
+    RANGE_LIMITED = 2 << RANGE_SHIFT,
+
+    /*
+     * Legacy dataspaces
+     */
+
+    /*
+     * sRGB linear encoding:
+     *
+     * The red, green, and blue components are stored in sRGB space, but
+     * are linear, not gamma-encoded.
+     * The RGB primaries and the white point are the same as BT.709.
+     *
+     * The values are encoded using the full range ([0,255] for 8-bit) for all
+     * components.
+     */
+    SRGB_LINEAR = 0x200, // deprecated, use V0_SRGB_LINEAR
+
+    V0_SRGB_LINEAR = STANDARD_BT709 | TRANSFER_LINEAR | RANGE_FULL,
+
+
+    /*
+     * sRGB gamma encoding:
+     *
+     * The red, green and blue components are stored in sRGB space, and
+     * converted to linear space when read, using the SRGB transfer function
+     * for each of the R, G and B components. When written, the inverse
+     * transformation is performed.
+     *
+     * The alpha component, if present, is always stored in linear space and
+     * is left unmodified when read or written.
+     *
+     * Use full range and BT.709 standard.
+     */
+    SRGB = 0x201, // deprecated, use V0_SRGB
+
+    V0_SRGB = STANDARD_BT709 | TRANSFER_SRGB | RANGE_FULL,
+
+
+    /*
+     * YCbCr Colorspaces
+     * -----------------
+     *
+     * Primaries are given using (x,y) coordinates in the CIE 1931 definition
+     * of x and y specified by ISO 11664-1.
+     *
+     * Transfer characteristics are the opto-electronic transfer characteristic
+     * at the source as a function of linear optical intensity (luminance).
+     */
+
+    /*
+     * JPEG File Interchange Format (JFIF)
+     *
+     * Same model as BT.601-625, but all values (Y, Cb, Cr) range from 0 to 255
+     *
+     * Use full range, BT.601 transfer and BT.601_625 standard.
+     */
+    JFIF = 0x101, // deprecated, use V0_JFIF
+
+    V0_JFIF = STANDARD_BT601_625 | TRANSFER_SMPTE_170M | RANGE_FULL,
+
+    /*
+     * ITU-R Recommendation 601 (BT.601) - 625-line
+     *
+     * Standard-definition television, 625 Lines (PAL)
+     *
+     * Use limited range, BT.601 transfer and BT.601_625 standard.
+     */
+    BT601_625 = 0x102, // deprecated, use V0_BT601_625
+
+    V0_BT601_625 = STANDARD_BT601_625 | TRANSFER_SMPTE_170M | RANGE_LIMITED,
+
+
+    /*
+     * ITU-R Recommendation 601 (BT.601) - 525-line
+     *
+     * Standard-definition television, 525 Lines (NTSC)
+     *
+     * Use limited range, BT.601 transfer and BT.601_525 standard.
+     */
+    BT601_525 = 0x103, // deprecated, use V0_BT601_525
+
+    V0_BT601_525 = STANDARD_BT601_525 | TRANSFER_SMPTE_170M | RANGE_LIMITED,
+
+    /*
+     * ITU-R Recommendation 709 (BT.709)
+     *
+     * High-definition television
+     *
+     * Use limited range, BT.709 transfer and BT.709 standard.
+     */
+    BT709 = 0x104, // deprecated, use V0_BT709
+
+    V0_BT709 = STANDARD_BT709 | TRANSFER_SMPTE_170M | RANGE_LIMITED,
+
+    /*
+     * Data spaces for non-color formats
+     */
+
+    /*
+     * The buffer contains depth ranging measurements from a depth camera.
+     * This value is valid with formats:
+     *    HAL_PIXEL_FORMAT_Y16: 16-bit samples, consisting of a depth measurement
+     *       and an associated confidence value. The 3 MSBs of the sample make
+     *       up the confidence value, and the low 13 LSBs of the sample make up
+     *       the depth measurement.
+     *       For the confidence section, 0 means 100% confidence, 1 means 0%
+     *       confidence. The mapping to a linear float confidence value between
+     *       0.f and 1.f can be obtained with
+     *         float confidence = (((depthSample >> 13) - 1) & 0x7) / 7.0f;
+     *       The depth measurement can be extracted simply with
+     *         uint16_t range = (depthSample & 0x1FFF);
+     *    HAL_PIXEL_FORMAT_BLOB: A depth point cloud, as
+     *       a variable-length float (x,y,z, confidence) coordinate point list.
+     *       The point cloud will be represented with the android_depth_points
+     *       structure.
+     */
+    DEPTH = 0x1000
+};
+
+/*
+ * Color modes that may be supported by a display.
+ *
+ * Definitions:
+ * Rendering intent generally defines the goal in mapping a source (input)
+ * color to a destination device color for a given color mode.
+ *
+ *  It is important to keep in mind three cases where mapping may be applied:
+ *  1. The source gamut is much smaller than the destination (display) gamut
+ *  2. The source gamut is much larger than the destination gamut (this will
+ *  ordinarily be handled using colorimetric rendering, below)
+ *  3. The source and destination gamuts are roughly equal, although not
+ *  completely overlapping
+ *  Also, a common requirement for mappings is that skin tones should be
+ *  preserved, or at least remain natural in appearance.
+ *
+ *  Colorimetric Rendering Intent (All cases):
+ *  Colorimetric indicates that colors should be preserved. In the case
+ *  that the source gamut lies wholly within the destination gamut or is
+ *  about the same (#1, #3), this will simply mean that no manipulations
+ *  (no saturation boost, for example) are applied. In the case where some
+ *  source colors lie outside the destination gamut (#2, #3), those will
+ *  need to be mapped to colors that are within the destination gamut,
+ *  while the already in-gamut colors remain unchanged.
+ *
+ *  Non-colorimetric transforms can take many forms. There are no hard
+ *  rules and it's left to the implementation to define.
+ *  Two common intents are described below.
+ *
+ *  Stretched-Gamut Enhancement Intent (Source < Destination):
+ *  When the destination gamut is much larger than the source gamut (#1), the
+ *  source primaries may be redefined to reflect the full extent of the
+ *  destination space, or to reflect an intermediate gamut.
+ *  Skin-tone preservation would likely be applied. An example might be sRGB
+ *  input displayed on a DCI-P3 capable device, with skin-tone preservation.
+ *
+ *  Within-Gamut Enhancement Intent (Source >= Destination):
+ *  When the device (destination) gamut is not larger than the source gamut
+ *  (#2 or #3), but the appearance of a larger gamut is desired, techniques
+ *  such as saturation boost may be applied to the source colors. Skin-tone
+ *  preservation may be applied. There is no unique method for within-gamut
+ *  enhancement; it would be defined within a flexible color mode.
+ *
+ */
+@export(name="android_color_mode_t", value_prefix="HAL_COLOR_MODE_")
+enum ColorMode : int32_t {
+  /*
+   * DEFAULT is the "native" gamut of the display.
+   * White Point: Vendor/OEM defined
+   * Panel Gamma: Vendor/OEM defined (typically 2.2)
+   * Rendering Intent: Vendor/OEM defined (typically 'enhanced')
+   */
+  NATIVE = 0,
+
+  /*
+   * STANDARD_BT601_625 corresponds with display
+   * settings that implement the ITU-R Recommendation BT.601
+   * or Rec 601. Using 625 line version
+   * Rendering Intent: Colorimetric
+   * Primaries:
+   *                  x       y
+   *  green           0.290   0.600
+   *  blue            0.150   0.060
+   *  red             0.640   0.330
+   *  white (D65)     0.3127  0.3290
+   *
+   *  KR = 0.299, KB = 0.114. This adjusts the luminance interpretation
+   *  for RGB conversion from the one purely determined by the primaries
+   *  to minimize the color shift into RGB space that uses BT.709
+   *  primaries.
+   *
+   * Gamma Correction (GC):
+   *
+   *  if Vlinear < 0.018
+   *    Vnonlinear = 4.500 * Vlinear
+   *  else
+   *    Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099
+   */
+  STANDARD_BT601_625 = 1,
+
+  /*
+   * Primaries:
+   *                  x       y
+   *  green           0.290   0.600
+   *  blue            0.150   0.060
+   *  red             0.640   0.330
+   *  white (D65)     0.3127  0.3290
+   *
+   *  Use the unadjusted KR = 0.222, KB = 0.071 luminance interpretation
+   *  for RGB conversion.
+   *
+   * Gamma Correction (GC):
+   *
+   *  if Vlinear < 0.018
+   *    Vnonlinear = 4.500 * Vlinear
+   *  else
+   *    Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099
+   */
+  STANDARD_BT601_625_UNADJUSTED = 2,
+
+  /*
+   * Primaries:
+   *                  x       y
+   *  green           0.310   0.595
+   *  blue            0.155   0.070
+   *  red             0.630   0.340
+   *  white (D65)     0.3127  0.3290
+   *
+   *  KR = 0.299, KB = 0.114. This adjusts the luminance interpretation
+   *  for RGB conversion from the one purely determined by the primaries
+   *  to minimize the color shift into RGB space that uses BT.709
+   *  primaries.
+   *
+   * Gamma Correction (GC):
+   *
+   *  if Vlinear < 0.018
+   *    Vnonlinear = 4.500 * Vlinear
+   *  else
+   *    Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099
+   */
+  STANDARD_BT601_525 = 3,
+
+  /*
+   * Primaries:
+   *                  x       y
+   *  green           0.310   0.595
+   *  blue            0.155   0.070
+   *  red             0.630   0.340
+   *  white (D65)     0.3127  0.3290
+   *
+   *  Use the unadjusted KR = 0.212, KB = 0.087 luminance interpretation
+   *  for RGB conversion (as in SMPTE 240M).
+   *
+   * Gamma Correction (GC):
+   *
+   *  if Vlinear < 0.018
+   *    Vnonlinear = 4.500 * Vlinear
+   *  else
+   *    Vnonlinear = 1.099 * (Vlinear)^(0.45) – 0.099
+   */
+  STANDARD_BT601_525_UNADJUSTED = 4,
+
+  /*
+   * REC709 corresponds with display settings that implement
+   * the ITU-R Recommendation BT.709 / Rec. 709 for high-definition television.
+   * Rendering Intent: Colorimetric
+   * Primaries:
+   *                  x       y
+   *  green           0.300   0.600
+   *  blue            0.150   0.060
+   *  red             0.640   0.330
+   *  white (D65)     0.3127  0.3290
+   *
+   * HDTV REC709 Inverse Gamma Correction (IGC): V represents normalized
+   * (with [0 to 1] range) value of R, G, or B.
+   *
+   *  if Vnonlinear < 0.081
+   *    Vlinear = Vnonlinear / 4.5
+   *  else
+   *    Vlinear = ((Vnonlinear + 0.099) / 1.099) ^ (1/0.45)
+   *
+   * HDTV REC709 Gamma Correction (GC):
+   *
+   *  if Vlinear < 0.018
+   *    Vnonlinear = 4.5 * Vlinear
+   *  else
+   *    Vnonlinear = 1.099 * (Vlinear) ^ 0.45 – 0.099
+   */
+  STANDARD_BT709 = 5,
+
+  /*
+   * DCI_P3 corresponds with display settings that implement
+   * SMPTE EG 432-1 and SMPTE RP 431-2
+   * Rendering Intent: Colorimetric
+   * Primaries:
+   *                  x       y
+   *  green           0.265   0.690
+   *  blue            0.150   0.060
+   *  red             0.680   0.320
+   *  white (D65)     0.3127  0.3290
+   *
+   * Gamma: 2.2
+   */
+  DCI_P3 = 6,
+
+  /*
+   * SRGB corresponds with display settings that implement
+   * the sRGB color space. Uses the same primaries as ITU-R Recommendation
+   * BT.709
+   * Rendering Intent: Colorimetric
+   * Primaries:
+   *                  x       y
+   *  green           0.300   0.600
+   *  blue            0.150   0.060
+   *  red             0.640   0.330
+   *  white (D65)     0.3127  0.3290
+   *
+   * PC/Internet (sRGB) Inverse Gamma Correction (IGC):
+   *
+   *  if Vnonlinear ≤ 0.03928
+   *    Vlinear = Vnonlinear / 12.92
+   *  else
+   *    Vlinear = ((Vnonlinear + 0.055)/1.055) ^ 2.4
+   *
+   * PC/Internet (sRGB) Gamma Correction (GC):
+   *
+   *  if Vlinear ≤ 0.0031308
+   *    Vnonlinear = 12.92 * Vlinear
+   *  else
+   *    Vnonlinear = 1.055 * (Vlinear)^(1/2.4) – 0.055
+   */
+  SRGB = 7,
+
+  /*
+   * ADOBE_RGB corresponds with the RGB color space developed
+   * by Adobe Systems, Inc. in 1998.
+   * Rendering Intent: Colorimetric
+   * Primaries:
+   *                  x       y
+   *  green           0.210   0.710
+   *  blue            0.150   0.060
+   *  red             0.640   0.330
+   *  white (D65)     0.3127  0.3290
+   *
+   * Gamma: 2.2
+   */
+  ADOBE_RGB = 8
+};
+
+/*
+ * Color transforms that may be applied by hardware composer to the whole
+ * display.
+ */
+@export(name="android_color_transform_t", value_prefix="HAL_COLOR_TRANSFORM_")
+enum ColorTransform : int32_t {
+    /* Applies no transform to the output color */
+    IDENTITY = 0,
+
+    /* Applies an arbitrary transform defined by a 4x4 affine matrix */
+    ARBITRARY_MATRIX = 1,
+
+    /* Applies a transform that inverts the value or luminance of the color, but
+     * does not modify hue or saturation */
+    VALUE_INVERSE = 2,
+
+    /* Applies a transform that maps all colors to shades of gray */
+    GRAYSCALE = 3,
+
+    /* Applies a transform which corrects for protanopic color blindness */
+    CORRECT_PROTANOPIA = 4,
+
+    /* Applies a transform which corrects for deuteranopic color blindness */
+    CORRECT_DEUTERANOPIA = 5,
+
+    /* Applies a transform which corrects for tritanopic color blindness */
+    CORRECT_TRITANOPIA = 6
+};
+
+/*
+ * Supported HDR formats. Must be kept in sync with equivalents in Display.java.
+ */
+@export(name="android_hdr_t", value_prefix="HAL_HDR_")
+enum Hdr : int32_t {
+    /* Device supports Dolby Vision HDR */
+    DOLBY_VISION = 1,
+
+    /* Device supports HDR10 */
+    HDR10 = 2,
+
+    /* Device supports hybrid log-gamma HDR */
+    HLG = 3
+};
diff --git a/graphics/composer/2.1/Android.bp b/graphics/composer/2.1/Android.bp
index 094d09e..bc948e8 100644
--- a/graphics/composer/2.1/Android.bp
+++ b/graphics/composer/2.1/Android.bp
@@ -52,9 +52,9 @@
         "libcutils",
         "android.hardware.graphics.allocator@2.0",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/light/2.0/Android.bp b/light/2.0/Android.bp
index 33b4af2..ff2414c 100644
--- a/light/2.0/Android.bp
+++ b/light/2.0/Android.bp
@@ -43,9 +43,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/light/2.0/default/android.hardware.light@2.0-service.rc b/light/2.0/default/android.hardware.light@2.0-service.rc
index 4228d95..3ba97d8 100644
--- a/light/2.0/default/android.hardware.light@2.0-service.rc
+++ b/light/2.0/default/android.hardware.light@2.0-service.rc
@@ -1,4 +1,4 @@
 service light-hal-2-0 /system/bin/hw/android.hardware.light@2.0-service
     class hal
     user system
-    group system readproc
\ No newline at end of file
+    group system
\ No newline at end of file
diff --git a/memtrack/1.0/Android.bp b/memtrack/1.0/Android.bp
index 996dbb6..4b6864c 100644
--- a/memtrack/1.0/Android.bp
+++ b/memtrack/1.0/Android.bp
@@ -43,9 +43,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/memtrack/1.0/default/Android.bp b/memtrack/1.0/default/Android.bp
index c6ab6b9..50d2318 100644
--- a/memtrack/1.0/default/Android.bp
+++ b/memtrack/1.0/default/Android.bp
@@ -32,6 +32,7 @@
 cc_binary {
     relative_install_path: "hw",
     name: "android.hardware.memtrack@1.0-service",
+    init_rc: ["android.hardware.memtrack@1.0-service.rc"],
     srcs: ["service.cpp"],
 
     shared_libs: [
diff --git a/memtrack/1.0/default/android.hardware.memtrack@1.0-service.rc b/memtrack/1.0/default/android.hardware.memtrack@1.0-service.rc
new file mode 100644
index 0000000..14e7d00
--- /dev/null
+++ b/memtrack/1.0/default/android.hardware.memtrack@1.0-service.rc
@@ -0,0 +1,4 @@
+service memtrack-hal-1-0 /system/bin/hw/android.hardware.memtrack@1.0-service
+    class hal
+    user system
+    group system
diff --git a/nfc/1.0/vts/NfcClientCallback.vts b/nfc/1.0/vts/NfcClientCallback.vts
index e2a3e5b..e39ea7c 100644
--- a/nfc/1.0/vts/NfcClientCallback.vts
+++ b/nfc/1.0/vts/NfcClientCallback.vts
@@ -11,11 +11,11 @@
         name: "sendEvent"
         arg: {
             type: TYPE_ENUM
-            predefined_type: "NfcEvent"
+            predefined_type: "::android::hardware::nfc::V1_0::NfcEvent"
         }
         arg: {
             type: TYPE_ENUM
-            predefined_type: "NfcStatus"
+            predefined_type: "::android::hardware::nfc::V1_0::NfcStatus"
         }
     }
 
diff --git a/nfc/1.0/vts/types.vts b/nfc/1.0/vts/types.vts
index 969a8af..e43db1e 100644
--- a/nfc/1.0/vts/types.vts
+++ b/nfc/1.0/vts/types.vts
@@ -4,8 +4,9 @@
 
 package: "android.hardware.nfc"
 
+
 attribute: {
-    name: "NfcEvent"
+    name: "::android::hardware::nfc::V1_0::NfcEvent"
     type: TYPE_ENUM
     enum_value: {
         scalar_type: "uint32_t"
@@ -42,7 +43,7 @@
 }
 
 attribute: {
-    name: "NfcStatus"
+    name: "::android::hardware::nfc::V1_0::NfcStatus"
     type: TYPE_ENUM
     enum_value: {
         scalar_type: "uint32_t"
diff --git a/power/1.0/Android.bp b/power/1.0/Android.bp
index 4b6d34b..52ec33f 100644
--- a/power/1.0/Android.bp
+++ b/power/1.0/Android.bp
@@ -43,9 +43,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/power/1.0/default/Android.bp b/power/1.0/default/Android.bp
index 4c31c6f..e573186 100644
--- a/power/1.0/default/Android.bp
+++ b/power/1.0/default/Android.bp
@@ -31,6 +31,7 @@
 cc_binary {
     relative_install_path: "hw",
     name: "android.hardware.power@1.0-service",
+    init_rc: ["android.hardware.power@1.0-service.rc"],
     srcs: ["service.cpp"],
 
     shared_libs: [
diff --git a/power/1.0/default/android.hardware.power@1.0-service.rc b/power/1.0/default/android.hardware.power@1.0-service.rc
new file mode 100644
index 0000000..6063541
--- /dev/null
+++ b/power/1.0/default/android.hardware.power@1.0-service.rc
@@ -0,0 +1,4 @@
+service power-hal-1-0 /system/bin/hw/android.hardware.power@1.0-service
+    class hal
+    user system
+    group system
diff --git a/sensors/1.0/Android.bp b/sensors/1.0/Android.bp
index 5b1fd05..13e9bee 100644
--- a/sensors/1.0/Android.bp
+++ b/sensors/1.0/Android.bp
@@ -43,9 +43,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/soundtrigger/2.0/Android.bp b/soundtrigger/2.0/Android.bp
index a7a42a0..cda8c22 100644
--- a/soundtrigger/2.0/Android.bp
+++ b/soundtrigger/2.0/Android.bp
@@ -52,9 +52,9 @@
         "libcutils",
         "android.hardware.audio.common@2.0",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/tests/baz/1.0/IBaz.hal b/tests/baz/1.0/IBaz.hal
index 4cb9689..c8fe2b6 100644
--- a/tests/baz/1.0/IBaz.hal
+++ b/tests/baz/1.0/IBaz.hal
@@ -34,6 +34,12 @@
         blah = goober
     };
 
+    typedef int32_t[3] ThreeInts;
+    struct T {
+        ThreeInts[5]  matrix5x3;
+        int32_t[3][5] matrix3x5;
+    };
+
     @Fragile @NoReally(very="yes", array={"a","b","c"})
     oneway doThis(float param);
 
diff --git a/tests/inheritance/1.0/default/Fetcher.cpp b/tests/inheritance/1.0/default/Fetcher.cpp
index 28dffaa..74f8d07 100644
--- a/tests/inheritance/1.0/default/Fetcher.cpp
+++ b/tests/inheritance/1.0/default/Fetcher.cpp
@@ -23,7 +23,7 @@
     if (sendRemote) {
         toSend = IChild::getService("child");
         if (!toSend->isRemote()) {
-            return Status::fromExceptionCode(Status::EX_ILLEGAL_STATE);
+            toSend = nullptr;
         }
     } else {
         toSend = local;
diff --git a/tests/pointer/1.0/default/Pointer.h b/tests/pointer/1.0/default/Pointer.h
index 1579aea..41d96fd 100644
--- a/tests/pointer/1.0/default/Pointer.h
+++ b/tests/pointer/1.0/default/Pointer.h
@@ -156,20 +156,20 @@
     Return<void> foo20(const hidl_vec<IPointer::Sam const*>&) override {
         return Void();
     }
-    Return<void> foo21(hidl_array<IPointer::Ada, 3, 2, 1> const* a_array_ptr) override {
-        const hidl_array<IPointer::Ada, 3, 2, 1>& a_array = *a_array_ptr;
+    Return<void> foo21(hidl_array<IPointer::Ada, 1, 2, 3> const* a_array_ptr) override {
+        const hidl_array<IPointer::Ada, 1, 2, 3>& a_array = *a_array_ptr;
         PUSH_ERROR_IF(a_array[0][0][0].s_ptr->data != 500);
-        for(size_t i = 0; i < 3; i++)
+        for(size_t i = 0; i < 1; i++)
             for(size_t j = 0; j < 2; j++)
-                for(size_t k = 0; k < 1; k++)
+                for(size_t k = 0; k < 3; k++)
                     PUSH_ERROR_IF(a_array[i][j][k].s_ptr != a_array[0][0][0].s_ptr);
         return Void();
     }
-    Return<void> foo22(const hidl_array<IPointer::Ada const*, 3, 2, 1>& a_ptr_array) override {
+    Return<void> foo22(const hidl_array<IPointer::Ada const*, 1, 2, 3>& a_ptr_array) override {
         PUSH_ERROR_IF(a_ptr_array[0][0][0]->s_ptr->data != 500);
-        for(size_t i = 0; i < 3; i++)
+        for(size_t i = 0; i < 1; i++)
             for(size_t j = 0; j < 2; j++)
-                for(size_t k = 0; k < 1; k++)
+                for(size_t k = 0; k < 3; k++)
                     PUSH_ERROR_IF(a_ptr_array[i][j][k] != a_ptr_array[0][0][0]);
         return Void();
     }
@@ -315,19 +315,19 @@
         return Void();
     }
     Return<void> bar21(bar21_cb _cb) override {
-        hidl_array<IPointer::Ada, 3, 2, 1> a_array;
-        for(size_t i = 0; i < 3; i++)
+        hidl_array<IPointer::Ada, 1, 2, 3> a_array;
+        for(size_t i = 0; i < 1; i++)
             for(size_t j = 0; j < 2; j++)
-                for(size_t k = 0; k < 1; k++)
+                for(size_t k = 0; k < 3; k++)
                     a_array[i][j][k] = *a;
         _cb(&a_array);
         return Void();
     }
     Return<void> bar22(bar22_cb _cb) override {
-        hidl_array<const IPointer::Ada *, 3, 2, 1> a_ptr_array;
-        for(size_t i = 0; i < 3; i++)
+        hidl_array<const IPointer::Ada *, 1, 2, 3> a_ptr_array;
+        for(size_t i = 0; i < 1; i++)
             for(size_t j = 0; j < 2; j++)
-                for(size_t k = 0; k < 1; k++)
+                for(size_t k = 0; k < 3; k++)
                     a_ptr_array[i][j][k] = a;
         _cb(a_ptr_array);
         return Void();
diff --git a/thermal/1.0/Android.bp b/thermal/1.0/Android.bp
index ae64dde..76a38a0 100644
--- a/thermal/1.0/Android.bp
+++ b/thermal/1.0/Android.bp
@@ -43,9 +43,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/tv/Android.bp b/tv/Android.bp
index 095839f..5ad82f4 100644
--- a/tv/Android.bp
+++ b/tv/Android.bp
@@ -1,4 +1,5 @@
 // This is an autogenerated file, do not edit.
 subdirs = [
+    "cec/1.0",
     "input/1.0",
 ]
diff --git a/tv/cec/1.0/Android.bp b/tv/cec/1.0/Android.bp
new file mode 100644
index 0000000..4fd1b7e
--- /dev/null
+++ b/tv/cec/1.0/Android.bp
@@ -0,0 +1,59 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+genrule {
+    name: "android.hardware.tv.cec@1.0_genc++",
+    tool: "hidl-gen",
+    cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tv.cec@1.0",
+    srcs: [
+        "types.hal",
+        "IHdmiCec.hal",
+        "IHdmiCecCallback.hal",
+    ],
+    out: [
+        "android/hardware/tv/cec/1.0/types.cpp",
+        "android/hardware/tv/cec/1.0/HdmiCecAll.cpp",
+        "android/hardware/tv/cec/1.0/HdmiCecCallbackAll.cpp",
+    ],
+}
+
+genrule {
+    name: "android.hardware.tv.cec@1.0_genc++_headers",
+    tool: "hidl-gen",
+    cmd: "$tool -o $genDir -Lc++ -randroid.hardware:hardware/interfaces android.hardware.tv.cec@1.0",
+    srcs: [
+        "types.hal",
+        "IHdmiCec.hal",
+        "IHdmiCecCallback.hal",
+    ],
+    out: [
+        "android/hardware/tv/cec/1.0/types.h",
+        "android/hardware/tv/cec/1.0/IHdmiCec.h",
+        "android/hardware/tv/cec/1.0/IHwHdmiCec.h",
+        "android/hardware/tv/cec/1.0/BnHdmiCec.h",
+        "android/hardware/tv/cec/1.0/BpHdmiCec.h",
+        "android/hardware/tv/cec/1.0/BsHdmiCec.h",
+        "android/hardware/tv/cec/1.0/IHdmiCecCallback.h",
+        "android/hardware/tv/cec/1.0/IHwHdmiCecCallback.h",
+        "android/hardware/tv/cec/1.0/BnHdmiCecCallback.h",
+        "android/hardware/tv/cec/1.0/BpHdmiCecCallback.h",
+        "android/hardware/tv/cec/1.0/BsHdmiCecCallback.h",
+    ],
+}
+
+cc_library_shared {
+    name: "android.hardware.tv.cec@1.0",
+    generated_sources: ["android.hardware.tv.cec@1.0_genc++"],
+    generated_headers: ["android.hardware.tv.cec@1.0_genc++_headers"],
+    export_generated_headers: ["android.hardware.tv.cec@1.0_genc++_headers"],
+    shared_libs: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
+        "libcutils",
+    ],
+export_shared_lib_headers: [
+    "libhidl",
+    "libhwbinder",
+    "libutils",
+    ],
+}
diff --git a/tv/cec/1.0/Android.mk b/tv/cec/1.0/Android.mk
new file mode 100644
index 0000000..8cc9c47
--- /dev/null
+++ b/tv/cec/1.0/Android.mk
@@ -0,0 +1,484 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tv.cec@1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+#
+# Build types.hal (AbortReason)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/AbortReason.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.AbortReason
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecDeviceType)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/CecDeviceType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.CecDeviceType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecLogicalAddress)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/CecLogicalAddress.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.CecLogicalAddress
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecMessage)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/CecMessage.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.CecMessage
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecMessageType)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/CecMessageType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.CecMessageType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HdmiPortInfo)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/HdmiPortInfo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.HdmiPortInfo
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HdmiPortType)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/HdmiPortType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.HdmiPortType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HotplugEvent)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/HotplugEvent.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.HotplugEvent
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (OptionKey)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/OptionKey.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.OptionKey
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Result)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/Result.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.Result
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (SendMessageResult)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/SendMessageResult.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.SendMessageResult
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IHdmiCec.hal
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/IHdmiCec.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IHdmiCec.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IHdmiCecCallback.hal
+$(GEN): $(LOCAL_PATH)/IHdmiCecCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::IHdmiCec
+
+$(GEN): $(LOCAL_PATH)/IHdmiCec.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IHdmiCecCallback.hal
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/IHdmiCecCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IHdmiCecCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::IHdmiCecCallback
+
+$(GEN): $(LOCAL_PATH)/IHdmiCecCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tv.cec@1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(local-generated-sources-dir)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+#
+# Build types.hal (AbortReason)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/AbortReason.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.AbortReason
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecDeviceType)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/CecDeviceType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.CecDeviceType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecLogicalAddress)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/CecLogicalAddress.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.CecLogicalAddress
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecMessage)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/CecMessage.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.CecMessage
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (CecMessageType)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/CecMessageType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.CecMessageType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HdmiPortInfo)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/HdmiPortInfo.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.HdmiPortInfo
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HdmiPortType)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/HdmiPortType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.HdmiPortType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (HotplugEvent)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/HotplugEvent.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.HotplugEvent
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (OptionKey)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/OptionKey.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.OptionKey
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (Result)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/Result.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.Result
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build types.hal (SendMessageResult)
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/SendMessageResult.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::types.SendMessageResult
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IHdmiCec.hal
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/IHdmiCec.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IHdmiCec.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IHdmiCecCallback.hal
+$(GEN): $(LOCAL_PATH)/IHdmiCecCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::IHdmiCec
+
+$(GEN): $(LOCAL_PATH)/IHdmiCec.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IHdmiCecCallback.hal
+#
+GEN := $(intermediates)/android/hardware/tv/cec/1.0/IHdmiCecCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IHdmiCecCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.tv.cec@1.0::IHdmiCecCallback
+
+$(GEN): $(LOCAL_PATH)/IHdmiCecCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/tv/cec/1.0/IHdmiCec.hal b/tv/cec/1.0/IHdmiCec.hal
new file mode 100644
index 0000000..e8db265
--- /dev/null
+++ b/tv/cec/1.0/IHdmiCec.hal
@@ -0,0 +1,166 @@
+/*
+ * Copyright (C) 2016 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.tv.cec@1.0;
+
+import IHdmiCecCallback;
+
+/*
+ * HDMI-CEC HAL interface definition.
+ */
+interface IHdmiCec {
+    /*
+     * Passes the logical address that must be used in this system.
+     *
+     * HAL must use it to configure the hardware so that the CEC commands
+     * addressed the given logical address can be filtered in. This method must
+     * be able to be called as many times as necessary in order to support
+     * multiple logical devices.
+     *
+     * @param addr Logical address that must be used in this system. It must be
+     *        in the range of valid logical addresses for the call to succeed.
+     * @return result Result status of the operation. SUCCESS if successful,
+     *         FAILURE_INVALID_ARGS if the given logical address is invalid,
+     *         FAILURE_BUSY if device or resource is busy
+     */
+    @callflow(next={"*"})
+    addLogicalAddress(CecLogicalAddress addr) generates (Result result);
+
+    /*
+     * Clears all the logical addresses.
+     *
+     * It is used when the system doesn't need to process CEC command any more,
+     * hence to tell HAL to stop receiving commands from the CEC bus, and change
+     * the state back to the beginning.
+     */
+    @callflow(next="addLogicalAddress")
+    @exit
+    clearLogicalAddress();
+
+    /*
+     * Gets the CEC physical address.
+     *
+     * The physical address depends on the topology of the network formed by
+     * connected HDMI devices. It is therefore likely to change if the cable is
+     * plugged off and on again. It is advised to call getPhysicalAddress to get
+     * the updated address when hot plug event takes place.
+     *
+     * @return result Result status of the operation. SUCCESS if successful,
+     *         FAILURE_INVALID_STATE if HAL cannot retrieve the physical
+     *         address.
+     * @return addr Physical address of this device.
+     */
+    @callflow(next="*")
+    getPhysicalAddress() generates (Result result, uint16_t addr);
+
+    /*
+     * Transmits HDMI-CEC message to other HDMI device.
+     *
+     * The method must be designed to return in a certain amount of time and not
+     * hanging forever which may happen if CEC signal line is pulled low for
+     * some reason.
+     *
+     * It must try retransmission at least once as specified in the section '7.1
+     * Frame Re-transmissions' of the CEC Spec 1.4b.
+     *
+     * @param message CEC message to be sent to other HDMI device.
+     * @return result Result status of the operation. SUCCESS if successful,
+     *         NACK if the sent message is not acknowledged,
+     *         BUSY if the CEC bus is busy.
+     */
+    @callflow(next="*")
+    sendMessage(CecMessage message) generates (SendMessageResult result);
+
+    /*
+     * Sets a callback that HDMI-CEC HAL must later use for incoming CEC
+     * messages or internal HDMI events.
+     *
+     * @param callback Callback object to pass hdmi events to the system. The
+     *        previously registered callback must be replaced with this one.
+     */
+    @callflow(next={"addLogicalAddress"})
+    @entry
+    setCallback(IHdmiCecCallback callback);
+
+    /*
+     * Returns the CEC version supported by underlying hardware.
+     *
+     * @return version the CEC version supported by underlying hardware.
+     */
+    @callflow(next={"*"})
+    getCecVersion() generates (int32_t version);
+
+    /*
+     * Gets the identifier of the vendor.
+     *
+     * @return vendorId Identifier of the vendor that is the 24-bit unique
+     *         company ID obtained from the IEEE Registration Authority
+     *         Committee (RAC). The upper 8 bits must be 0.
+     */
+    @callflow(next={"*"})
+    getVendorId() generates (uint32_t vendorId);
+
+    /*
+     * Gets the hdmi port information of underlying hardware.
+     *
+     * @return infos The list of HDMI port information
+     */
+    @callflow(next={"*"})
+    getPortInfo() generates (vec<HdmiPortInfo> infos);
+
+    /*
+     * Sets flags controlling the way HDMI-CEC service works down to HAL
+     * implementation. Those flags must be used in case the feature needs update
+     * in HAL itself, firmware or microcontroller.
+     *
+     * @param key The key of the option to be updated with a new value.
+     * @param value Value to be set.
+     */
+    @callflow(next="*")
+    setOption(OptionKey key, bool value);
+
+    /*
+     * Passes the updated language information of Android system. Contains
+     * three-letter code as defined in ISO/FDIS 639-2. Must be used for HAL to
+     * respond to <Get Menu Language> while in standby mode.
+     *
+     * @param language Three-letter code defined in ISO/FDIS 639-2. Must be
+     *        lowercase letters. (e.g., eng for English)
+     */
+    @callflow(next="*")
+    setLanguage(string language);
+
+    /*
+     * Configures ARC circuit in the hardware logic to start or stop the
+     * feature.
+     *
+     * @param portId Port id to be configured.
+     * @param enable Flag must be either true to start the feature or false to
+     *        stop it.
+     */
+    @callflow(next="*")
+    enableAudioReturnChannel(int32_t portId, bool enable);
+
+    /*
+     * Gets the connection status of the specified port.
+     *
+     * @param portId Port id to be inspected for the connection status.
+     * @return status True if a device is connected, otherwise false. The HAL
+     *         must watch for +5V power signal to determine the status.
+     */
+    @callflow(next="*")
+    isConnected(int32_t portId) generates (bool status);
+};
diff --git a/tv/cec/1.0/IHdmiCecCallback.hal b/tv/cec/1.0/IHdmiCecCallback.hal
new file mode 100644
index 0000000..4a9d28f
--- /dev/null
+++ b/tv/cec/1.0/IHdmiCecCallback.hal
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2016 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.tv.cec@1.0;
+
+interface IHdmiCecCallback {
+    /*
+     * The callback function that must be called by HAL implementation to notify
+     * the system of new CEC message arrival.
+     */
+    oneway onCecMessage(CecMessage message);
+
+    /*
+     * The callback function that must be called by HAL implementation to notify
+     * the system of new hotplug event.
+     */
+    oneway onHotplugEvent(HotplugEvent event);
+};
diff --git a/tv/cec/1.0/default/Android.mk b/tv/cec/1.0/default/Android.mk
new file mode 100644
index 0000000..3971f6c
--- /dev/null
+++ b/tv/cec/1.0/default/Android.mk
@@ -0,0 +1,42 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.tv.cec@1.0-impl
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_SRC_FILES := \
+    HdmiCec.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+    libhidl \
+    libhwbinder \
+    liblog \
+    libbase \
+    libutils \
+    libhardware \
+    android.hardware.tv.cec@1.0 \
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+include $(CLEAR_VARS)
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_MODULE := android.hardware.tv.cec@1.0-service
+LOCAL_INIT_RC := android.hardware.tv.cec@1.0-service.rc
+LOCAL_SRC_FILES := \
+    service.cpp \
+
+LOCAL_SHARED_LIBRARIES := \
+    liblog \
+    libcutils \
+    libdl \
+    libbase \
+    libutils \
+    libhardware_legacy \
+    libhardware \
+
+LOCAL_SHARED_LIBRARIES += \
+    libhwbinder \
+    libhidl \
+    android.hardware.tv.cec@1.0 \
+
+include $(BUILD_EXECUTABLE)
diff --git a/tv/cec/1.0/default/HdmiCec.cpp b/tv/cec/1.0/default/HdmiCec.cpp
new file mode 100644
index 0000000..c4bae41
--- /dev/null
+++ b/tv/cec/1.0/default/HdmiCec.cpp
@@ -0,0 +1,415 @@
+/*
+ * Copyright (C) 2016 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 "android.hardware.tv.cec@1.0-impl"
+#include <android-base/logging.h>
+
+#include <hardware/hardware.h>
+#include <hardware/hdmi_cec.h>
+#include "HdmiCec.h"
+
+namespace android {
+namespace hardware {
+namespace tv {
+namespace cec {
+namespace V1_0 {
+namespace implementation {
+
+static_assert(CEC_DEVICE_INACTIVE == static_cast<int>(CecDeviceType::INACTIVE),
+        "CecDeviceType::INACTIVE must match legacy value.");
+static_assert(CEC_DEVICE_TV == static_cast<int>(CecDeviceType::TV),
+        "CecDeviceType::TV must match legacy value.");
+static_assert(CEC_DEVICE_RECORDER == static_cast<int>(CecDeviceType::RECORDER),
+        "CecDeviceType::RECORDER must match legacy value.");
+static_assert(CEC_DEVICE_TUNER == static_cast<int>(CecDeviceType::TUNER),
+        "CecDeviceType::TUNER must match legacy value.");
+static_assert(CEC_DEVICE_PLAYBACK == static_cast<int>(CecDeviceType::PLAYBACK),
+        "CecDeviceType::PLAYBACK must match legacy value.");
+static_assert(CEC_DEVICE_AUDIO_SYSTEM == static_cast<int>(CecDeviceType::AUDIO_SYSTEM),
+        "CecDeviceType::AUDIO_SYSTEM must match legacy value.");
+static_assert(CEC_DEVICE_MAX == static_cast<int>(CecDeviceType::MAX),
+        "CecDeviceType::MAX must match legacy value.");
+
+static_assert(CEC_ADDR_TV == static_cast<int>(CecLogicalAddress::TV),
+        "CecLogicalAddress::TV must match legacy value.");
+static_assert(CEC_ADDR_RECORDER_1 == static_cast<int>(CecLogicalAddress::RECORDER_1),
+        "CecLogicalAddress::RECORDER_1 must match legacy value.");
+static_assert(CEC_ADDR_RECORDER_2 == static_cast<int>(CecLogicalAddress::RECORDER_2),
+        "CecLogicalAddress::RECORDER_2 must match legacy value.");
+static_assert(CEC_ADDR_TUNER_1 == static_cast<int>(CecLogicalAddress::TUNER_1),
+        "CecLogicalAddress::TUNER_1 must match legacy value.");
+static_assert(CEC_ADDR_PLAYBACK_1 == static_cast<int>(CecLogicalAddress::PLAYBACK_1),
+        "CecLogicalAddress::PLAYBACK_1 must match legacy value.");
+static_assert(CEC_ADDR_AUDIO_SYSTEM == static_cast<int>(CecLogicalAddress::AUDIO_SYSTEM),
+        "CecLogicalAddress::AUDIO_SYSTEM must match legacy value.");
+static_assert(CEC_ADDR_TUNER_2 == static_cast<int>(CecLogicalAddress::TUNER_2),
+        "CecLogicalAddress::TUNER_2 must match legacy value.");
+static_assert(CEC_ADDR_TUNER_3 == static_cast<int>(CecLogicalAddress::TUNER_3),
+        "CecLogicalAddress::TUNER_3 must match legacy value.");
+static_assert(CEC_ADDR_PLAYBACK_2 == static_cast<int>(CecLogicalAddress::PLAYBACK_2),
+        "CecLogicalAddress::PLAYBACK_2 must match legacy value.");
+static_assert(CEC_ADDR_RECORDER_3 == static_cast<int>(CecLogicalAddress::RECORDER_3),
+        "CecLogicalAddress::RECORDER_3 must match legacy value.");
+static_assert(CEC_ADDR_TUNER_4 == static_cast<int>(CecLogicalAddress::TUNER_4),
+        "CecLogicalAddress::TUNER_4 must match legacy value.");
+static_assert(CEC_ADDR_PLAYBACK_3 == static_cast<int>(CecLogicalAddress::PLAYBACK_3),
+        "CecLogicalAddress::PLAYBACK_3 must match legacy value.");
+static_assert(CEC_ADDR_FREE_USE == static_cast<int>(CecLogicalAddress::FREE_USE),
+        "CecLogicalAddress::FREE_USE must match legacy value.");
+static_assert(CEC_ADDR_UNREGISTERED == static_cast<int>(CecLogicalAddress::UNREGISTERED),
+        "CecLogicalAddress::UNREGISTERED must match legacy value.");
+static_assert(CEC_ADDR_BROADCAST == static_cast<int>(CecLogicalAddress::BROADCAST),
+        "CecLogicalAddress::BROADCAST must match legacy value.");
+
+static_assert(CEC_MESSAGE_FEATURE_ABORT == static_cast<int>(CecMessageType::FEATURE_ABORT),
+        "CecMessageType::FEATURE_ABORT must match legacy value.");
+static_assert(CEC_MESSAGE_IMAGE_VIEW_ON == static_cast<int>(CecMessageType::IMAGE_VIEW_ON),
+        "CecMessageType::IMAGE_VIEW_ON must match legacy value.");
+static_assert(CEC_MESSAGE_TUNER_STEP_INCREMENT == static_cast<int>(
+        CecMessageType::TUNER_STEP_INCREMENT),
+        "CecMessageType::TUNER_STEP_INCREMENT must match legacy value.");
+static_assert(CEC_MESSAGE_TUNER_STEP_DECREMENT == static_cast<int>(
+        CecMessageType::TUNER_STEP_DECREMENT),
+        "CecMessageType::TUNER_STEP_DECREMENT must match legacy value.");
+static_assert(CEC_MESSAGE_TUNER_DEVICE_STATUS == static_cast<int>(
+        CecMessageType::TUNER_DEVICE_STATUS),
+        "CecMessageType::TUNER_DEVICE_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_TUNER_DEVICE_STATUS == static_cast<int>(
+        CecMessageType::GIVE_TUNER_DEVICE_STATUS),
+        "CecMessageType::GIVE_TUNER_DEVICE_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_RECORD_ON == static_cast<int>(CecMessageType::RECORD_ON),
+        "CecMessageType::RECORD_ON must match legacy value.");
+static_assert(CEC_MESSAGE_RECORD_STATUS == static_cast<int>(CecMessageType::RECORD_STATUS),
+        "CecMessageType::RECORD_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_RECORD_OFF == static_cast<int>(CecMessageType::RECORD_OFF),
+        "CecMessageType::RECORD_OFF must match legacy value.");
+static_assert(CEC_MESSAGE_TEXT_VIEW_ON == static_cast<int>(CecMessageType::TEXT_VIEW_ON),
+        "CecMessageType::TEXT_VIEW_ON must match legacy value.");
+static_assert(CEC_MESSAGE_RECORD_TV_SCREEN == static_cast<int>(CecMessageType::RECORD_TV_SCREEN),
+        "CecMessageType::RECORD_TV_SCREEN must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_DECK_STATUS == static_cast<int>(CecMessageType::GIVE_DECK_STATUS),
+        "CecMessageType::GIVE_DECK_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_STANDBY == static_cast<int>(CecMessageType::STANDBY),
+        "CecMessageType::STANDBY must match legacy value.");
+static_assert(CEC_MESSAGE_PLAY == static_cast<int>(CecMessageType::PLAY),
+        "CecMessageType::PLAY must match legacy value.");
+static_assert(CEC_MESSAGE_DECK_CONTROL == static_cast<int>(CecMessageType::DECK_CONTROL),
+        "CecMessageType::DECK_CONTROL must match legacy value.");
+static_assert(CEC_MESSAGE_TIMER_CLEARED_STATUS == static_cast<int>(
+        CecMessageType::TIMER_CLEARED_STATUS),
+        "CecMessageType::TIMER_CLEARED_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_USER_CONTROL_PRESSED == static_cast<int>(
+        CecMessageType::USER_CONTROL_PRESSED),
+        "CecMessageType::USER_CONTROL_PRESSED must match legacy value.");
+static_assert(CEC_MESSAGE_USER_CONTROL_RELEASED == static_cast<int>(
+        CecMessageType::USER_CONTROL_RELEASED),
+        "CecMessageType::USER_CONTROL_RELEASED must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_OSD_NAME == static_cast<int>(CecMessageType::GIVE_OSD_NAME),
+        "CecMessageType::GIVE_OSD_NAME must match legacy value.");
+static_assert(CEC_MESSAGE_SET_OSD_NAME == static_cast<int>(CecMessageType::SET_OSD_NAME),
+        "CecMessageType::SET_OSD_NAME must match legacy value.");
+static_assert(CEC_MESSAGE_SYSTEM_AUDIO_MODE_REQUEST == static_cast<int>(
+        CecMessageType::SYSTEM_AUDIO_MODE_REQUEST),
+        "CecMessageType::SYSTEM_AUDIO_MODE_REQUEST must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_AUDIO_STATUS == static_cast<int>(CecMessageType::GIVE_AUDIO_STATUS),
+        "CecMessageType::GIVE_AUDIO_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_SET_SYSTEM_AUDIO_MODE == static_cast<int>(
+        CecMessageType::SET_SYSTEM_AUDIO_MODE),
+        "CecMessageType::SET_SYSTEM_AUDIO_MODE must match legacy value.");
+static_assert(CEC_MESSAGE_REPORT_AUDIO_STATUS == static_cast<int>(
+        CecMessageType::REPORT_AUDIO_STATUS),
+        "CecMessageType::REPORT_AUDIO_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_SYSTEM_AUDIO_MODE_STATUS == static_cast<int>(
+        CecMessageType::GIVE_SYSTEM_AUDIO_MODE_STATUS),
+        "CecMessageType::GIVE_SYSTEM_AUDIO_MODE_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_SYSTEM_AUDIO_MODE_STATUS == static_cast<int>(
+        CecMessageType::SYSTEM_AUDIO_MODE_STATUS),
+        "CecMessageType::SYSTEM_AUDIO_MODE_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_ROUTING_CHANGE == static_cast<int>(CecMessageType::ROUTING_CHANGE),
+        "CecMessageType::ROUTING_CHANGE must match legacy value.");
+static_assert(CEC_MESSAGE_ROUTING_INFORMATION == static_cast<int>(
+        CecMessageType::ROUTING_INFORMATION),
+        "CecMessageType::ROUTING_INFORMATION must match legacy value.");
+static_assert(CEC_MESSAGE_ACTIVE_SOURCE == static_cast<int>(CecMessageType::ACTIVE_SOURCE),
+        "CecMessageType::ACTIVE_SOURCE must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_PHYSICAL_ADDRESS == static_cast<int>(
+        CecMessageType::GIVE_PHYSICAL_ADDRESS),
+        "CecMessageType::GIVE_PHYSICAL_ADDRESS must match legacy value.");
+static_assert(CEC_MESSAGE_REPORT_PHYSICAL_ADDRESS == static_cast<int>(
+        CecMessageType::REPORT_PHYSICAL_ADDRESS),
+        "CecMessageType::REPORT_PHYSICAL_ADDRESS must match legacy value.");
+static_assert(CEC_MESSAGE_REQUEST_ACTIVE_SOURCE == static_cast<int>(
+        CecMessageType::REQUEST_ACTIVE_SOURCE),
+        "CecMessageType::REQUEST_ACTIVE_SOURCE must match legacy value.");
+static_assert(CEC_MESSAGE_SET_STREAM_PATH == static_cast<int>(CecMessageType::SET_STREAM_PATH),
+        "CecMessageType::SET_STREAM_PATH must match legacy value.");
+static_assert(CEC_MESSAGE_DEVICE_VENDOR_ID == static_cast<int>(CecMessageType::DEVICE_VENDOR_ID),
+        "CecMessageType::DEVICE_VENDOR_ID must match legacy value.");
+static_assert(CEC_MESSAGE_VENDOR_COMMAND == static_cast<int>(CecMessageType::VENDOR_COMMAND),
+        "CecMessageType::VENDOR_COMMAND must match legacy value.");
+static_assert(CEC_MESSAGE_VENDOR_REMOTE_BUTTON_DOWN == static_cast<int>(
+        CecMessageType::VENDOR_REMOTE_BUTTON_DOWN),
+        "CecMessageType::VENDOR_REMOTE_BUTTON_DOWN must match legacy value.");
+static_assert(CEC_MESSAGE_VENDOR_REMOTE_BUTTON_UP == static_cast<int>(
+        CecMessageType::VENDOR_REMOTE_BUTTON_UP),
+        "CecMessageType::VENDOR_REMOTE_BUTTON_UP must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_DEVICE_VENDOR_ID == static_cast<int>(
+        CecMessageType::GIVE_DEVICE_VENDOR_ID),
+        "CecMessageType::GIVE_DEVICE_VENDOR_ID must match legacy value.");
+static_assert(CEC_MESSAGE_MENU_REQUEST == static_cast<int>(CecMessageType::MENU_REQUEST),
+        "CecMessageType::MENU_REQUEST must match legacy value.");
+static_assert(CEC_MESSAGE_MENU_STATUS == static_cast<int>(CecMessageType::MENU_STATUS),
+        "CecMessageType::MENU_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_GIVE_DEVICE_POWER_STATUS == static_cast<int>(
+        CecMessageType::GIVE_DEVICE_POWER_STATUS),
+        "CecMessageType::GIVE_DEVICE_POWER_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_REPORT_POWER_STATUS == static_cast<int>(
+        CecMessageType::REPORT_POWER_STATUS),
+        "CecMessageType::REPORT_POWER_STATUS must match legacy value.");
+static_assert(CEC_MESSAGE_GET_MENU_LANGUAGE == static_cast<int>(CecMessageType::GET_MENU_LANGUAGE),
+        "CecMessageType::GET_MENU_LANGUAGE must match legacy value.");
+static_assert(CEC_MESSAGE_SELECT_ANALOG_SERVICE == static_cast<int>(
+        CecMessageType::SELECT_ANALOG_SERVICE),
+        "CecMessageType::SELECT_ANALOG_SERVICE must match legacy value.");
+static_assert(CEC_MESSAGE_SELECT_DIGITAL_SERVICE == static_cast<int>(
+        CecMessageType::SELECT_DIGITAL_SERVICE),
+        "CecMessageType::SELECT_DIGITAL_SERVICE must match legacy value.");
+static_assert(CEC_MESSAGE_SET_DIGITAL_TIMER == static_cast<int>(CecMessageType::SET_DIGITAL_TIMER),
+        "CecMessageType::SET_DIGITAL_TIMER must match legacy value.");
+static_assert(CEC_MESSAGE_CLEAR_DIGITAL_TIMER == static_cast<int>(
+        CecMessageType::CLEAR_DIGITAL_TIMER),
+        "CecMessageType::CLEAR_DIGITAL_TIMER must match legacy value.");
+static_assert(CEC_MESSAGE_SET_AUDIO_RATE == static_cast<int>(CecMessageType::SET_AUDIO_RATE),
+        "CecMessageType::SET_AUDIO_RATE must match legacy value.");
+static_assert(CEC_MESSAGE_INACTIVE_SOURCE == static_cast<int>(CecMessageType::INACTIVE_SOURCE),
+        "CecMessageType::INACTIVE_SOURCE must match legacy value.");
+static_assert(CEC_MESSAGE_CEC_VERSION == static_cast<int>(CecMessageType::CEC_VERSION),
+        "CecMessageType::CEC_VERSION must match legacy value.");
+static_assert(CEC_MESSAGE_GET_CEC_VERSION == static_cast<int>(CecMessageType::GET_CEC_VERSION),
+        "CecMessageType::GET_CEC_VERSION must match legacy value.");
+static_assert(CEC_MESSAGE_VENDOR_COMMAND_WITH_ID == static_cast<int>(
+        CecMessageType::VENDOR_COMMAND_WITH_ID),
+        "CecMessageType::VENDOR_COMMAND_WITH_ID must match legacy value.");
+static_assert(CEC_MESSAGE_CLEAR_EXTERNAL_TIMER == static_cast<int>(
+        CecMessageType::CLEAR_EXTERNAL_TIMER),
+        "CecMessageType::CLEAR_EXTERNAL_TIMER must match legacy value.");
+static_assert(CEC_MESSAGE_SET_EXTERNAL_TIMER == static_cast<int>(
+        CecMessageType::SET_EXTERNAL_TIMER),
+        "CecMessageType::SET_EXTERNAL_TIMER must match legacy value.");
+static_assert(CEC_MESSAGE_INITIATE_ARC == static_cast<int>(CecMessageType::INITIATE_ARC),
+        "CecMessageType::INITIATE_ARC must match legacy value.");
+static_assert(CEC_MESSAGE_REPORT_ARC_INITIATED == static_cast<int>(
+        CecMessageType::REPORT_ARC_INITIATED),
+        "CecMessageType::REPORT_ARC_INITIATED must match legacy value.");
+static_assert(CEC_MESSAGE_REPORT_ARC_TERMINATED == static_cast<int>(
+        CecMessageType::REPORT_ARC_TERMINATED),
+        "CecMessageType::REPORT_ARC_TERMINATED must match legacy value.");
+static_assert(CEC_MESSAGE_REQUEST_ARC_INITIATION == static_cast<int>(
+        CecMessageType::REQUEST_ARC_INITIATION),
+        "CecMessageType::REQUEST_ARC_INITIATION must match legacy value.");
+static_assert(CEC_MESSAGE_REQUEST_ARC_TERMINATION == static_cast<int>(
+        CecMessageType::REQUEST_ARC_TERMINATION),
+        "CecMessageType::REQUEST_ARC_TERMINATION must match legacy value.");
+static_assert(CEC_MESSAGE_TERMINATE_ARC == static_cast<int>(CecMessageType::TERMINATE_ARC),
+        "CecMessageType::TERMINATE_ARC must match legacy value.");
+static_assert(CEC_MESSAGE_ABORT == static_cast<int>(CecMessageType::ABORT),
+        "CecMessageType::ABORT must match legacy value.");
+
+static_assert(ABORT_UNRECOGNIZED_MODE == static_cast<int>(AbortReason::UNRECOGNIZED_MODE),
+        "AbortReason::UNRECOGNIZED_MODE must match legacy value.");
+static_assert(ABORT_NOT_IN_CORRECT_MODE == static_cast<int>(AbortReason::NOT_IN_CORRECT_MODE),
+        "AbortReason::NOT_IN_CORRECT_MODE must match legacy value.");
+static_assert(ABORT_CANNOT_PROVIDE_SOURCE == static_cast<int>(AbortReason::CANNOT_PROVIDE_SOURCE),
+        "AbortReason::CANNOT_PROVIDE_SOURCE must match legacy value.");
+static_assert(ABORT_INVALID_OPERAND == static_cast<int>(AbortReason::INVALID_OPERAND),
+        "AbortReason::INVALID_OPERAND must match legacy value.");
+static_assert(ABORT_REFUSED == static_cast<int>(AbortReason::REFUSED),
+        "AbortReason::REFUSED must match legacy value.");
+static_assert(ABORT_UNABLE_TO_DETERMINE == static_cast<int>(AbortReason::UNABLE_TO_DETERMINE),
+        "AbortReason::UNABLE_TO_DETERMINE must match legacy value.");
+
+static_assert(HDMI_RESULT_SUCCESS == static_cast<int>(SendMessageResult::SUCCESS),
+        "SendMessageResult::SUCCESS must match legacy value.");
+static_assert(HDMI_RESULT_NACK == static_cast<int>(SendMessageResult::NACK),
+        "SendMessageResult::NACK must match legacy value.");
+static_assert(HDMI_RESULT_BUSY == static_cast<int>(SendMessageResult::BUSY),
+        "SendMessageResult::BUSY must match legacy value.");
+static_assert(HDMI_RESULT_FAIL == static_cast<int>(SendMessageResult::FAIL),
+        "SendMessageResult::FAIL must match legacy value.");
+
+static_assert(HDMI_INPUT == static_cast<int>(HdmiPortType::INPUT),
+        "HdmiPortType::INPUT must match legacy value.");
+static_assert(HDMI_OUTPUT == static_cast<int>(HdmiPortType::OUTPUT),
+        "HdmiPortType::OUTPUT must match legacy value.");
+
+static_assert(HDMI_OPTION_WAKEUP == static_cast<int>(OptionKey::WAKEUP),
+        "OptionKey::WAKEUP must match legacy value.");
+static_assert(HDMI_OPTION_ENABLE_CEC == static_cast<int>(OptionKey::ENABLE_CEC),
+        "OptionKey::ENABLE_CEC must match legacy value.");
+static_assert(HDMI_OPTION_SYSTEM_CEC_CONTROL == static_cast<int>(OptionKey::SYSTEM_CEC_CONTROL),
+        "OptionKey::SYSTEM_CEC_CONTROL must match legacy value.");
+
+sp<IHdmiCecCallback> HdmiCec::mCallback = nullptr;
+
+HdmiCec::HdmiCec(hdmi_cec_device_t* device) : mDevice(device) {
+}
+
+// Methods from ::android::hardware::tv::cec::V1_0::IHdmiCec follow.
+Return<Result> HdmiCec::addLogicalAddress(CecLogicalAddress addr) {
+    int ret = mDevice->add_logical_address(mDevice, static_cast<cec_logical_address_t>(addr));
+    switch (ret) {
+        case 0:
+            return Result::SUCCESS;
+        case -EINVAL:
+            return Result::FAILURE_INVALID_ARGS;
+        case -ENOTSUP:
+            return Result::FAILURE_NOT_SUPPORTED;
+        case -EBUSY:
+            return Result::FAILURE_BUSY;
+        default:
+            return Result::FAILURE_UNKNOWN;
+    }
+}
+
+Return<void> HdmiCec::clearLogicalAddress() {
+    mDevice->clear_logical_address(mDevice);
+    return Void();
+}
+
+Return<void> HdmiCec::getPhysicalAddress(getPhysicalAddress_cb _hidl_cb) {
+    uint16_t addr;
+    int ret = mDevice->get_physical_address(mDevice, &addr);
+    switch (ret) {
+        case 0:
+            _hidl_cb(Result::SUCCESS, addr);
+            break;
+        case -EBADF:
+            _hidl_cb(Result::FAILURE_INVALID_STATE, addr);
+            break;
+        default:
+            _hidl_cb(Result::FAILURE_UNKNOWN, addr);
+            break;
+    }
+    return Void();
+}
+
+Return<SendMessageResult> HdmiCec::sendMessage(const CecMessage& message) {
+    cec_message_t legacyMessage {
+        .initiator = static_cast<cec_logical_address_t>(message.initiator),
+        .destination = static_cast<cec_logical_address_t>(message.destination),
+        .length = message.body.size(),
+    };
+    for (size_t i = 0; i < message.body.size(); ++i) {
+        legacyMessage.body[i] = static_cast<unsigned char>(message.body[i]);
+    }
+    return static_cast<SendMessageResult>(mDevice->send_message(mDevice, &legacyMessage));
+}
+
+Return<void> HdmiCec::setCallback(const sp<IHdmiCecCallback>& callback) {
+    mCallback = callback;
+    mDevice->register_event_callback(mDevice, eventCallback, nullptr);
+    return Void();
+}
+
+Return<int32_t> HdmiCec::getCecVersion() {
+    int version;
+    mDevice->get_version(mDevice, &version);
+    return static_cast<int32_t>(version);
+}
+
+Return<uint32_t> HdmiCec::getVendorId() {
+    uint32_t vendor_id;
+    mDevice->get_vendor_id(mDevice, &vendor_id);
+    return vendor_id;
+}
+
+Return<void> HdmiCec::getPortInfo(getPortInfo_cb _hidl_cb) {
+    struct hdmi_port_info* legacyPorts;
+    int numPorts;
+    hidl_vec<HdmiPortInfo> portInfos;
+    mDevice->get_port_info(mDevice, &legacyPorts, &numPorts);
+    portInfos.resize(numPorts);
+    for (int i = 0; i < numPorts; ++i) {
+        portInfos[i] = {
+            .type = static_cast<HdmiPortType>(legacyPorts[i].type),
+            .portId = static_cast<uint32_t>(legacyPorts[i].port_id),
+            .cecSupported = legacyPorts[i].cec_supported != 0,
+            .arcSupported = legacyPorts[i].arc_supported != 0,
+            .physicalAddress = legacyPorts[i].physical_address
+        };
+    }
+    _hidl_cb(portInfos);
+    return Void();
+}
+
+Return<void> HdmiCec::setOption(OptionKey key, bool value) {
+    mDevice->set_option(mDevice, static_cast<int>(key), value ? 1 : 0);
+    return Void();
+}
+
+Return<void> HdmiCec::setLanguage(const hidl_string& language) {
+    if (language.size() != 3) {
+        LOG(ERROR) << "Wrong language code: expected 3 letters, but it was " << language.size()
+                << ".";
+        return Void();
+    }
+    const char *languageStr = language.c_str();
+    int convertedLanguage = ((languageStr[0] & 0xFF) << 16)
+            | ((languageStr[1] & 0xFF) << 8)
+            | (languageStr[2] & 0xFF);
+    mDevice->set_option(mDevice, HDMI_OPTION_SET_LANG, convertedLanguage);
+    return Void();
+}
+
+Return<void> HdmiCec::enableAudioReturnChannel(int32_t portId, bool enable) {
+    mDevice->set_audio_return_channel(mDevice, portId, enable ? 1 : 0);
+    return Void();
+}
+
+Return<bool> HdmiCec::isConnected(int32_t portId) {
+    return mDevice->is_connected(mDevice, portId) > 0;
+}
+
+
+IHdmiCec* HIDL_FETCH_IHdmiCec(const char* hal) {
+    hdmi_cec_device_t* hdmi_cec_device;
+    int ret = 0;
+    const hw_module_t* hw_module = nullptr;
+
+    ret = hw_get_module (hal, &hw_module);
+    if (ret == 0) {
+        ret = hdmi_cec_open (hw_module, &hdmi_cec_device);
+        if (ret != 0) {
+            LOG(ERROR) << "hdmi_cec_open " << hal << " failed: " << ret;
+        }
+    } else {
+        LOG(ERROR) << "hw_get_module " << hal << " failed: " << ret;
+    }
+
+    if (ret == 0) {
+        return new HdmiCec(hdmi_cec_device);
+    } else {
+        LOG(ERROR) << "Passthrough failed to load legacy HAL.";
+        return nullptr;
+    }
+}
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace cec
+}  // namespace tv
+}  // namespace hardware
+}  // namespace android
diff --git a/tv/cec/1.0/default/HdmiCec.h b/tv/cec/1.0/default/HdmiCec.h
new file mode 100644
index 0000000..3e80cb1
--- /dev/null
+++ b/tv/cec/1.0/default/HdmiCec.h
@@ -0,0 +1,102 @@
+/*
+ * Copyright (C) 2016 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 HIDL_GENERATED_android_hardware_tv_cec_V1_0_HdmiCec_H_
+#define HIDL_GENERATED_android_hardware_tv_cec_V1_0_HdmiCec_H_
+
+#include <algorithm>
+
+#include <android/hardware/tv/cec/1.0/IHdmiCec.h>
+#include <hidl/Status.h>
+#include <hardware/hardware.h>
+#include <hardware/hdmi_cec.h>
+
+#include <hidl/MQDescriptor.h>
+namespace android {
+namespace hardware {
+namespace tv {
+namespace cec {
+namespace V1_0 {
+namespace implementation {
+
+using ::android::hardware::tv::cec::V1_0::CecLogicalAddress;
+using ::android::hardware::tv::cec::V1_0::CecMessage;
+using ::android::hardware::tv::cec::V1_0::HdmiPortInfo;
+using ::android::hardware::tv::cec::V1_0::IHdmiCec;
+using ::android::hardware::tv::cec::V1_0::IHdmiCecCallback;
+using ::android::hardware::tv::cec::V1_0::OptionKey;
+using ::android::hardware::tv::cec::V1_0::Result;
+using ::android::hardware::tv::cec::V1_0::SendMessageResult;
+using ::android::hardware::Return;
+using ::android::hardware::Void;
+using ::android::hardware::hidl_vec;
+using ::android::hardware::hidl_string;
+using ::android::sp;
+
+struct HdmiCec : public IHdmiCec {
+    HdmiCec(hdmi_cec_device_t* device);
+    // Methods from ::android::hardware::tv::cec::V1_0::IHdmiCec follow.
+    Return<Result> addLogicalAddress(CecLogicalAddress addr)  override;
+    Return<void> clearLogicalAddress()  override;
+    Return<void> getPhysicalAddress(getPhysicalAddress_cb _hidl_cb)  override;
+    Return<SendMessageResult> sendMessage(const CecMessage& message)  override;
+    Return<void> setCallback(const sp<IHdmiCecCallback>& callback)  override;
+    Return<int32_t> getCecVersion()  override;
+    Return<uint32_t> getVendorId()  override;
+    Return<void> getPortInfo(getPortInfo_cb _hidl_cb)  override;
+    Return<void> setOption(OptionKey key, bool value)  override;
+    Return<void> setLanguage(const hidl_string& language)  override;
+    Return<void> enableAudioReturnChannel(int32_t portId, bool enable)  override;
+    Return<bool> isConnected(int32_t portId)  override;
+
+    static void eventCallback(const hdmi_event_t* event, void* arg) {
+        if (mCallback != nullptr && event != nullptr) {
+            if (event->type == HDMI_EVENT_CEC_MESSAGE) {
+                size_t length = std::min(event->cec.length, static_cast<size_t>(15));
+                CecMessage cecMessage {
+                    .initiator = static_cast<CecLogicalAddress>(event->cec.initiator),
+                    .destination = static_cast<CecLogicalAddress>(event->cec.destination),
+                };
+                cecMessage.body.resize(length);
+                for (size_t i = 0; i < length; ++i) {
+                    cecMessage.body[i] = static_cast<uint8_t>(event->cec.body[i]);
+                }
+                mCallback->onCecMessage(cecMessage);
+            } else if (event->type == HDMI_EVENT_HOT_PLUG) {
+                HotplugEvent hotplugEvent {
+                    .connected = event->hotplug.connected > 0,
+                    .portId = static_cast<uint32_t>(event->hotplug.port_id)
+                };
+                mCallback->onHotplugEvent(hotplugEvent);
+            }
+        }
+    }
+
+private:
+    static sp<IHdmiCecCallback> mCallback;
+    const hdmi_cec_device_t* mDevice;
+};
+
+extern "C" IHdmiCec* HIDL_FETCH_IHdmiCec(const char* name);
+
+}  // namespace implementation
+}  // namespace V1_0
+}  // namespace cec
+}  // namespace tv
+}  // namespace hardware
+}  // namespace android
+
+#endif  // HIDL_GENERATED_android_hardware_tv_cec_V1_0_HdmiCec_H_
diff --git a/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.rc b/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.rc
new file mode 100644
index 0000000..1af32cb
--- /dev/null
+++ b/tv/cec/1.0/default/android.hardware.tv.cec@1.0-service.rc
@@ -0,0 +1,4 @@
+service cec-hal-1-0 /system/bin/hw/android.hardware.tv.cec@1.0-service
+    class hal
+    user system
+    group system
diff --git a/tv/cec/1.0/default/service.cpp b/tv/cec/1.0/default/service.cpp
new file mode 100644
index 0000000..3c11e24
--- /dev/null
+++ b/tv/cec/1.0/default/service.cpp
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2016 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 "android.hardware.tv.cec@1.0-service"
+
+#include <android/hardware/tv/cec/1.0/IHdmiCec.h>
+#include <hidl/LegacySupport.h>
+
+using android::hardware::tv::cec::V1_0::IHdmiCec;
+using android::hardware::defaultPassthroughServiceImplementation;
+
+int main() {
+    return defaultPassthroughServiceImplementation<IHdmiCec>("tv.cec");
+}
diff --git a/tv/cec/1.0/types.hal b/tv/cec/1.0/types.hal
new file mode 100644
index 0000000..421fe9c
--- /dev/null
+++ b/tv/cec/1.0/types.hal
@@ -0,0 +1,218 @@
+/*
+ * Copyright (C) 2016 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.tv.cec@1.0;
+
+enum CecDeviceType : int32_t {
+    INACTIVE = -1,
+    TV = 0,
+    RECORDER = 1,
+    TUNER = 3,
+    PLAYBACK = 4,
+    AUDIO_SYSTEM = 5,
+    MAX = AUDIO_SYSTEM,
+};
+
+enum CecLogicalAddress : int32_t {
+    TV = 0,
+    RECORDER_1 = 1,
+    RECORDER_2 = 2,
+    TUNER_1 = 3,
+    PLAYBACK_1 = 4,
+    AUDIO_SYSTEM = 5,
+    TUNER_2 = 6,
+    TUNER_3 = 7,
+    PLAYBACK_2 = 8,
+    RECORDER_3 = 9,
+    TUNER_4 = 10,
+    PLAYBACK_3 = 11,
+    FREE_USE = 14,
+    UNREGISTERED = 15, // as Initiator address
+    BROADCAST = 15, // as Destination address
+};
+
+/*
+ * HDMI CEC message types. The assigned values represent opcode used in CEC
+ * frame as specified in CEC Table 8-26 of the CEC Spec 1.4b.
+ */
+enum CecMessageType : int32_t {
+    FEATURE_ABORT = 0x00,
+    IMAGE_VIEW_ON = 0x04,
+    TUNER_STEP_INCREMENT = 0x05,
+    TUNER_STEP_DECREMENT = 0x06,
+    TUNER_DEVICE_STATUS = 0x07,
+    GIVE_TUNER_DEVICE_STATUS = 0x08,
+    RECORD_ON = 0x09,
+    RECORD_STATUS = 0x0A,
+    RECORD_OFF = 0x0B,
+    TEXT_VIEW_ON = 0x0D,
+    RECORD_TV_SCREEN = 0x0F,
+    GIVE_DECK_STATUS = 0x1A,
+    DECK_STATUS = 0x1B,
+    SET_MENU_LANGUAGE = 0x32,
+    CLEAR_ANALOG_TIMER = 0x33,
+    SET_ANALOG_TIMER = 0x34,
+    TIMER_STATUS = 0x35,
+    STANDBY = 0x36,
+    PLAY = 0x41,
+    DECK_CONTROL = 0x42,
+    TIMER_CLEARED_STATUS = 0x43,
+    USER_CONTROL_PRESSED = 0x44,
+    USER_CONTROL_RELEASED = 0x45,
+    GIVE_OSD_NAME = 0x46,
+    SET_OSD_NAME = 0x47,
+    SET_OSD_STRING = 0x64,
+    SET_TIMER_PROGRAM_TITLE = 0x67,
+    SYSTEM_AUDIO_MODE_REQUEST = 0x70,
+    GIVE_AUDIO_STATUS = 0x71,
+    SET_SYSTEM_AUDIO_MODE = 0x72,
+    REPORT_AUDIO_STATUS = 0x7A,
+    GIVE_SYSTEM_AUDIO_MODE_STATUS = 0x7D,
+    SYSTEM_AUDIO_MODE_STATUS = 0x7E,
+    ROUTING_CHANGE = 0x80,
+    ROUTING_INFORMATION = 0x81,
+    ACTIVE_SOURCE = 0x82,
+    GIVE_PHYSICAL_ADDRESS = 0x83,
+    REPORT_PHYSICAL_ADDRESS = 0x84,
+    REQUEST_ACTIVE_SOURCE = 0x85,
+    SET_STREAM_PATH = 0x86,
+    DEVICE_VENDOR_ID = 0x87,
+    VENDOR_COMMAND = 0x89,
+    VENDOR_REMOTE_BUTTON_DOWN = 0x8A,
+    VENDOR_REMOTE_BUTTON_UP = 0x8B,
+    GIVE_DEVICE_VENDOR_ID = 0x8C,
+    MENU_REQUEST = 0x8D,
+    MENU_STATUS = 0x8E,
+    GIVE_DEVICE_POWER_STATUS = 0x8F,
+    REPORT_POWER_STATUS = 0x90,
+    GET_MENU_LANGUAGE = 0x91,
+    SELECT_ANALOG_SERVICE = 0x92,
+    SELECT_DIGITAL_SERVICE = 0x93,
+    SET_DIGITAL_TIMER = 0x97,
+    CLEAR_DIGITAL_TIMER = 0x99,
+    SET_AUDIO_RATE = 0x9A,
+    INACTIVE_SOURCE = 0x9D,
+    CEC_VERSION = 0x9E,
+    GET_CEC_VERSION = 0x9F,
+    VENDOR_COMMAND_WITH_ID = 0xA0,
+    CLEAR_EXTERNAL_TIMER = 0xA1,
+    SET_EXTERNAL_TIMER = 0xA2,
+    INITIATE_ARC = 0xC0,
+    REPORT_ARC_INITIATED = 0xC1,
+    REPORT_ARC_TERMINATED = 0xC2,
+    REQUEST_ARC_INITIATION = 0xC3,
+    REQUEST_ARC_TERMINATION = 0xC4,
+    TERMINATE_ARC = 0xC5,
+    ABORT = 0xFF,
+};
+
+/*
+ * Operand description [Abort Reason]
+ */
+enum AbortReason : int32_t {
+    UNRECOGNIZED_MODE = 0,
+    NOT_IN_CORRECT_MODE = 1,
+    CANNOT_PROVIDE_SOURCE = 2,
+    INVALID_OPERAND = 3,
+    REFUSED = 4,
+    UNABLE_TO_DETERMINE = 5,
+};
+
+enum Result : int32_t {
+    SUCCESS = 0,
+    FAILURE_UNKNOWN = 1,
+    FAILURE_INVALID_ARGS = 2,
+    FAILURE_INVALID_STATE = 3,
+    FAILURE_NOT_SUPPORTED = 4,
+    FAILURE_BUSY = 5,
+};
+
+/*
+ * error code used for send_message.
+ */
+enum SendMessageResult : int32_t {
+    SUCCESS = 0,
+    NACK = 1, // not acknowledged
+    BUSY = 2, // bus is busy
+    FAIL = 3,
+};
+
+/*
+ * HDMI port type.
+ */
+enum HdmiPortType : int32_t {
+    INPUT = 0,
+    OUTPUT = 1,
+};
+
+/*
+ * Options used for IHdmiCec.setOption()
+ */
+enum OptionKey : int32_t {
+    /* When set to false, HAL does not wake up the system upon receiving <Image
+     * View On> or <Text View On>. Used when user changes the TV settings to
+     * disable the auto TV on functionality.
+     * True by default.
+     */
+    WAKEUP = 1,
+
+    /* When set to false, all the CEC commands are discarded. Used when user
+     * changes the TV settings to disable CEC functionality.
+     * True by default.
+     */
+    ENABLE_CEC = 2,
+
+    /* Setting this flag to false means Android system must stop handling CEC
+     * service and yield the control over to the microprocessor that is powered
+     * on through the standby mode. When set to true, the system must gain the
+     * control over, hence telling the microprocessor to stop handling the CEC
+     * commands. For example, this may be called when system goes in and out of
+     * standby mode to notify the microprocessor that it should start/stop
+     * handling CEC commands on behalf of the system.
+     * False by default.
+     */
+    SYSTEM_CEC_CONTROL = 3,
+
+    /* Option 4 not used */
+};
+
+struct CecMessage {
+    /* logical address of sender */
+    CecLogicalAddress initiator;
+
+    /* logical address of receiver */
+    CecLogicalAddress destination;
+
+    /* The maximum size of body is 15 as specified in the section 6 of the CEC
+     * Spec 1.4b. Overflowed data must be ignored. */
+    vec<uint8_t> body;
+};
+
+struct HotplugEvent {
+    bool connected;
+    uint32_t portId;
+};
+
+/*
+ * HDMI port descriptor
+ */
+struct HdmiPortInfo {
+    HdmiPortType type;
+    uint32_t portId; // Should start from 1 which corresponds to HDMI "port 1".
+    bool cecSupported;
+    bool arcSupported;
+    uint16_t physicalAddress;
+};
diff --git a/tv/input/1.0/Android.bp b/tv/input/1.0/Android.bp
index 895aa73..fa736b0 100644
--- a/tv/input/1.0/Android.bp
+++ b/tv/input/1.0/Android.bp
@@ -52,9 +52,9 @@
         "libcutils",
         "android.hardware.audio.common@2.0",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/vehicle/2.0/Android.bp b/vehicle/2.0/Android.bp
index 981103c..27ac213 100644
--- a/vehicle/2.0/Android.bp
+++ b/vehicle/2.0/Android.bp
@@ -51,9 +51,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/vehicle/2.0/IVehicle.hal b/vehicle/2.0/IVehicle.hal
index 4c02447..5b0df67 100644
--- a/vehicle/2.0/IVehicle.hal
+++ b/vehicle/2.0/IVehicle.hal
@@ -27,9 +27,13 @@
 
   /*
    * Returns a list of property configurations for given properties.
+   *
+   * If requested VehicleProperty wasn't found it must return
+   * StatusCode::INVALID_ARG, otherwise a list of vehicle property
+   * configurations with StatusCode::OK
    */
   getPropConfigs(vec<VehicleProperty> props)
-          generates (vec<VehiclePropConfig> propConfigs);
+          generates (StatusCode status, vec<VehiclePropConfig> propConfigs);
 
   /**
    * Get a vehicle property value.
@@ -39,11 +43,14 @@
    * For VehiclePropertyChangeMode::ON_CHANGE properties, it must return the
    * latest available value.
    *
+   * Some properties like AUDIO_VOLUME requires to pass additional data in
+   * GET request in VehiclePropValue object.
+   *
    * If there is no data available yet, which can happen during initial stage,
    * this call must return immediately with an error code of
    * StatusCode::TRY_AGAIN.
    */
-  get(VehicleProperty propId, int32_t areaId)
+  get(VehiclePropValue requestedPropValue)
           generates (StatusCode status, VehiclePropValue propValue);
 
   /**
@@ -75,7 +82,7 @@
    * Unsubscribes from property events.
    *
    * If this client wasn't subscribed to the given property, this method
-   * must return StatusCode::INVALID_ARGUMENT.
+   * must return StatusCode::INVALID_ARG.
    */
   unsubscribe(IVehicleCallback callback, VehicleProperty propId)
           generates (StatusCode status);
diff --git a/vehicle/2.0/IVehicleCallback.hal b/vehicle/2.0/IVehicleCallback.hal
index 5c1042b..504f782 100644
--- a/vehicle/2.0/IVehicleCallback.hal
+++ b/vehicle/2.0/IVehicleCallback.hal
@@ -43,14 +43,17 @@
     oneway onPropertySet(VehiclePropValue propValue);
 
     /*
-     * Called by HAL server when error condition has occurred.
+     * Set property value is usually asynchronous operation. Thus even if
+     * client received StatusCode::OK from the IVehicle::set(...) this
+     * doesn't guarantee that the value was successfully propagated to the
+     * vehicle network. If such rare event occurs this method must be called.
      *
      * @param errorCode - any value from StatusCode enum.
-     * @parm property - a property where error has happened. If this is
-     * a generic error, this value should be VehicleProperty::INVALID.
-     * @param operation Represent the operation where the error has happened.
+     * @param property - a property where error has happened.
+     * @param areaId - bitmask that specifies in which areas the problem has
+     *                 occurred, must be 0 for global properties
      */
-    oneway onError(StatusCode errorCode,
-                   VehicleProperty propId,
-                   VehiclePropertyOperation operation);
+    oneway onPropertySetError(StatusCode errorCode,
+                              VehicleProperty propId,
+                              int32_t areaId);
 };
diff --git a/vehicle/2.0/default/Android.mk b/vehicle/2.0/default/Android.mk
index e14cb19..90353ee 100644
--- a/vehicle/2.0/default/Android.mk
+++ b/vehicle/2.0/default/Android.mk
@@ -24,7 +24,6 @@
 LOCAL_SRC_FILES := \
     vehicle_hal_manager/SubscriptionManager.cpp \
     vehicle_hal_manager/VehicleHalManager.cpp \
-    vehicle_hal_manager/VehicleCallback.cpp \
 
 LOCAL_SHARED_LIBRARIES := \
     liblog \
diff --git a/vehicle/2.0/default/VehicleHal.h b/vehicle/2.0/default/VehicleHal.h
index 89d8ef8..2807f28 100644
--- a/vehicle/2.0/default/VehicleHal.h
+++ b/vehicle/2.0/default/VehicleHal.h
@@ -36,18 +36,15 @@
 
     using HalEventFunction = std::function<void(VehiclePropValuePtr)>;
     using HalErrorFunction = std::function<void(
-            VehicleProperty property,
-            status_t errorCode,
-            VehiclePropertyOperation operation)>;
+            StatusCode errorCode, VehicleProperty property, int32_t areaId)>;
 
     virtual ~VehicleHal() {}
 
     virtual std::vector<VehiclePropConfig> listProperties() = 0;
-    virtual VehiclePropValuePtr get(VehicleProperty property,
-                                    int32_t areaId,
-                                    status_t* outStatus) = 0;
+    virtual VehiclePropValuePtr get(const VehiclePropValue& requestedPropValue,
+                                    StatusCode* outStatus) = 0;
 
-    virtual status_t set(const VehiclePropValue& propValue) = 0;
+    virtual StatusCode set(const VehiclePropValue& propValue) = 0;
 
     /**
      * Subscribe to HAL property events. This method might be called multiple
@@ -60,7 +57,7 @@
      *                   rate, e.g. for properties with
      *                   VehiclePropertyChangeMode::CONTINUOUS
      */
-    virtual status_t subscribe(VehicleProperty property,
+    virtual StatusCode subscribe(VehicleProperty property,
                                int32_t areas,
                                float sampleRate) = 0;
 
@@ -69,7 +66,7 @@
      *
      * @param property vehicle property to unsubscribe
      */
-    virtual status_t unsubscribe(VehicleProperty property) = 0;
+    virtual StatusCode unsubscribe(VehicleProperty property) = 0;
 
     /**
      * Override this method if you need to do one-time initialization.
@@ -82,7 +79,7 @@
         const HalErrorFunction& onHalError) {
         mValuePool = valueObjectPool;
         mOnHalEvent = onHalEvent;
-        mOnHalError = onHalError;
+        mOnHalPropertySetError = onHalError;
 
         onCreate();
     }
@@ -91,19 +88,20 @@
         return mValuePool;
     }
 protected:
+    /* Propagates property change events to vehicle HAL clients. */
     void doHalEvent(VehiclePropValuePtr v) {
         mOnHalEvent(std::move(v));
     }
 
-    void doHalError(VehicleProperty property,
-                    status_t errorCode,
-                    VehiclePropertyOperation operation) {
-        mOnHalError(property, errorCode, operation);
+    /* Propagates error during set operation to the vehicle HAL clients. */
+    void doHalPropertySetError(StatusCode errorCode,
+                               VehicleProperty propId, int32_t areaId) {
+        mOnHalPropertySetError(errorCode, propId, areaId);
     }
 
 private:
     HalEventFunction mOnHalEvent;
-    HalErrorFunction mOnHalError;
+    HalErrorFunction mOnHalPropertySetError;
     VehiclePropValuePool* mValuePool;
 };
 
diff --git a/vehicle/2.0/default/impl/DefaultConfig.h b/vehicle/2.0/default/impl/DefaultConfig.h
index 6f04626..e620c28 100644
--- a/vehicle/2.0/default/impl/DefaultConfig.h
+++ b/vehicle/2.0/default/impl/DefaultConfig.h
@@ -43,11 +43,11 @@
             VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT),
         .areaConfigs = init_hidl_vec({
                  VehicleAreaConfig {
-                     .areaId = val(VehicleAreaZone::ROW_2_LEFT),
+                     .areaId = toInt(VehicleAreaZone::ROW_2_LEFT),
                      .minInt32Value = 1,
                      .maxInt32Value = 7},
                  VehicleAreaConfig {
-                     .areaId = val(VehicleAreaZone::ROW_1_RIGHT),
+                     .areaId = toInt(VehicleAreaZone::ROW_1_RIGHT),
                      .minInt32Value = 1,
                      .maxInt32Value = 5,
                  }
diff --git a/vehicle/2.0/default/impl/DefaultVehicleHal.cpp b/vehicle/2.0/default/impl/DefaultVehicleHal.cpp
index 6ca0f9f..24d438d 100644
--- a/vehicle/2.0/default/impl/DefaultVehicleHal.cpp
+++ b/vehicle/2.0/default/impl/DefaultVehicleHal.cpp
@@ -23,12 +23,13 @@
 
 namespace impl {
 
-VehicleHal::VehiclePropValuePtr DefaultVehicleHal::get(VehicleProperty property,
-                                                       int32_t areaId,
-                                                       status_t* outStatus) {
-    *outStatus = OK;
+VehicleHal::VehiclePropValuePtr DefaultVehicleHal::get(
+        const VehiclePropValue& requestedPropValue, StatusCode* outStatus) {
+    *outStatus = StatusCode::OK;
 
     VehiclePropValuePtr v;
+    VehicleProperty property = requestedPropValue.prop;
+    int32_t areaId = requestedPropValue.areaId;
 
     switch (property) {
         case VehicleProperty::INFO_MAKE:
@@ -36,7 +37,8 @@
             break;
         case VehicleProperty::HVAC_FAN_SPEED:
             int32_t value;
-            if ((*outStatus = getHvacFanSpeed(areaId, &value)) == OK) {
+            *outStatus = getHvacFanSpeed(areaId, &value);
+            if (StatusCode::OK == *outStatus) {
                 v = getValuePool()->obtainInt32(value);
             }
             break;
@@ -47,10 +49,10 @@
             v = getValuePool()->obtainInt32(brightness);
             break;
         default:
-            *outStatus = BAD_VALUE;
+            *outStatus = StatusCode::INVALID_ARG;
     }
 
-    if (*outStatus == OK && v.get() != nullptr) {
+    if (StatusCode::OK == *outStatus && v.get() != nullptr) {
         v->prop = property;
         v->areaId = areaId;
         v->timestamp = elapsedRealtimeNano();
@@ -59,10 +61,10 @@
     return v;
 }
 
-status_t DefaultVehicleHal::set(const VehiclePropValue& propValue) {
+StatusCode DefaultVehicleHal::set(const VehiclePropValue& propValue) {
     auto property = propValue.prop;
 
-    status_t status = OK;
+    StatusCode status = StatusCode::OK;
 
     switch (property) {
         case VehicleProperty::HVAC_FAN_SPEED:
@@ -73,33 +75,33 @@
             brightness = propValue.value.int32Values[0];
             break;
         default:
-            status = BAD_VALUE;
+            status = StatusCode::INVALID_ARG;
     }
 
     return status;
 }
 
-status_t DefaultVehicleHal::getHvacFanSpeed(int32_t areaId,
+StatusCode DefaultVehicleHal::getHvacFanSpeed(int32_t areaId,
                                             int32_t* outValue)  {
-    if (areaId == val(VehicleAreaZone::ROW_1_LEFT)) {
+    if (areaId == toInt(VehicleAreaZone::ROW_1_LEFT)) {
         *outValue = fanSpeedRow1Left;
-    } else if (areaId == val(VehicleAreaZone::ROW_2_RIGHT)) {
+    } else if (areaId == toInt(VehicleAreaZone::ROW_2_RIGHT)) {
         *outValue = fanSpeedRow1Right;
     } else {
-        return BAD_VALUE;
+        return StatusCode::INVALID_ARG;
     }
-    return OK;
+    return StatusCode::OK;
 }
 
-status_t DefaultVehicleHal::setHvacFanSpeed(int32_t areaId, int32_t value) {
-    if (areaId == val(VehicleAreaZone::ROW_1_LEFT)) {
+StatusCode DefaultVehicleHal::setHvacFanSpeed(int32_t areaId, int32_t value) {
+    if (areaId == toInt(VehicleAreaZone::ROW_1_LEFT)) {
         fanSpeedRow1Left = value;
-    } else if (areaId == val(VehicleAreaZone::ROW_2_RIGHT)) {
+    } else if (areaId == toInt(VehicleAreaZone::ROW_2_RIGHT)) {
         fanSpeedRow1Right = value;
     } else {
-        return BAD_VALUE;
+        return StatusCode::INVALID_ARG;
     }
-    return OK;
+    return StatusCode::OK;
 }
 
 }  // impl
diff --git a/vehicle/2.0/default/impl/DefaultVehicleHal.h b/vehicle/2.0/default/impl/DefaultVehicleHal.h
index 7d0b7cb..4a81da3 100644
--- a/vehicle/2.0/default/impl/DefaultVehicleHal.h
+++ b/vehicle/2.0/default/impl/DefaultVehicleHal.h
@@ -35,27 +35,26 @@
                                               std::end(kVehicleProperties));
     }
 
-    VehiclePropValuePtr get(VehicleProperty property,
-                            int32_t areaId,
-                            status_t* outStatus) override;
+    VehiclePropValuePtr get(const VehiclePropValue& requestedPropValue,
+                            StatusCode* outStatus) override;
 
-    status_t set(const VehiclePropValue& propValue) override;
+    StatusCode set(const VehiclePropValue& propValue) override;
 
-    status_t subscribe(VehicleProperty property,
+    StatusCode subscribe(VehicleProperty property,
                        int32_t areas,
                        float sampleRate) {
         // TODO(pavelm): implement
-        return OK;
+        return StatusCode::OK;
     }
 
-    status_t unsubscribe(VehicleProperty property) {
+    StatusCode unsubscribe(VehicleProperty property) {
         // TODO(pavelm): implement
-        return OK;
+        return StatusCode::OK;
     }
 
 private:
-    status_t getHvacFanSpeed(int32_t areaId, int32_t* outValue);
-    status_t setHvacFanSpeed(int32_t areaId, int32_t value);
+    StatusCode getHvacFanSpeed(int32_t areaId, int32_t* outValue);
+    StatusCode setHvacFanSpeed(int32_t areaId, int32_t value);
 private:
     int32_t fanSpeedRow1Left = 3;
     int32_t fanSpeedRow1Right = 5;
diff --git a/vehicle/2.0/default/tests/SubscriptionManager_test.cpp b/vehicle/2.0/default/tests/SubscriptionManager_test.cpp
index c3db993..19b11e6 100644
--- a/vehicle/2.0/default/tests/SubscriptionManager_test.cpp
+++ b/vehicle/2.0/default/tests/SubscriptionManager_test.cpp
@@ -50,7 +50,7 @@
         {
             SubscribeOptions {
                 .propId = PROP1,
-                .vehicleAreas = val(VehicleAreaZone::ROW_1_LEFT),
+                .vehicleAreas = toInt(VehicleAreaZone::ROW_1_LEFT),
                 .flags = SubscribeFlags::HAL_EVENT
             },
         });
@@ -67,7 +67,7 @@
         {
             SubscribeOptions {
                 .propId = PROP1,
-                .vehicleAreas = val(VehicleAreaZone::ROW_1_LEFT),
+                .vehicleAreas = toInt(VehicleAreaZone::ROW_1_LEFT),
                 .flags = SubscribeFlags::HAL_EVENT
             },
             SubscribeOptions {
@@ -87,7 +87,7 @@
 
     std::list<sp<HalClient>> clientsToProp1() {
         return manager.getSubscribedClients(PROP1,
-                                            val(VehicleAreaZone::ROW_1_LEFT),
+                                            toInt(VehicleAreaZone::ROW_1_LEFT),
                                             SubscribeFlags::DEFAULT);
     }
 
@@ -104,7 +104,7 @@
 
     auto clients = manager.getSubscribedClients(
             PROP1,
-            val(VehicleAreaZone::ROW_1_LEFT),
+            toInt(VehicleAreaZone::ROW_1_LEFT),
             SubscribeFlags::HAL_EVENT);
 
     ASSERT_ALL_EXISTS({cb1, cb2}, extractCallbacks(clients));
@@ -116,21 +116,21 @@
     // Wrong zone
     auto clients = manager.getSubscribedClients(
             PROP1,
-            val(VehicleAreaZone::ROW_2_LEFT),
+            toInt(VehicleAreaZone::ROW_2_LEFT),
             SubscribeFlags::HAL_EVENT);
     ASSERT_TRUE(clients.empty());
 
     // Wrong prop
     clients = manager.getSubscribedClients(
             VehicleProperty::AP_POWER_BOOTUP_REASON,
-            val(VehicleAreaZone::ROW_1_LEFT),
+            toInt(VehicleAreaZone::ROW_1_LEFT),
             SubscribeFlags::HAL_EVENT);
     ASSERT_TRUE(clients.empty());
 
     // Wrong flag
     clients = manager.getSubscribedClients(
             PROP1,
-            val(VehicleAreaZone::ROW_1_LEFT),
+            toInt(VehicleAreaZone::ROW_1_LEFT),
             SubscribeFlags::SET_CALL);
     ASSERT_TRUE(clients.empty());
 }
@@ -140,7 +140,7 @@
 
     auto clients = manager.getSubscribedClients(
             PROP1,
-            val(VehicleAreaZone::ROW_1_LEFT),
+            toInt(VehicleAreaZone::ROW_1_LEFT),
             SubscribeFlags::DEFAULT);
     ASSERT_EQ((size_t) 1, clients.size());
     ASSERT_EQ(cb1, clients.front()->getCallback());
@@ -151,18 +151,18 @@
         {
             SubscribeOptions {
                 .propId = PROP1,
-                .vehicleAreas = val(VehicleAreaZone::ROW_2),
+                .vehicleAreas = toInt(VehicleAreaZone::ROW_2),
                 .flags = SubscribeFlags::DEFAULT
             }
         }));
 
     clients = manager.getSubscribedClients(PROP1,
-                                           val(VehicleAreaZone::ROW_1_LEFT),
+                                           toInt(VehicleAreaZone::ROW_1_LEFT),
                                            SubscribeFlags::DEFAULT);
     ASSERT_ALL_EXISTS({cb1}, extractCallbacks(clients));
 
     clients = manager.getSubscribedClients(PROP1,
-                                           val(VehicleAreaZone::ROW_2),
+                                           toInt(VehicleAreaZone::ROW_2),
                                            SubscribeFlags::DEFAULT);
     ASSERT_ALL_EXISTS({cb1}, extractCallbacks(clients));
 }
diff --git a/vehicle/2.0/default/tests/VehicleHalManager_test.cpp b/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
index 1410ddf..6ef1205 100644
--- a/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
+++ b/vehicle/2.0/default/tests/VehicleHalManager_test.cpp
@@ -22,6 +22,7 @@
 #include <vehicle_hal_manager/VehiclePropConfigIndex.h>
 #include <VehicleHal.h>
 #include <vehicle_hal_manager/VehicleHalManager.h>
+#include <utils/SystemClock.h>
 #include "vehicle_hal_manager/SubscriptionManager.h"
 
 #include "VehicleHalTestUtils.h"
@@ -35,6 +36,9 @@
 
 using namespace std::placeholders;
 
+constexpr char kCarMake[] = "Default Car";
+constexpr int kRetriablePropMockedAttempts = 3;
+
 class MockedVehicleHal : public VehicleHal {
 public:
     MockedVehicleHal() {
@@ -46,35 +50,87 @@
         return mConfigs;
     }
 
-    VehiclePropValuePtr get(VehicleProperty property,
-                 int32_t areaId,
-                 status_t* outStatus) override {
-        *outStatus = OK;
-        return getValuePool()->obtain(mValues[property]);
+    VehiclePropValuePtr get(const VehiclePropValue& requestedPropValue,
+             StatusCode* outStatus) override {
+        *outStatus = StatusCode::OK;
+        VehiclePropValuePtr pValue;
+        VehicleProperty property = requestedPropValue.prop;
+        int32_t areaId = requestedPropValue.areaId;
+
+        switch (property) {
+            case VehicleProperty::INFO_MAKE:
+                pValue = getValuePool()->obtainString(kCarMake);
+                break;
+            case VehicleProperty::INFO_FUEL_CAPACITY:
+                if (fuelCapacityAttemptsLeft-- > 0) {
+                    // Emulate property not ready yet.
+                    *outStatus = StatusCode::TRY_AGAIN;
+                } else {
+                    pValue = getValuePool()->obtainFloat(42.42);
+                }
+                break;
+            default:
+                auto key = makeKey(property, areaId);
+                if (mValues.count(key) == 0) {
+                    ALOGW("");
+                }
+                pValue = getValuePool()->obtain(mValues[key]);
+        }
+
+        if (*outStatus == StatusCode::OK && pValue.get() != nullptr) {
+            pValue->prop = property;
+            pValue->areaId = areaId;
+            pValue->timestamp = elapsedRealtimeNano();
+        }
+
+        return pValue;
     }
 
-    status_t set(const VehiclePropValue& propValue) override {
-        mValues[propValue.prop] = propValue;
-        return OK;
+    StatusCode set(const VehiclePropValue& propValue) override {
+        if (VehicleProperty::MIRROR_FOLD == propValue.prop
+                && mirrorFoldAttemptsLeft-- > 0) {
+            return StatusCode::TRY_AGAIN;
+        }
+
+        mValues[makeKey(propValue)] = propValue;
+        return StatusCode::OK;
     }
 
-    status_t subscribe(VehicleProperty property,
+    StatusCode subscribe(VehicleProperty property,
                        int32_t areas,
                        float sampleRate) override {
-        return OK;
+        return StatusCode::OK;
     }
 
-    status_t unsubscribe(VehicleProperty property) override {
-        return OK;
+    StatusCode unsubscribe(VehicleProperty property) override {
+        return StatusCode::OK;
     }
 
     void sendPropEvent(recyclable_ptr<VehiclePropValue> value) {
         doHalEvent(std::move(value));
     }
 
+    void sendHalError(StatusCode error, VehicleProperty property,
+                      int32_t areaId) {
+        doHalPropertySetError(error, property, areaId);
+    }
+
+public:
+    int fuelCapacityAttemptsLeft = kRetriablePropMockedAttempts;
+    int mirrorFoldAttemptsLeft = kRetriablePropMockedAttempts;
+
+private:
+    int64_t makeKey(const VehiclePropValue& v) const {
+        return makeKey(v.prop, v.areaId);
+    }
+
+    int64_t makeKey(VehicleProperty prop, int32_t area) const {
+        return (static_cast<int64_t>(prop) << 32) | area;
+    }
+
 private:
     std::vector<VehiclePropConfig> mConfigs;
-    std::unordered_map<VehicleProperty, VehiclePropValue> mValues;
+    std::unordered_map<int64_t, VehiclePropValue> mValues;
 };
 
 class VehicleHalManagerTest : public ::testing::Test {
@@ -90,37 +146,70 @@
         manager.reset(nullptr);
         hal.reset(nullptr);
     }
+public:
+    void invokeGet(VehicleProperty property, int32_t areaId) {
+        VehiclePropValue requestedValue {};
+        requestedValue.prop = property;
+        requestedValue.areaId = areaId;
+
+        invokeGet(requestedValue);
+    }
+
+    void invokeGet(const VehiclePropValue& requestedPropValue) {
+        actualValue = VehiclePropValue {};  // reset previous values
+
+        StatusCode refStatus;
+        VehiclePropValue refValue;
+        bool called = false;
+        manager->get(requestedPropValue, [&refStatus, &refValue, &called]
+            (StatusCode status, const VehiclePropValue& value) {
+            refStatus = status;
+            refValue = value;
+            called = true;
+        });
+        ASSERT_TRUE(called) << "callback wasn't called for prop: "
+                            << enumToHexString(requestedPropValue.prop);
+
+        actualValue = refValue;
+        actualStatusCode = refStatus;
+    }
 
 public:
+    VehiclePropValue actualValue;
+    StatusCode actualStatusCode;
+
     VehiclePropValuePool* objectPool;
     std::unique_ptr<MockedVehicleHal> hal;
     std::unique_ptr<VehicleHalManager> manager;
 };
 
-class HalClientVectorTest : public ::testing::Test {
-public:
-    HalClientVector clients;
-};
-
 TEST_F(VehicleHalManagerTest, getPropConfigs) {
     hidl_vec<VehicleProperty> properties = init_hidl_vec(
         { VehicleProperty::HVAC_FAN_SPEED,VehicleProperty::INFO_MAKE} );
     bool called = false;
+
     manager->getPropConfigs(properties,
-                            [&called] (const hidl_vec<VehiclePropConfig>& c) {
+            [&called] (StatusCode status,
+                       const hidl_vec<VehiclePropConfig>& c) {
+        ASSERT_EQ(StatusCode::OK, status);
         ASSERT_EQ(2u, c.size());
         called = true;
     });
+
     ASSERT_TRUE(called);  // Verify callback received.
 
     called = false;
     manager->getPropConfigs(init_hidl_vec({VehicleProperty::HVAC_FAN_SPEED}),
-                            [&called] (const hidl_vec<VehiclePropConfig>& c) {
+            [&called] (StatusCode status,
+                       const hidl_vec<VehiclePropConfig>& c) {
+        ASSERT_EQ(StatusCode::OK, status);
         ASSERT_EQ(1u, c.size());
         ASSERT_EQ(toString(kVehicleProperties[1]), toString(c[0]));
         called = true;
     });
     ASSERT_TRUE(called);  // Verify callback received.
+
+    // TODO(pavelm): add case case when property was not declared.
 }
 
 TEST_F(VehicleHalManagerTest, getAllPropConfigs) {
@@ -138,6 +227,25 @@
     ASSERT_TRUE(called);  // Verify callback received.
 }
 
+TEST_F(VehicleHalManagerTest, halErrorEvent) {
+    const VehicleProperty PROP = VehicleProperty::DISPLAY_BRIGHTNESS;
+
+    sp<MockedVehicleCallback> cb = new MockedVehicleCallback();
+
+    hidl_vec<SubscribeOptions> options = init_hidl_vec(
+        {
+            SubscribeOptions {
+                .propId = PROP,
+                .flags = SubscribeFlags::DEFAULT
+            },
+        });
+
+    StatusCode res = manager->subscribe(cb, options);
+    ASSERT_EQ(StatusCode::OK, res);
+
+    hal->sendHalError(StatusCode::TRY_AGAIN, PROP, 0 /* area id*/);
+}
+
 TEST_F(VehicleHalManagerTest, subscribe) {
     const VehicleProperty PROP = VehicleProperty::DISPLAY_BRIGHTNESS;
 
@@ -161,9 +269,9 @@
     auto& receivedEnvents = cb->getReceivedEvents();
 
     ASSERT_TRUE(cb->waitForExpectedEvents(0)) << " Unexpected events received: "
-              << receivedEnvents.size()
-              << (receivedEnvents.size() > 0
-                      ? toString(receivedEnvents.front()[0]) : "");
+                                              << receivedEnvents.size()
+                                              << (receivedEnvents.size() > 0
+                                                  ? toString(receivedEnvents.front()[0]) : "");
 
     auto subscribedValue = objectPool->obtain(VehiclePropertyType::INT32);
     subscribedValue->prop = PROP;
@@ -174,13 +282,143 @@
     hal->sendPropEvent(std::move(subscribedValue));
 
     ASSERT_TRUE(cb->waitForExpectedEvents(1)) << "Events received: "
-            << receivedEnvents.size();
+                                              << receivedEnvents.size();
 
     ASSERT_EQ(toString(actualValue),
               toString(cb->getReceivedEvents().front()[0]));
 }
 
-TEST_F(HalClientVectorTest, basic) {
+TEST_F(VehicleHalManagerTest, subscribe_WriteOnly) {
+    const VehicleProperty PROP = VehicleProperty::HVAC_SEAT_TEMPERATURE;
+
+    sp<MockedVehicleCallback> cb = new MockedVehicleCallback();
+
+    hidl_vec<SubscribeOptions> options = init_hidl_vec(
+        {
+            SubscribeOptions {
+                .propId = PROP,
+                .flags = SubscribeFlags::HAL_EVENT
+            },
+        });
+
+    StatusCode res = manager->subscribe(cb, options);
+    // Unable to subscribe on Hal Events for write-only properties.
+    ASSERT_EQ(StatusCode::INVALID_ARG, res);
+
+
+    options[0].flags = SubscribeFlags::SET_CALL;
+
+    res = manager->subscribe(cb, options);
+    // OK to subscribe on SET method call for write-only properties.
+    ASSERT_EQ(StatusCode::OK, res);
+}
+
+TEST_F(VehicleHalManagerTest, get_StaticString) {
+    invokeGet(VehicleProperty::INFO_MAKE, 0);
+
+    ASSERT_EQ(StatusCode::OK, actualStatusCode);
+    ASSERT_EQ(VehicleProperty::INFO_MAKE, actualValue.prop);
+    ASSERT_STREQ(kCarMake, actualValue.value.stringValue.c_str());
+}
+
+TEST_F(VehicleHalManagerTest, get_NegativeCases) {
+    // Write-only property must fail.
+    invokeGet(VehicleProperty::HVAC_SEAT_TEMPERATURE, 0);
+    ASSERT_EQ(StatusCode::INVALID_ARG, actualStatusCode);
+
+    // Unknown property must fail.
+    invokeGet(VehicleProperty::MIRROR_Z_MOVE, 0);
+    ASSERT_EQ(StatusCode::INVALID_ARG, actualStatusCode);
+}
+
+TEST_F(VehicleHalManagerTest, get_Retriable) {
+    actualStatusCode = StatusCode::TRY_AGAIN;
+    int attempts = 0;
+    while (StatusCode::TRY_AGAIN == actualStatusCode && ++attempts < 10) {
+        invokeGet(VehicleProperty::INFO_FUEL_CAPACITY, 0);
+
+    }
+    ASSERT_EQ(StatusCode::OK, actualStatusCode);
+    ASSERT_EQ(kRetriablePropMockedAttempts + 1, attempts);
+    ASSERT_FLOAT_EQ(42.42, actualValue.value.floatValues[0]);
+}
+
+TEST_F(VehicleHalManagerTest, set_Basic) {
+    const auto PROP = VehicleProperty::DISPLAY_BRIGHTNESS;
+    const auto VAL = 7;
+
+    auto expectedValue = hal->getValuePool()->obtainInt32(VAL);
+    expectedValue->prop = PROP;
+    expectedValue->areaId = 0;
+
+    actualStatusCode = manager->set(*expectedValue.get());
+    ASSERT_EQ(StatusCode::OK, actualStatusCode);
+
+    invokeGet(PROP, 0);
+    ASSERT_EQ(StatusCode::OK, actualStatusCode);
+    ASSERT_EQ(PROP, actualValue.prop);
+    ASSERT_EQ(VAL, actualValue.value.int32Values[0]);
+}
+
+TEST_F(VehicleHalManagerTest, set_DifferentAreas) {
+    const auto PROP = VehicleProperty::HVAC_FAN_SPEED;
+    const auto VAL1 = 1;
+    const auto VAL2 = 2;
+    const auto AREA1 = toInt(VehicleAreaZone::ROW_1_LEFT);
+    const auto AREA2 = toInt(VehicleAreaZone::ROW_1_RIGHT);
+
+    {
+        auto expectedValue1 = hal->getValuePool()->obtainInt32(VAL1);
+        expectedValue1->prop = PROP;
+        expectedValue1->areaId = AREA1;
+        actualStatusCode = manager->set(*expectedValue1.get());
+        ASSERT_EQ(StatusCode::OK, actualStatusCode);
+
+        auto expectedValue2 = hal->getValuePool()->obtainInt32(VAL2);
+        expectedValue2->prop = PROP;
+        expectedValue2->areaId = AREA2;
+        actualStatusCode = manager->set(*expectedValue2.get());
+        ASSERT_EQ(StatusCode::OK, actualStatusCode);
+    }
+
+    {
+        invokeGet(PROP, AREA1);
+        ASSERT_EQ(StatusCode::OK, actualStatusCode);
+        ASSERT_EQ(PROP, actualValue.prop);
+        ASSERT_EQ(AREA1, actualValue.areaId);
+        ASSERT_EQ(VAL1, actualValue.value.int32Values[0]);
+
+        invokeGet(PROP, AREA2);
+        ASSERT_EQ(StatusCode::OK, actualStatusCode);
+        ASSERT_EQ(PROP, actualValue.prop);
+        ASSERT_EQ(AREA2, actualValue.areaId);
+        ASSERT_EQ(VAL2, actualValue.value.int32Values[0]);
+    }
+}
+
+TEST_F(VehicleHalManagerTest, set_Retriable) {
+    const auto PROP = VehicleProperty::MIRROR_FOLD;
+
+    auto v = hal->getValuePool()->obtainBoolean(true);
+    v->prop = PROP;
+    v->areaId = 0;
+
+    actualStatusCode = StatusCode::TRY_AGAIN;
+    int attempts = 0;
+    while (StatusCode::TRY_AGAIN == actualStatusCode && ++attempts < 10) {
+        actualStatusCode = manager->set(*v.get());
+    }
+
+    ASSERT_EQ(StatusCode::OK, actualStatusCode);
+    ASSERT_EQ(kRetriablePropMockedAttempts + 1, attempts);
+
+    invokeGet(PROP, 0);
+    ASSERT_EQ(StatusCode::OK, actualStatusCode);
+    ASSERT_TRUE(actualValue.value.int32Values[0]);
+}
+
+TEST(HalClientVectorTest, basic) {
+    HalClientVector clients;
     sp<IVehicleCallback> callback1 = new MockedVehicleCallback();
 
     sp<HalClient> c1 = new HalClient(callback1, 10, 20);
diff --git a/vehicle/2.0/default/tests/VehicleHalTestUtils.h b/vehicle/2.0/default/tests/VehicleHalTestUtils.h
index b3b3ffa..16d0be9 100644
--- a/vehicle/2.0/default/tests/VehicleHalTestUtils.h
+++ b/vehicle/2.0/default/tests/VehicleHalTestUtils.h
@@ -44,18 +44,37 @@
         .supportedAreas = static_cast<int32_t>(
             VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT),
         .areaConfigs = init_hidl_vec({
-                                         VehicleAreaConfig {
-                                             .areaId = val(
-                                                 VehicleAreaZone::ROW_2_LEFT),
-                                             .minInt32Value = 1,
-                                             .maxInt32Value = 7},
-                                         VehicleAreaConfig {
-                                             .areaId = val(
-                                                 VehicleAreaZone::ROW_1_RIGHT),
-                                             .minInt32Value = 1,
-                                             .maxInt32Value = 5,
-                                         }
-                                     }),
+             VehicleAreaConfig {
+                 .areaId = toInt(VehicleAreaZone::ROW_1_LEFT),
+                 .minInt32Value = 1,
+                 .maxInt32Value = 7},
+             VehicleAreaConfig {
+                 .areaId = toInt(VehicleAreaZone::ROW_1_RIGHT),
+                 .minInt32Value = 1,
+                 .maxInt32Value = 5,
+             }
+         }),
+    },
+
+    // Write-only property
+    {
+        .prop = VehicleProperty::HVAC_SEAT_TEMPERATURE,
+        .access = VehiclePropertyAccess::WRITE,
+        .changeMode = VehiclePropertyChangeMode::ON_SET,
+        .permissionModel = VehiclePermissionModel::NO_RESTRICTION,
+        .supportedAreas = static_cast<int32_t>(
+            VehicleAreaZone::ROW_1_LEFT | VehicleAreaZone::ROW_1_RIGHT),
+        .areaConfigs = init_hidl_vec({
+             VehicleAreaConfig {
+                 .areaId = toInt(VehicleAreaZone::ROW_1_LEFT),
+                 .minInt32Value = 64,
+                 .maxInt32Value = 80},
+             VehicleAreaConfig {
+                 .areaId = toInt(VehicleAreaZone::ROW_1_RIGHT),
+                 .minInt32Value = 64,
+                 .maxInt32Value = 80,
+             }
+         }),
     },
 
     {
@@ -82,12 +101,23 @@
                                              .maxInt32Value = 10
                                          }
                                      })
+    },
+
+    {
+        .prop = VehicleProperty::MIRROR_FOLD,
+        .access = VehiclePropertyAccess::READ_WRITE,
+        .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
+        .permissionModel = VehiclePermissionModel::OEM_ONLY,
+
     }
 };
 
 constexpr auto kTimeout = std::chrono::milliseconds(500);
 
 class MockedVehicleCallback : public IVehicleCallback {
+private:
+    using MuxGuard = std::lock_guard<std::mutex>;
+    using HidlVecOfValues = hidl_vec<VehiclePropValue>;
 public:
     // Methods from ::android::hardware::vehicle::V2_0::IVehicleCallback follow.
     Return<void> onPropertyEvent(
@@ -102,9 +132,9 @@
     Return<void> onPropertySet(const VehiclePropValue& value) override {
         return Return<void>();
     }
-    Return<void> onError(StatusCode errorCode,
-                         VehicleProperty propId,
-                         VehiclePropertyOperation operation) override {
+    Return<void> onPropertySetError(StatusCode errorCode,
+                                    VehicleProperty propId,
+                                    int32_t areaId) override {
         return Return<void>();
     }
 
@@ -129,16 +159,14 @@
         mReceivedEvents.clear();
     }
 
-    const std::vector<hidl_vec<VehiclePropValue>>& getReceivedEvents() {
+    const std::vector<HidlVecOfValues>& getReceivedEvents() {
         return mReceivedEvents;
     }
 
 private:
-    using MuxGuard = std::lock_guard<std::mutex>;
-
     std::mutex mLock;
     std::condition_variable mEventCond;
-    std::vector<hidl_vec<VehiclePropValue>> mReceivedEvents;
+    std::vector<HidlVecOfValues> mReceivedEvents;
 };
 
 template<typename T>
@@ -172,7 +200,7 @@
 
 template<typename T>
 inline std::string enumToHexString(T value) {
-    return hexString(val(value));
+    return hexString(toInt(value));
 }
 
 template <typename T>
diff --git a/vehicle/2.0/default/vehicle_hal_manager/ConcurrentQueue.h b/vehicle/2.0/default/vehicle_hal_manager/ConcurrentQueue.h
index a64ef46..485f3dc 100644
--- a/vehicle/2.0/default/vehicle_hal_manager/ConcurrentQueue.h
+++ b/vehicle/2.0/default/vehicle_hal_manager/ConcurrentQueue.h
@@ -113,14 +113,15 @@
 
     void requestStop() {
         if (mState.exchange(State::STOP_REQUESTED) != State::RUNNING) {
-              mState = State::STOPPED;
-          }
+            mState = State::STOPPED;
+            mCondStopped.notify_one();
+        }
     }
 
     void waitStopped() {
         std::unique_lock<std::mutex> g(mLock);
         while (State::STOPPED != mState) {
-            mCondStopped.wait_for(g, std::chrono::seconds(1));
+            mCondStopped.wait(g);
         }
     }
 
diff --git a/vehicle/2.0/default/vehicle_hal_manager/VehicleCallback.cpp b/vehicle/2.0/default/vehicle_hal_manager/VehicleCallback.cpp
deleted file mode 100644
index 985b7dc..0000000
--- a/vehicle/2.0/default/vehicle_hal_manager/VehicleCallback.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2016 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 "VehicleCallback.h"
-
-namespace android {
-namespace hardware {
-namespace vehicle {
-namespace V2_0 {
-namespace implementation {
-
-// Methods from ::android::hardware::vehicle::V2_0::IVehicleCallback follow.
-Return<void> VehicleCallback::onPropertyEvent(const hidl_vec<VehiclePropValue>& value)  {
-    // TODO(pavelm): add default implementation
-    return Void();
-}
-
-// Methods from ::android::hardware::vehicle::V2_0::IVehicleCallback follow.
-Return<void> VehicleCallback::onPropertySet(const VehiclePropValue& value)  {
-    // TODO(pavelm): add default implementation
-    return Void();
-}
-
-Return<void> VehicleCallback::onError(StatusCode errorCode,
-                                      VehicleProperty propId,
-                                      VehiclePropertyOperation operation)  {
-    // TODO(pavelm): add default implementation
-    return Void();
-}
-
-
-IVehicleCallback* HIDL_FETCH_IVehicleCallback(const char* /* name */) {
-    return new VehicleCallback();
-}
-
-} // namespace implementation
-}  // namespace V2_0
-}  // namespace vehicle
-}  // namespace hardware
-}  // namespace android
diff --git a/vehicle/2.0/default/vehicle_hal_manager/VehicleCallback.h b/vehicle/2.0/default/vehicle_hal_manager/VehicleCallback.h
deleted file mode 100644
index d037c94..0000000
--- a/vehicle/2.0/default/vehicle_hal_manager/VehicleCallback.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright (C) 2016 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 HIDL_GENERATED_android_hardware_vehicle_V2_0_VehicleCallback_H_
-#define HIDL_GENERATED_android_hardware_vehicle_V2_0_VehicleCallback_H_
-
-#include <android/hardware/vehicle/2.0/IVehicleCallback.h>
-#include <hidl/Status.h>
-
-#include <hidl/MQDescriptor.h>
-namespace android {
-namespace hardware {
-namespace vehicle {
-namespace V2_0 {
-namespace implementation {
-
-using ::android::hardware::vehicle::V2_0::IVehicleCallback;
-using ::android::hardware::vehicle::V2_0::VehiclePropValue;
-using ::android::hardware::vehicle::V2_0::VehicleProperty;
-using ::android::hardware::vehicle::V2_0::VehiclePropertyOperation;
-using ::android::hardware::Return;
-using ::android::hardware::Void;
-using ::android::hardware::hidl_vec;
-using ::android::hardware::hidl_string;
-using ::android::sp;
-
-struct VehicleCallback : public IVehicleCallback {
-    // Methods from ::android::hardware::vehicle::V2_0::IVehicleCallback follow.
-    Return<void> onPropertyEvent(const hidl_vec<VehiclePropValue>& values)  override;
-    Return<void> onPropertySet(const VehiclePropValue& value)  override;
-    Return<void> onError(StatusCode errorCode, VehicleProperty propId, VehiclePropertyOperation operation)  override;
-
-};
-
-extern "C" IVehicleCallback* HIDL_FETCH_IVehicleCallback(const char* name);
-
-}  // namespace implementation
-}  // namespace V2_0
-}  // namespace vehicle
-}  // namespace hardware
-}  // namespace android
-
-#endif  // HIDL_GENERATED_android_hardware_vehicle_V2_0_VehicleCallback_H_
diff --git a/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.cpp b/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.cpp
index 8638131..a84f991 100644
--- a/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.cpp
+++ b/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.cpp
@@ -20,6 +20,8 @@
 #include <utils/Errors.h>
 #include <utils/Log.h>
 #include <hidl/Status.h>
+#include <future>
+#include <bitset>
 
 #include "VehicleHalManager.h"
 
@@ -32,6 +34,8 @@
 
 constexpr std::chrono::milliseconds kHalEventBatchingTimeWindow(10);
 
+const VehiclePropValue kEmptyValue{};
+
 /**
  * Indicates what's the maximum size of hidl_vec<VehiclePropValue> we want
  * to store in reusable object pool.
@@ -40,6 +44,7 @@
 
 Return<void> VehicleHalManager::getAllPropConfigs(
         getAllPropConfigs_cb _hidl_cb) {
+    ALOGI("getAllPropConfigs called");
     hidl_vec<VehiclePropConfig> hidlConfigs;
     auto& halConfig = mConfigIndex->getAllConfigs();
 
@@ -47,45 +52,72 @@
             const_cast<VehiclePropConfig *>(halConfig.data()),
             halConfig.size());
 
+    ALOGI("getAllPropConfigs calling callback");
     _hidl_cb(hidlConfigs);
 
-    return hardware::Return<void>();
+    ALOGI("getAllPropConfigs done");
+    return Void();
 }
 
 Return<void> VehicleHalManager::getPropConfigs(
         const hidl_vec<VehicleProperty> &properties,
         getPropConfigs_cb _hidl_cb) {
-    Vector<VehiclePropConfig> configs;
+    std::vector<VehiclePropConfig> configs;
     for (size_t i = 0; i < properties.size(); i++) {
         VehicleProperty prop = properties[i];
         if (mConfigIndex->hasConfig(prop)) {
-            configs.add(mConfigIndex->getConfig(prop));
+            configs.push_back(mConfigIndex->getConfig(prop));
         } else {
-            // TODO: return error
+            ALOGW("Requested config for undefined property: 0x%x", prop);
+            _hidl_cb(StatusCode::INVALID_ARG, hidl_vec<VehiclePropConfig>());
         }
     }
 
-    hidl_vec<VehiclePropConfig> hidlConfigs;
-    hidlConfigs.setToExternal(
-            const_cast<VehiclePropConfig*>(configs.array()),
-            configs.size());
+    _hidl_cb(StatusCode::OK, configs);
 
-    _hidl_cb(hidlConfigs);
-
-    return hardware::Return<void>();
+    return Void();
 }
 
 Return<void> VehicleHalManager::get(
-        VehicleProperty propId, int32_t areaId, get_cb _hidl_cb) {
+        const VehiclePropValue& requestedPropValue, get_cb _hidl_cb) {
+    const auto* config = getPropConfigOrNull(requestedPropValue.prop);
+    if (config == nullptr) {
+        ALOGE("Failed to get value: config not found, property: 0x%x",
+              requestedPropValue.prop);
+        _hidl_cb(StatusCode::INVALID_ARG, kEmptyValue);
+        return Void();
+    }
 
-    return hardware::Return<void>();
+    if (!checkReadPermission(*config, getCallee())) {
+        _hidl_cb(StatusCode::INVALID_ARG, kEmptyValue);
+        return Void();
+    }
+
+    StatusCode status;
+    auto value = mHal->get(requestedPropValue, &status);
+    _hidl_cb(status, value.get() ? *value : kEmptyValue);
+
+
+    return Void();
 }
 
 Return<StatusCode> VehicleHalManager::set(const VehiclePropValue &value) {
-    // TODO(pavelm): check permission, etc
-    // TODO(pavelm): check SET subscription
-    // TODO(pavelm): propagate SET call to VehicleHal
-    return hardware::Return<StatusCode>(StatusCode::OK);
+    auto prop = value.prop;
+    const auto* config = getPropConfigOrNull(prop);
+    if (config == nullptr) {
+        ALOGE("Failed to set value: config not found, property: 0x%x", prop);
+        return StatusCode::INVALID_ARG;
+    }
+
+    if (!checkWritePermission(*config, getCallee())) {
+        return StatusCode::INVALID_ARG;
+    }
+
+    handlePropertySetEvent(value);
+
+    auto status = mHal->set(value);
+
+    return Return<StatusCode>(status);
 }
 
 Return<StatusCode> VehicleHalManager::subscribe(
@@ -96,45 +128,40 @@
         SubscribeOptions& ops = verifiedOptions[i];
         VehicleProperty prop = ops.propId;
 
-        if (!mConfigIndex->hasConfig(prop)) {
-            ALOGE("Failed to subscribe: config not found for property: 0x%x",
+        const auto* config = getPropConfigOrNull(prop);
+        if (config == nullptr) {
+            ALOGE("Failed to subscribe: config not found, property: 0x%x",
                   prop);
-            return invalidArg();
-        }
-        const VehiclePropConfig& config = mConfigIndex->getConfig(prop);
-
-        if (!isSubscribable(config)) {
-            ALOGE("Failed to subscribe: property is not subscribable: 0x%x",
-                  prop);
-            return invalidArg();
+            return StatusCode::INVALID_ARG;
         }
 
+        if (!isSubscribable(*config, ops.flags)) {
+            ALOGE("Failed to subscribe: property 0x%x is not subscribable",
+                  prop);
+            return StatusCode::INVALID_ARG;
+        }
 
         int32_t areas = isGlobalProp(prop) ? 0 : ops.vehicleAreas;
-        if (areas != 0 && ((areas & config.supportedAreas) != areas)) {
+        if (areas != 0 && ((areas & config->supportedAreas) != areas)) {
             ALOGE("Failed to subscribe property 0x%x. Requested areas 0x%x are "
                   "out of supported range of 0x%x", prop, ops.vehicleAreas,
-                  config.supportedAreas);
-            return invalidArg();
+                  config->supportedAreas);
+            return StatusCode::INVALID_ARG;
         }
 
         ops.vehicleAreas = areas;
-        ops.sampleRate = checkSampleRate(config, ops.sampleRate);
+        ops.sampleRate = checkSampleRate(*config, ops.sampleRate);
     }
 
-     std::list<SubscribeOptions> updatedOptions =
-         mSubscriptionManager.addOrUpdateSubscription(callback,
-                                                      verifiedOptions);
+    std::list<SubscribeOptions> updatedOptions =
+        mSubscriptionManager.addOrUpdateSubscription(callback, verifiedOptions);
 
     for (auto opt : updatedOptions) {
         mHal->subscribe(opt.propId, opt.vehicleAreas, opt.sampleRate);
     }
-
-    // TODO(pavelm): call immediately onHalEvent method during subscription
-    // when appropriate
     // TODO(pavelm): link to death callback (not implemented yet in HIDL)
 
-    return ok();
+    return StatusCode::OK;
 }
 
 Return<StatusCode> VehicleHalManager::unsubscribe(
@@ -142,12 +169,12 @@
     if (mSubscriptionManager.unsubscribe(callback, propId)) {
         mHal->unsubscribe(propId);
     }
-    return ok();
+    return StatusCode::OK;
 }
 
 Return<void> VehicleHalManager::debugDump(IVehicle::debugDump_cb _hidl_cb) {
     _hidl_cb("");
-    return hardware::Return<void>();
+    return Void();
 }
 
 void VehicleHalManager::init() {
@@ -155,6 +182,7 @@
 
     mHidlVecOfVehiclePropValuePool.resize(kMaxHidlVecOfVehiclPropValuePoolSize);
 
+
     mBatchingConsumer.run(&mEventQueue,
                           kHalEventBatchingTimeWindow,
                           std::bind(&VehicleHalManager::onBatchHalEvent,
@@ -162,7 +190,8 @@
 
     mHal->init(&mValueObjectPool,
                std::bind(&VehicleHalManager::onHalEvent, this, _1),
-               std::bind(&VehicleHalManager::onHalError, this, _1, _2, _3));
+               std::bind(&VehicleHalManager::onHalPropertySetError, this,
+                         _1, _2, _3));
 
     // Initialize index with vehicle configurations received from VehicleHal.
     mConfigIndex.reset(new VehiclePropConfigIndex(mHal->listProperties()));
@@ -181,9 +210,15 @@
     mEventQueue.push(std::move(v));
 }
 
-void VehicleHalManager::onHalError(VehicleProperty property, status_t errorCode,
-                                   VehiclePropertyOperation operation) {
-    // TODO(pavelm): find subscribed clients and propagate error
+void VehicleHalManager::onHalPropertySetError(StatusCode errorCode,
+                                              VehicleProperty property,
+                                              int32_t areaId) {
+    const auto& clients = mSubscriptionManager.getSubscribedClients(
+            property, 0, SubscribeFlags::HAL_EVENT);
+
+    for (auto client : clients) {
+        client->getCallback()->onPropertySetError(errorCode, property, areaId);
+    }
 }
 
 void VehicleHalManager::onBatchHalEvent(
@@ -192,7 +227,7 @@
             values, SubscribeFlags::HAL_EVENT);
 
     for (const HalClientValues& cv : clientValues) {
-        int vecSize = cv.values.size();
+        auto vecSize = cv.values.size();
         hidl_vec<VehiclePropValue> vec;
         if (vecSize < kMaxHidlVecOfVehiclPropValuePoolSize) {
             vec.setToExternal(&mHidlVecOfVehiclePropValuePool[0], vecSize);
@@ -236,9 +271,12 @@
     return sampleRate;  // Provided sample rate was good, no changes.
 }
 
-bool VehicleHalManager::isSubscribable(const VehiclePropConfig& config) {
-    if (!(config.access & VehiclePropertyAccess::READ)) {
-        ALOGW("Cannot subscribe, property 0x%x is write only", config.prop);
+bool VehicleHalManager::isSubscribable(const VehiclePropConfig& config,
+                                       SubscribeFlags flags) {
+    bool isReadable = config.access & VehiclePropertyAccess::READ;
+
+    if (!isReadable && (SubscribeFlags::HAL_EVENT & flags)) {
+        ALOGW("Cannot subscribe, property 0x%x is not readable", config.prop);
         return false;
     }
     if (config.changeMode == VehiclePropertyChangeMode::STATIC) {
@@ -254,6 +292,49 @@
     return true;
 }
 
+bool VehicleHalManager::checkWritePermission(const VehiclePropConfig &config,
+                                             const Callee& callee) {
+    if (!(config.access & VehiclePropertyAccess::WRITE)) {
+        ALOGW("Property 0%x has no write access", config.prop);
+        return false;
+    }
+    //TODO(pavelm): check pid/uid has write access
+    return true;
+}
+
+bool VehicleHalManager::checkReadPermission(const VehiclePropConfig &config,
+                                            const Callee& callee) {
+    if (!(config.access & VehiclePropertyAccess::READ)) {
+        ALOGW("Property 0%x has no read access", config.prop);
+        return false;
+    }
+    //TODO(pavelm): check pid/uid has read access
+    return true;
+}
+
+void VehicleHalManager::handlePropertySetEvent(const VehiclePropValue& value) {
+    auto clients = mSubscriptionManager.getSubscribedClients(
+            value.prop, value.areaId, SubscribeFlags::SET_CALL);
+    for (auto client : clients) {
+        client->getCallback()->onPropertySet(value);
+    }
+}
+
+const VehiclePropConfig* VehicleHalManager::getPropConfigOrNull(
+        VehicleProperty prop) const {
+    return mConfigIndex->hasConfig(prop)
+           ? &mConfigIndex->getConfig(prop) : nullptr;
+}
+
+Callee VehicleHalManager::getCallee() {
+    Callee callee;
+    IPCThreadState* self = IPCThreadState::self();
+    callee.pid = self->getCallingPid();
+    callee.uid = self->getCallingUid();
+
+    return callee;
+}
+
 }  // namespace V2_0
 }  // namespace vehicle
 }  // namespace hardware
diff --git a/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.h b/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.h
index 0353a15..8353679 100644
--- a/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.h
+++ b/vehicle/2.0/default/vehicle_hal_manager/VehicleHalManager.h
@@ -40,6 +40,11 @@
 namespace vehicle {
 namespace V2_0 {
 
+struct Callee {
+    pid_t pid;
+    uid_t uid;
+};
+
 /**
  * This class is a thick proxy between IVehicle HIDL interface and vendor's implementation.
  *
@@ -62,7 +67,8 @@
     Return<void> getAllPropConfigs(getAllPropConfigs_cb _hidl_cb)  override;
     Return<void> getPropConfigs(const hidl_vec<VehicleProperty>& properties,
                                 getPropConfigs_cb _hidl_cb)  override;
-    Return<void> get(VehicleProperty propId, int32_t areaId, get_cb _hidl_cb)  override;
+    Return<void> get(const VehiclePropValue& requestedPropValue,
+                     get_cb _hidl_cb)  override;
     Return<StatusCode> set(const VehiclePropValue& value)  override;
     Return<StatusCode> subscribe(const sp<IVehicleCallback>& callback,
                                 const hidl_vec<SubscribeOptions>& options)  override;
@@ -72,29 +78,34 @@
 
 private:
     using VehiclePropValuePtr = VehicleHal::VehiclePropValuePtr;
+    // Returns true if needs to call again shortly.
+    using RetriableAction = std::function<bool()>;
 
     // ---------------------------------------------------------------------------------------------
     // Events received from VehicleHal
     void onHalEvent(VehiclePropValuePtr  v);
-    void onHalError(VehicleProperty property,
-                    status_t errorCode,
-                    VehiclePropertyOperation operation);
+    void onHalPropertySetError(StatusCode errorCode, VehicleProperty property,
+                               int32_t areaId);
 
     // ---------------------------------------------------------------------------------------------
     // This method will be called from BatchingConsumer thread
     void onBatchHalEvent(const std::vector<VehiclePropValuePtr >& values);
 
-    static bool isSubscribable(const VehiclePropConfig& config);
+    void handlePropertySetEvent(const VehiclePropValue& value);
+
+    const VehiclePropConfig* getPropConfigOrNull(VehicleProperty prop) const;
+
+    static bool isSubscribable(const VehiclePropConfig& config,
+                               SubscribeFlags flags);
     static bool isSampleRateFixed(VehiclePropertyChangeMode mode);
     static float checkSampleRate(const VehiclePropConfig& config,
                                  float sampleRate);
+    static bool checkWritePermission(const VehiclePropConfig &config,
+                                     const Callee& callee);
+    static bool checkReadPermission(const VehiclePropConfig &config,
+                                    const Callee& callee);
 
-    static Return<StatusCode> ok() {
-        return Return<StatusCode>(StatusCode::OK);
-    }
-    static Return<StatusCode> invalidArg() {
-        return Return<StatusCode>(StatusCode::INVALID_ARG);
-    }
+    static Callee getCallee();
 
 private:
     VehicleHal* mHal;
diff --git a/vehicle/2.0/default/vehicle_hal_manager/VehicleObjectPool.h b/vehicle/2.0/default/vehicle_hal_manager/VehicleObjectPool.h
index 02bfb3f..b4a4b3e 100644
--- a/vehicle/2.0/default/vehicle_hal_manager/VehicleObjectPool.h
+++ b/vehicle/2.0/default/vehicle_hal_manager/VehicleObjectPool.h
@@ -194,6 +194,10 @@
     }
 
     RecyclableType obtain(const VehiclePropValue& src) {
+        if (src.prop == VehicleProperty::INVALID) {
+            ALOGE("Unable to obtain an object from pool for unknown property");
+            return RecyclableType();
+        }
         VehiclePropertyType type = getPropType(src.prop);
         size_t vecSize = getVehicleRawValueVectorSize(src.value, type);;
         auto dest = obtain(type, vecSize);
@@ -206,6 +210,10 @@
         return dest;
     }
 
+    RecyclableType obtainBoolean(bool value) {
+        return obtainInt32(value);
+    }
+
     RecyclableType obtainInt32(int32_t value) {
         auto val = obtain(VehiclePropertyType::INT32);
         val->value.int32Values[0] = value;
diff --git a/vehicle/2.0/default/vehicle_hal_manager/VehicleUtils.h b/vehicle/2.0/default/vehicle_hal_manager/VehicleUtils.h
index f23a235..5751eb1 100644
--- a/vehicle/2.0/default/vehicle_hal_manager/VehicleUtils.h
+++ b/vehicle/2.0/default/vehicle_hal_manager/VehicleUtils.h
@@ -54,7 +54,7 @@
 
 /** Returns underlying (integer) value for given enum. */
 template <typename ENUM>
-inline typename std::underlying_type<ENUM>::type val(ENUM const value) {
+inline typename std::underlying_type<ENUM>::type toInt(ENUM const value) {
     return static_cast<typename std::underlying_type<ENUM>::type>(value);
 }
 
diff --git a/vehicle/2.0/types.hal b/vehicle/2.0/types.hal
index 03c1021..adcc90c 100644
--- a/vehicle/2.0/types.hal
+++ b/vehicle/2.0/types.hal
@@ -611,20 +611,24 @@
      * Property to control audio volume of each audio context.
      *
      * VehiclePropConfig
-     *   configArray[0] : bit flags of all supported audio contexts. If this
-     *                     is 0, audio volume is controlled per physical stream
+     *   configArray[0] : bit flags of all supported audio contexts from
+     *                    VehicleAudioContextFlag. If this is 0, audio volume is
+     *                    controlled per physical stream.
      *   configArray[1] : flags defined in VehicleAudioVolumeCapabilityFlag to
-     *                     represent audio module's capability.
+     *                    represent audio module's capability.
+     *   configArray[2..3] : reserved
+     *   configArray[4..N+3] : maximum values for each audio context, where N is
+     *                         the number of audio contexts provided in
+     *                         configArray[0], minimum value is always 0 which
+     *                         indicates mute state.
      *
      * Data type looks like:
      *   int32Values[0] : stream context as defined in VehicleAudioContextFlag.
      *                    If only physical stream is supported
      *                    (configArray[0] == 0), this must represent physical
-                          stream number.
-     *   int32Values[1] : volume level, valid range is 0 to int32MaxValue
-     *                    defined in config.
-     *                    0 must be mute state. int32MinValue config must be
-     *                    always 0.
+     *                    stream number.
+     *   int32Values[1] : volume level, valid range is 0 (mute) to max level
+     *                    defined in the config.
      *   int32Values[2] : One of VehicleAudioVolumeState.
      *
      * This property requires per stream based get. HAL implementation must
@@ -765,7 +769,7 @@
      * will be set to 0x2|0x4.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:WRITE|VehiclePropertyAccess:READ_WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      * @config_string List of all avaiable external source in the system.
      */
     AUDIO_EXT_ROUTING_HINT = (
@@ -790,7 +794,7 @@
    * to other displays.
    *
    * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-   * @access VehiclePropertyAccess:READ|VehiclePropertyAccess:READ_WRITE
+   * @access VehiclePropertyAccess:READ_WRITE
    */
     DISPLAY_BRIGHTNESS = (
         0x0A01
@@ -909,7 +913,7 @@
      * ability to write this property.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     DOOR_POS = (
         0x0B00
@@ -921,7 +925,7 @@
      * Door move
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     DOOR_MOVE = (
         0x0B01
@@ -963,7 +967,7 @@
      * Positive value indicates tilt upwards, negative value is downwards
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     MIRROR_Z_MOVE = (
         0x0B41
@@ -991,7 +995,7 @@
      * Positive value indicate tilt right, negative value is left
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     MIRROR_Y_MOVE = (
         0x0B43
@@ -1042,11 +1046,15 @@
         | VehicleArea:GLOBAL),
 
     /*
-     * Seat memory set
+     * Seat memory select
      *
-     * This setting allows the user to save the current seat position settings
-     * into the selected preset slot.  The maxValue for each seat position shall
-     * match the maxValue for SEAT_MEMORY_SELECT.
+     * This parameter selects the memory preset to use to select the seat
+     * position. The minValue is always 0, and the maxValue determines the
+     * number of seat positions available.
+     *
+     * For instance, if the driver's seat has 3 memory presets, the maxValue
+     * will be 3. When the user wants to select a preset, the desired preset
+     * number (1, 2, or 3) is set.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
      * @access VehiclePropertyAccess:WRITE
@@ -1082,7 +1090,7 @@
      * no known cars at this time, but you never know...
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_BELT_BUCKLED = (
         0x0B82
@@ -1110,7 +1118,7 @@
      * Seatbelt height move
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_BELT_HEIGHT_MOVE = (
         0x0B84
@@ -1140,7 +1148,7 @@
      * Moves the seat position forward and aft.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_FORE_AFT_MOVE = (
         0x0B86
@@ -1170,7 +1178,7 @@
      * Moves the backrest forward or recline.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_BACKREST_ANGLE_1_MOVE = (
         0x0B88
@@ -1200,7 +1208,7 @@
      * Moves the backrest forward or recline.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_BACKREST_ANGLE_2_MOVE = (
         0x0B8A
@@ -1230,7 +1238,7 @@
      * Moves the seat height.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_HEIGHT_MOVE = (
         0x0B8C
@@ -1260,7 +1268,7 @@
      * Adjusts the seat depth.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_DEPTH_MOVE = (
         0x0B8E
@@ -1290,7 +1298,7 @@
      * Tilts the seat.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_TILT_MOVE = (
         0x0B90
@@ -1320,7 +1328,7 @@
      * Adjusts the lumbar support.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_LUMBAR_FORE_AFT_MOVE = (
         0x0B92
@@ -1350,7 +1358,7 @@
      * Adjusts the amount of lateral lumbar support.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_LUMBAR_SIDE_SUPPORT_MOVE = (
         0x0B94
@@ -1380,7 +1388,7 @@
      * Moves the headrest up and down.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_HEADREST_HEIGHT_MOVE = (
         0x0B96
@@ -1410,7 +1418,7 @@
      * Adjusts the angle of the headrest
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_HEADREST_ANGLE_MOVE = (
         0x0B98
@@ -1432,7 +1440,7 @@
     /*
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     SEAT_HEADREST_FORE_AFT_MOVE = (
         0x0B9A
@@ -1464,7 +1472,7 @@
      * the window.
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     WINDOW_MOVE = (
         0x0BC1
@@ -1498,7 +1506,7 @@
      * Min = vent closed
      *
      * @change_mode VehiclePropertyChangeMode:ON_CHANGE
-     * @access VehiclePropertyAccess:READ_WRITE|VehiclePropertyAccess:WRITE
+     * @access VehiclePropertyAccess:READ_WRITE
      */
     WINDOW_VENT_MOVE = (
         0x0BC3
@@ -1716,8 +1724,8 @@
   /*
    * External audio module or vehicle hal has persistent storage
    * to keep the volume level. This must be set only when per context
-   * volume level is supproted. When this is set, audio volume level per
-   * each context will be retrieved from the property when systen starts up.
+   * volume level is supported. When this is set, audio volume level per
+   * each context will be retrieved from the property when system starts up.
    * And external audio module is also expected to adjust volume automatically
    * whenever there is an audio context change.
    * When this flag is not set, android side will assume that there is no
@@ -1755,7 +1763,7 @@
 enum VehicleAudioVolumeIndex : int32_t {
   INDEX_STREAM = 0,
   INDEX_VOLUME = 1,
-  NDEX_STATE = 2,
+  INDEX_STATE = 2,
 };
 
 /*
@@ -2336,12 +2344,15 @@
 enum SubscribeFlags {
   UNDEFINED = 0x0,
 
-  /* Subscribe to event that was originated in vehicle HAL (most luckly this
+  /*
+   * Subscribe to event that was originated in vehicle HAL (most luckly this
    * event came from vehicle itself). */
   HAL_EVENT = 0x1,
 
-  /* Use this flag to subscribe on events when IVehicle#set(...) was called by
-   * vehicle HAL's client (e.g. Car Service). */
+  /*
+   * Use this flag to subscribe on events when IVehicle#set(...) was called by
+   * vehicle HAL's client (e.g. Car Service).
+   */
   SET_CALL = 0x2,
 
   DEFAULT = HAL_EVENT,
@@ -2352,10 +2363,12 @@
  */
 struct SubscribeOptions {
   /* Property to subscribe */
-
   VehicleProperty propId;
 
-  /* Area ids - this must be a bit mask of areas to subscribe or 0 to subscribe to all areas. */
+  /*
+   * Area ids - this must be a bit mask of areas to subscribe or 0 to subscribe
+   * to all areas.
+   */
   int32_t vehicleAreas;
 
   /*
@@ -2380,15 +2393,21 @@
   OK = 0,
 
   /* Try again. */
-  TRY_AGAIN = -11,
+  TRY_AGAIN = 1,
 
   /* Invalid argument provided. */
-  INVALID_ARG = -22,
+  INVALID_ARG = 2,
 
   /*
    * This code must be returned when device that associated with the vehicle
    * property is not available. For example, when client tries to set HVAC
    * temperature when the whole HVAC unit is turned OFF.
    */
-  NOT_AVAILABLE = -108,
+  NOT_AVAILABLE = 3,
+
+  /* Access denied */
+  ACCESS_DENIED = 4,
+
+  /* Something unexpected has happened in Vehicle HAL */
+  INTERNAL_ERROR = 5,
 };
diff --git a/vibrator/1.0/Android.bp b/vibrator/1.0/Android.bp
index 270e7bf..85bbc5e 100644
--- a/vibrator/1.0/Android.bp
+++ b/vibrator/1.0/Android.bp
@@ -43,9 +43,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/vibrator/1.0/vts/Android.mk b/vibrator/1.0/vts/Android.mk
index cb70548..bdecb85 100644
--- a/vibrator/1.0/vts/Android.mk
+++ b/vibrator/1.0/vts/Android.mk
@@ -53,3 +53,34 @@
 LOCAL_MULTILIB := both
 
 include $(BUILD_SHARED_LIBRARY)
+
+# build profiler for vibrator.
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := libvts_profiler_hidl_vibrator@1.0
+
+LOCAL_SRC_FILES := \
+   Vibrator.vts \
+   types.vts \
+
+LOCAL_C_INCLUDES += \
+  test/vts/drivers/libprofiling \
+
+LOCAL_VTS_MODE := PROFILER
+
+LOCAL_SHARED_LIBRARIES := \
+   android.hardware.vibrator@1.0 \
+   libbase \
+   libcutils \
+   liblog \
+   libhidl \
+   libhwbinder \
+   libprotobuf-cpp-full \
+   libvts_common \
+   libvts_multidevice_proto \
+   libvts_profiling \
+   libutils \
+
+LOCAL_PROTOC_OPTIMIZE_TYPE := full
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/vibrator/1.0/vts/Vibrator.vts b/vibrator/1.0/vts/Vibrator.vts
index f1ab053..e0de3fb 100644
--- a/vibrator/1.0/vts/Vibrator.vts
+++ b/vibrator/1.0/vts/Vibrator.vts
@@ -11,7 +11,7 @@
         name: "on"
         return_type_hidl: {
             type: TYPE_ENUM
-            predefined_type: "Status"
+            predefined_type: "::android::hardware::vibrator::V1_0::Status"
         }
         arg: {
             type: TYPE_SCALAR
@@ -23,7 +23,7 @@
         name: "off"
         return_type_hidl: {
             type: TYPE_ENUM
-            predefined_type: "Status"
+            predefined_type: "::android::hardware::vibrator::V1_0::Status"
         }
     }
 
diff --git a/vibrator/1.0/vts/types.vts b/vibrator/1.0/vts/types.vts
index 0eba051..d1bf1e1 100644
--- a/vibrator/1.0/vts/types.vts
+++ b/vibrator/1.0/vts/types.vts
@@ -6,7 +6,7 @@
 
 
 attribute: {
-    name: "Status"
+    name: "::android::hardware::vibrator::V1_0::Status"
     type: TYPE_ENUM
     enum_value: {
         scalar_type: "uint32_t"
diff --git a/vr/1.0/Android.bp b/vr/1.0/Android.bp
index 63a0789..eaed921 100644
--- a/vr/1.0/Android.bp
+++ b/vr/1.0/Android.bp
@@ -39,9 +39,9 @@
         "libutils",
         "libcutils",
     ],
-export_shared_lib_headers: [
-    "libhidl",
-    "libhwbinder",
-    "libutils",
+    export_shared_lib_headers: [
+        "libhidl",
+        "libhwbinder",
+        "libutils",
     ],
 }
diff --git a/vr/1.0/vts/Vr.vts b/vr/1.0/vts/Vr.vts
new file mode 100644
index 0000000..36ec11f
--- /dev/null
+++ b/vr/1.0/vts/Vr.vts
@@ -0,0 +1,36 @@
+component_class: HAL_HIDL
+component_type_version: 1.0
+component_name: "IVr"
+
+package: "android.hardware.vr"
+
+
+interface: {
+    api: {
+        name: "init"
+        callflow: {
+            next: "*"
+        }
+        callflow: {
+            entry: true
+        }
+        callflow: {
+            exit: true
+        }
+    }
+
+    api: {
+        name: "setVrMode"
+        arg: {
+            type: TYPE_SCALAR
+            scalar_type: "bool_t"
+        }
+        callflow: {
+            next: "*"
+        }
+        callflow: {
+            exit: true
+        }
+    }
+
+}
diff --git a/wifi/supplicant/1.0/Android.bp b/wifi/supplicant/1.0/Android.bp
index 1898a50..d4247d2 100644
--- a/wifi/supplicant/1.0/Android.bp
+++ b/wifi/supplicant/1.0/Android.bp
@@ -9,18 +9,30 @@
         "ISupplicant.hal",
         "ISupplicantCallback.hal",
         "ISupplicantIface.hal",
-        "ISupplicantIfaceCallback.hal",
         "ISupplicantNetwork.hal",
-        "ISupplicantNetworkCallback.hal",
+        "ISupplicantP2pIface.hal",
+        "ISupplicantP2pIfaceCallback.hal",
+        "ISupplicantP2pNetwork.hal",
+        "ISupplicantP2pNetworkCallback.hal",
+        "ISupplicantStaIface.hal",
+        "ISupplicantStaIfaceCallback.hal",
+        "ISupplicantStaNetwork.hal",
+        "ISupplicantStaNetworkCallback.hal",
     ],
     out: [
         "android/hardware/wifi/supplicant/1.0/types.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantAll.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantCallbackAll.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantIfaceAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantIfaceCallbackAll.cpp",
         "android/hardware/wifi/supplicant/1.0/SupplicantNetworkAll.cpp",
-        "android/hardware/wifi/supplicant/1.0/SupplicantNetworkCallbackAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pIfaceCallbackAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantP2pNetworkCallbackAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaIfaceAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaIfaceCallbackAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkAll.cpp",
+        "android/hardware/wifi/supplicant/1.0/SupplicantStaNetworkCallbackAll.cpp",
     ],
 }
 
@@ -33,9 +45,15 @@
         "ISupplicant.hal",
         "ISupplicantCallback.hal",
         "ISupplicantIface.hal",
-        "ISupplicantIfaceCallback.hal",
         "ISupplicantNetwork.hal",
-        "ISupplicantNetworkCallback.hal",
+        "ISupplicantP2pIface.hal",
+        "ISupplicantP2pIfaceCallback.hal",
+        "ISupplicantP2pNetwork.hal",
+        "ISupplicantP2pNetworkCallback.hal",
+        "ISupplicantStaIface.hal",
+        "ISupplicantStaIfaceCallback.hal",
+        "ISupplicantStaNetwork.hal",
+        "ISupplicantStaNetworkCallback.hal",
     ],
     out: [
         "android/hardware/wifi/supplicant/1.0/types.h",
@@ -54,21 +72,51 @@
         "android/hardware/wifi/supplicant/1.0/BnSupplicantIface.h",
         "android/hardware/wifi/supplicant/1.0/BpSupplicantIface.h",
         "android/hardware/wifi/supplicant/1.0/BsSupplicantIface.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BnSupplicantIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BpSupplicantIfaceCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantIfaceCallback.h",
         "android/hardware/wifi/supplicant/1.0/ISupplicantNetwork.h",
         "android/hardware/wifi/supplicant/1.0/IHwSupplicantNetwork.h",
         "android/hardware/wifi/supplicant/1.0/BnSupplicantNetwork.h",
         "android/hardware/wifi/supplicant/1.0/BpSupplicantNetwork.h",
         "android/hardware/wifi/supplicant/1.0/BsSupplicantNetwork.h",
-        "android/hardware/wifi/supplicant/1.0/ISupplicantNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/IHwSupplicantNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BnSupplicantNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BpSupplicantNetworkCallback.h",
-        "android/hardware/wifi/supplicant/1.0/BsSupplicantNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pIface.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pIface.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pIface.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pIface.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pIface.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantP2pNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantP2pNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantP2pNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantP2pNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantStaIface.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaIface.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantStaIface.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantStaIface.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaIface.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantStaIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantStaIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaIfaceCallback.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantStaNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantStaNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaNetwork.h",
+        "android/hardware/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/IHwSupplicantStaNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BnSupplicantStaNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BpSupplicantStaNetworkCallback.h",
+        "android/hardware/wifi/supplicant/1.0/BsSupplicantStaNetworkCallback.h",
     ],
 }
 
diff --git a/wifi/supplicant/1.0/Android.mk b/wifi/supplicant/1.0/Android.mk
index b2c39f5..1f25c10 100644
--- a/wifi/supplicant/1.0/Android.mk
+++ b/wifi/supplicant/1.0/Android.mk
@@ -13,6 +13,23 @@
 HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
 
 #
+# Build types.hal (IfaceType)
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/IfaceType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::types.IfaceType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (SupplicantStatus)
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/SupplicantStatus.java
@@ -93,8 +110,6 @@
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
 $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIface.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
 $(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
@@ -110,33 +125,12 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build ISupplicantIfaceCallback.hal
-#
-GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantIfaceCallback.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava -randroid.hardware:hardware/interfaces \
-        android.hardware.wifi.supplicant@1.0::ISupplicantIfaceCallback
-
-$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
 # Build ISupplicantNetwork.hal
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantNetwork.java
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
 $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetwork.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
-$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
 $(GEN): $(LOCAL_PATH)/types.hal
 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
@@ -150,19 +144,166 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build ISupplicantNetworkCallback.hal
+# Build ISupplicantP2pIface.hal
 #
-GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantNetworkCallback.java
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pIface.java
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
 $(GEN): PRIVATE_CUSTOM_TOOL = \
         $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
         -Ljava -randroid.hardware:hardware/interfaces \
-        android.hardware.wifi.supplicant@1.0::ISupplicantNetworkCallback
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pIface
 
-$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIface.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pIfaceCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pIfaceCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pNetwork.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetwork.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetwork
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetwork.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pNetworkCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetworkCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaIface.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaIface.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaIface
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIface.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaIfaceCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaIfaceCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaNetwork.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaNetwork
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetwork.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaNetworkCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaNetworkCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
 	$(transform-generated-source)
 LOCAL_GENERATED_SOURCES += $(GEN)
 include $(BUILD_JAVA_LIBRARY)
@@ -179,6 +320,23 @@
 HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
 
 #
+# Build types.hal (IfaceType)
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/IfaceType.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::types.IfaceType
+
+$(GEN): $(LOCAL_PATH)/types.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
 # Build types.hal (SupplicantStatus)
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/SupplicantStatus.java
@@ -259,8 +417,6 @@
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
 $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIface.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
 $(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
@@ -276,33 +432,12 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build ISupplicantIfaceCallback.hal
-#
-GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantIfaceCallback.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
-$(GEN): $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
-        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
-        -Ljava -randroid.hardware:hardware/interfaces \
-        android.hardware.wifi.supplicant@1.0::ISupplicantIfaceCallback
-
-$(GEN): $(LOCAL_PATH)/ISupplicantIfaceCallback.hal
-	$(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
 # Build ISupplicantNetwork.hal
 #
 GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantNetwork.java
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
 $(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetwork.hal
-$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
-$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
 $(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
 $(GEN): $(LOCAL_PATH)/types.hal
 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
@@ -316,19 +451,166 @@
 LOCAL_GENERATED_SOURCES += $(GEN)
 
 #
-# Build ISupplicantNetworkCallback.hal
+# Build ISupplicantP2pIface.hal
 #
-GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantNetworkCallback.java
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pIface.java
 $(GEN): $(HIDL)
 $(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
 $(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
 $(GEN): PRIVATE_CUSTOM_TOOL = \
         $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
         -Ljava -randroid.hardware:hardware/interfaces \
-        android.hardware.wifi.supplicant@1.0::ISupplicantNetworkCallback
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pIface
 
-$(GEN): $(LOCAL_PATH)/ISupplicantNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIface.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pIfaceCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pIfaceCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pIfaceCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pNetwork.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetwork.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetwork
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetwork.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantP2pNetworkCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantP2pNetworkCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantP2pNetworkCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaIface.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaIface.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantIface.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaIface
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIface.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaIfaceCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaIfaceCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaIfaceCallback.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaNetwork.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantNetwork.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/types.hal
+$(GEN): $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaNetwork
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetwork.hal
+	$(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build ISupplicantStaNetworkCallback.hal
+#
+GEN := $(intermediates)/android/hardware/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+        $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+        -Ljava -randroid.hardware:hardware/interfaces \
+        android.hardware.wifi.supplicant@1.0::ISupplicantStaNetworkCallback
+
+$(GEN): $(LOCAL_PATH)/ISupplicantStaNetworkCallback.hal
 	$(transform-generated-source)
 LOCAL_GENERATED_SOURCES += $(GEN)
 include $(BUILD_STATIC_JAVA_LIBRARY)
diff --git a/wifi/supplicant/1.0/ISupplicant.hal b/wifi/supplicant/1.0/ISupplicant.hal
index 75b0aa0..c0131c5 100644
--- a/wifi/supplicant/1.0/ISupplicant.hal
+++ b/wifi/supplicant/1.0/ISupplicant.hal
@@ -40,37 +40,26 @@
   };
 
   /**
-   * Registers a wireless interface in wpa_supplicant.
-   *
-   * @param ifName Name of the network interface, e.g., wlan0
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_EXISTS|
-   * @return iface HIDL interface object representing the interface if
-   *         successful, null otherwise.
+   * Structure describing the type and name of an iface
+   * controlled by wpa_supplicant.
    */
-  createInterface(string ifName)
-      generates (SupplicantStatus status, ISupplicantIface iface);
+  struct IfaceInfo {
+      /**
+       * Type of the network interface.
+       */
+      IfaceType type;
+      /**
+       * Name of the network interface, e.g., wlan0
+       */
+      string name;
+  };
 
   /**
-   * Deregisters a wireless interface from wpa_supplicant.
+   * Gets a HIDL interface object for the interface corresponding to iface
+   * name which wpa_supplicant already controls.
    *
-   * @param ifName Name of the network interface, e.g., wlan0
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_UNKOWN|
-   */
-  removeInterface(string ifName) generates (SupplicantStatus status);
-
-  /**
-   * Gets a HIDL interface object for the interface corresponding to ifName
-   * which wpa_supplicant already controls.
-   *
-   * @param ifName Name of the network interface, e.g., wlan0
+   * @param ifaceInfo Combination of the iface type and name retrieved
+   *        using |listInterfaces|.
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
@@ -79,11 +68,11 @@
    * @return iface HIDL interface object representing the interface if
    *         successful, null otherwise.
    */
-  getInterface(string ifName)
+  getInterface(IfaceInfo ifaceInfo)
       generates (SupplicantStatus status, ISupplicantIface iface);
 
   /**
-   * Retrieve a list of all the interface names controlled by wpa_supplicant.
+   * Retrieve a list of all the interfaces controlled by wpa_supplicant.
    *
    * The corresponding |ISupplicantIface| object for any interface can be
    * retrieved using |getInterface| method.
@@ -92,9 +81,9 @@
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
    *         |SupplicantStatusCode.FAILURE_UNKNOWN|
-   * @return ifNames List of all interface names controlled by wpa_supplicant.
+   * @return ifaces List of all interfaces controlled by wpa_supplicant.
    */
-  listInterfaces() generates (SupplicantStatus status, vec<string> ifNames);
+  listInterfaces() generates (SupplicantStatus status, vec<IfaceInfo> ifaces);
 
   /**
    * Register for callbacks from the wpa_supplicant service.
diff --git a/wifi/supplicant/1.0/ISupplicantIface.hal b/wifi/supplicant/1.0/ISupplicantIface.hal
index 7b4f86f..afbfd8e 100644
--- a/wifi/supplicant/1.0/ISupplicantIface.hal
+++ b/wifi/supplicant/1.0/ISupplicantIface.hal
@@ -16,7 +16,6 @@
 
 package android.hardware.wifi.supplicant@1.0;
 
-import ISupplicantIfaceCallback;
 import ISupplicantNetwork;
 
 /**
@@ -36,6 +35,17 @@
   getName() generates (SupplicantStatus status, string name);
 
   /**
+   * Retrieves the type of the network interface.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   * @return type Type of the network interface, e.g., STA.
+   */
+  getType() generates (SupplicantStatus status, IfaceType type);
+
+  /**
    * Add a new network to the interface.
    *
    * @return status Status of the operation.
@@ -100,114 +110,4 @@
    */
   listNetworks()
       generates (SupplicantStatus status, vec<SupplicantNetworkId> networkIds);
-
-  /**
-   * Register for callbacks from this interface.
-   *
-   * These callbacks are invoked for events that are specific to this interface.
-   * Registration of multiple callback objects is supported. These objects must
-   * be automatically deleted when the corresponding client process is dead or
-   * if this interface is removed.
-   *
-   * @param callback An instance of the |ISupplicantIfaceCallback| HIDL
-   *        interface object.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
-   */
-  registerCallback(ISupplicantIfaceCallback callback)
-      generates (SupplicantStatus status);
-
-  /**
-   * Reconnect to the currently active network, even if we are already
-   * connected.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
-   */
-  reassociate() generates (SupplicantStatus status);
-
-  /**
-   * Reconnect to the currently active network, if we are currently
-   * disconnected.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_NOT_DISCONNECTED|
-   */
-  reconnect() generates (SupplicantStatus status);
-
-  /**
-   * Disconnect from the current active network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
-   */
-  disconnect() generates (SupplicantStatus status);
-
-  /**
-   * Turn on/off power save mode for the interface.
-   *
-   * @param enable Indicate if power save is to be turned on/off.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
-   */
-  setPowerSave(bool enable) generates (SupplicantStatus status);
-
-  /**
-   * Initiate TDLS discover with the provided peer mac address.
-   *
-   * @param macAddress MAC address of the peer.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
-   */
-  initiateTdlsDiscover(MacAddress macAddress)
-      generates (SupplicantStatus status);
-
-  /**
-   * Initiate TDLS setup with the provided peer mac address.
-   *
-   * @param macAddress MAC address of the peer.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
-   */
-  initiateTdlsSetup(MacAddress macAddress)
-      generates (SupplicantStatus status);
-
-  /**
-   * Initiate TDLS teardown with the provided peer mac address.
-   *
-   * @param macAddress MAC address of the peer.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
-   */
-  initiateTdlsTeardown(MacAddress macAddress)
-      generates (SupplicantStatus status);
 };
diff --git a/wifi/supplicant/1.0/ISupplicantNetwork.hal b/wifi/supplicant/1.0/ISupplicantNetwork.hal
index fce3c5d..acc3359 100644
--- a/wifi/supplicant/1.0/ISupplicantNetwork.hal
+++ b/wifi/supplicant/1.0/ISupplicantNetwork.hal
@@ -16,8 +16,6 @@
 
 package android.hardware.wifi.supplicant@1.0;
 
-import ISupplicantNetworkCallback;
-
 /**
  * Interface exposed by wpa_supplicant for each network configuration it
  * controls.
@@ -28,100 +26,6 @@
  */
 interface ISupplicantNetwork {
   /**
-   * Size limits for some of the params used in this interface.
-   */
-  enum ParamSizeLimits : uint32_t {
-    /** Max length of SSID param. */
-    SSID_MAX_LEN_IN_BYTES = 32,
-
-    /** Min length of PSK passphrase param. */
-    PSK_PASSPHRASE_MIN_LEN_IN_BYTES = 8,
-
-    /** Max length of PSK passphrase param. */
-    PSK_PASSPHRASE_MAX_LEN_IN_BYTES = 63,
-
-    /** Max number of WEP keys param. */
-    WEP_KEYS_MAX_NUM = 4,
-
-    /** Length of each WEP40 keys param. */
-    WEP40_KEY_LEN_IN_BYTES = 5,
-    /** Length of each WEP104 keys param. */
-    WEP104_KEY_LEN_IN_BYTES = 13,
-  };
-
-  /** Possble mask of values for KeyMgmt param. */
-  enum KeyMgmtMask : uint32_t {
-    WPA_EAP = 1 << 0,
-    WPA_PSK = 1 << 1,
-    NONE = 1 << 2,
-    IEEE8021X = 1 << 3
-  };
-
-  /** Possble mask of values for Proto param. */
-  enum ProtoMask : uint32_t {
-    WPA = 1 << 0,
-    RSN = 1 << 1,
-    /** Unused 1 << 2 */
-    OSEN = 1 << 3
-  };
-
-  /** Possble mask of values for AuthAlg param. */
-  enum AuthAlgMask : uint32_t {
-    OPEN = 1 << 0,
-    SHARED = 1 << 1,
-    LEAP = 1 << 2
-  };
-
-  /** Possble mask of values for GroupCipher param. */
-  enum GroupCipherMask : uint32_t {
-    WEP40 = 1 << 1,
-    WEP104 = 1 << 2,
-    TKIP = 1 << 3,
-    CCMP = 1 << 4
-  };
-
-  /** Possble mask of values for PairwiseCipher param. */
-  enum PairwiseCipherMask : uint32_t {
-    NONE = 1 << 0,
-    TKIP = 1 << 3,
-    CCMP = 1 << 4
-  };
-
-  /** Possble values for EapMethod param. */
-  enum EapMethod : uint32_t {
-    PEAP = 0,
-    TLS = 1,
-    TTLS = 2,
-    PWD = 3,
-    SIM = 4,
-    AKA = 5,
-    AKA_PRIME = 6,
-    WFA_UNAUTH_TLS = 7
-  };
-
-  /** Possble values for Phase2Method param. */
-  enum EapPhase2Method : uint32_t {
-    NONE = 0,
-    PAP = 1,
-    MSPAP = 2,
-    MSPAPV2 = 3,
-    GTC = 4
-  };
-
-  /** Params of |sendNetworkEapSimGsmAuthResponse| request. (Refer RFC 4186) */
-  struct NetworkResponseEapSimGsmAuthParams {
-    uint8_t[8] kc;
-    uint8_t[4] sres;
-  };
-
-  /** Params of |sendNetworkEapSimUmtsAuthResponse| request. (Refer RFC 4187) */
-  struct NetworkResponseEapSimUmtsAuthParams {
-    vec<uint8_t> res;
-    uint8_t[16] ik;
-    uint8_t[16] ck;
-  };
-
-  /**
    * Retrieves the ID allocated to this network by wpa_supplicant.
    *
    * This is not the |SSID| of the network, but an internal identifier for
@@ -147,593 +51,13 @@
   getInterfaceName() generates (SupplicantStatus status, string name);
 
   /**
-   * Register for callbacks from this network.
-   *
-   * These callbacks are invoked for events that are specific to this network.
-   * Registration of multiple callback objects is supported. These objects must
-   * be automatically deleted when the corresponding client process is dead or
-   * if this network is removed.
-   *
-   * @param callback An instance of the |ISupplicantNetworkCallback| HIDL
-   *        interface object.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  registerCallback(ISupplicantNetworkCallback callback)
-      generates (SupplicantStatus status);
-
-  /**
-   * Setters for the various network params.
-   * These correspond to elements of |wpa_sssid| struct used internally by
-   * wpa_supplicant to represent each network.
-   */
-  /**
-   * Set SSID for this network.
-   *
-   * @param ssid value to set.
-   *        Max length of |ParamSizeLimits.SSID_MAX_LEN_IN_BYTES|.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setSsid(Ssid ssid) generates (SupplicantStatus status);
-
-  /**
-   * Set the network to only connect to an AP with provided BSSID.
-   *
-   * @param bssid value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setBssid(Bssid bssid) generates (SupplicantStatus status);
-
-  /**
-   * Set whether to send probe requests for this network (hidden).
-   *
-   * @param enable true to set, false otherwise.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setScanSsid(bool enable) generates (SupplicantStatus status);
-
-  /**
-   * Set key management mask for the network.
-   *
-   * @param keyMgmtMask value to set.
-   *        Combination of |KeyMgmtMask| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setKeyMgmt(uint32_t keyMgmtMask) generates (SupplicantStatus status);
-
-  /**
-   * Set proto mask for the network.
-   *
-   * @param protoMask value to set.
-   *        Combination of |ProtoMask| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setProto(uint32_t protoMask) generates (SupplicantStatus status);
-
-  /**
-   * Set auth alg mask for the network.
-   *
-   * @param authAlgMask value to set.
-   *        Combination of |ProtoMask| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setAuthAlg(uint32_t authAlgMask) generates (SupplicantStatus status);
-
-  /**
-   * Set group cipher mask for the network.
-   *
-   * @param groupCipherMask value to set.
-   *        Combination of |ProtoMask| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setGroupCipher(uint32_t groupCipherMask)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set pairwise cipher mask for the network.
-   *
-   * @param pairwiseCipherMask value to set.
-   *        Combination of |ProtoMask| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setPairwiseCipher(uint32_t pairwiseCipherMask)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set passphrase for WPA_PSK network.
-   *
-   * @param psk value to set.
-   *        Length of value must be between
-   *        |ParamSizeLimits.PSK_PASSPHRASE_MIN_LEN_IN_BYTES| and
-   *        |ParamSizeLimits.PSK_PASSPHRASE_MAX_LEN_IN_BYTES|.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setPskPassphrase(string psk) generates (SupplicantStatus status);
-
-  /**
-   * Set WEP key for WEP network.
-   *
-   * @param keyIdx Index of wep key to set.
-   *        Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
-   * @param wepKey value to set.
-   *        Length of each key must be either
-   *        |ParamSizeLimits.WEP40_KEY_LEN_IN_BYTES| or
-   *        |ParamSizeLimits.WEP104_KEY_LEN_IN_BYTES|.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setWepKey(uint32_t keyIdx, vec<uint8_t> wepKey)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set default Tx key index for WEP network.
-   *
-   * @param KeyIdx value to set.
-   *        Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setWepTxKeyIdx(uint32_t keyIdx)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set whether RequirePmf is enabled for this network.
-   *
-   * @param enable true to set, false otherwise.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setRequirePmf(bool enable) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Method for this network.
-   *
-   * @param method value to be set.
-   *        Must be one of |EapMethod| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapMethod(EapMethod method)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Phase2 Method for this network.
-   *
-   * @param method value to set.
-   *        Must be one of |EapPhase2Method| values.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapPhase2Method(EapPhase2Method method)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Identity for this network.
-   *
-   * @param identity value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapIdentity(vec<uint8_t> identity)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Anonymous Identity for this network.
-   *
-   * @param identity value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapAnonymousIdentity(vec<uint8_t> identity)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Password for this network.
-   *
-   * @param password value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapPassword(vec<uint8_t> password)
-      generates (SupplicantStatus status);
-
-  /**
-   * Set EAP CA certificate file path for this network.
-   *
-   * @param path value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapCACert(string path) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP CA certificate directory path for this network.
-   *
-   * @param path value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapCAPath(string path) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Client certificate file path for this network.
-   *
-   * @param path value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapClientCert(string path) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP private key file path for this network.
-   *
-   * @param path value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapPrivateKey(string path) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP subject match for this network.
-   *
-   * @param match value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapSubjectMatch(string match) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Altsubject match for this network.
-   *
-   * @param match value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapAltSubjectMatch(string match)
-      generates (SupplicantStatus status);
-
-  /**
-   * Enable EAP Open SSL Engine for this network.
-   *
-   * @param enable true to set, false otherwise.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapEngine(bool enable) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Open SSL Engine ID for this network.
-   *
-   * @param id value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapEngineID(string id) generates (SupplicantStatus status);
-
-  /**
-   * Set EAP Domain suffix match for this network.
-   *
-   * @param match value to set.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  setEapDomainSuffixMatch(string match)
-      generates (SupplicantStatus status);
-
-  /**
-   * Getters for the various network params.
-   */
-  /**
-   * Get SSID for this network.
+   * Retrieves the type of the interface this network belongs to.
    *
    * @return status Status of the operation.
    *         Possible status codes:
    *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return ssid value set.
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   * @return type Type of the network interface, e.g., STA.
    */
-  getSsid() generates (SupplicantStatus status, Ssid ssid);
-
-  /**
-   * Get the BSSID set for this network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return bssid value set.
-   */
-  getBssid() generates (SupplicantStatus status, Bssid bssid);
-
-  /**
-   * Get whether Probe Requests are being sent for this network (hidden).
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return enabled true if set, false otherwise.
-   */
-  getScanSsid() generates (SupplicantStatus status, bool enabled);
-
-  /**
-   * Get the key mgmt mask set for the network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return keyMgmtMask Combination of |KeyMgmtMask| values.
-   */
-  getKeyMgmt()
-      generates (SupplicantStatus status, uint32_t keyMgmtMask);
-
-  /**
-   * Get the proto mask set for the network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return protoMask Combination of |ProtoMask| values.
-   */
-  getProto() generates (SupplicantStatus status, uint32_t protoMask);
-
-  /**
-   * Get the auth alg mask set for the network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return authAlgMask Combination of |AuthAlgMask| values.
-   */
-  getAuthAlg()
-      generates (SupplicantStatus status, uint32_t authAlgMask);
-
-  /**
-   * Get the group cipher mask set for the network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return groupCipherMask Combination of |GroupCipherMask| values.
-   */
-  getGroupCipher()
-      generates (SupplicantStatus status, uint32_t groupCipherMask);
-
-  /**
-   * Get the pairwise cipher mask set for the network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
-   */
-  getPairwiseCipher()
-      generates (SupplicantStatus status, uint32_t pairwiseCipherMask);
-
-  /**
-   * Get passphrase for WPA_PSK network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return psk value set.
-   */
-  getPskPassphrase() generates (SupplicantStatus status, string psk);
-
-  /**
-   * Get WEP key for WEP network.
-   *
-   * @param keyIdx Index of wep key to be fetched.
-   *        Max of |WEP_KEYS_MAX_NUM|.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return wepKey value set.
-   */
-  getWepKey(uint32_t keyIdx)
-      generates (SupplicantStatus status, vec<uint8_t> wepKey);
-
-  /**
-   * Get default Tx key index for WEP network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return keyIdx value set.
-   */
-  getWepTxKeyIdx()
-      generates (SupplicantStatus status, uint32_t keyIdx);
-
-  /**
-   * Get whether RequirePmf is enabled for this network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   * @return enabled true if set, false otherwise.
-   */
-  getRequirePmf() generates (SupplicantStatus status, bool enabled);
-
-  /**
-   * Enable the network for connection purposes.
-   *
-   * This must trigger a connection to the network if:
-   * a) |noConnect| is false, and
-   * b) This is the only network configured, and
-   * c) Is visible in the current scan results.
-   *
-   * @param noConnect Only enable the network, dont trigger a connect.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  enable(bool noConnect) generates (SupplicantStatus status);
-
-  /**
-   * Disable the network for connection purposes.
-   *
-   * This must trigger a disconnection from the network, if currently
-   * connected to this one.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  disable() generates (SupplicantStatus status);
-
-  /**
-   * Initiate connection to this network.
-   *
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  select() generates (SupplicantStatus status);
-
-  /**
-   * Used to send a response to the
-   * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request.
-   *
-   * @param params Params to be used for EAP GSM authentication.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  sendNetworkEapSimGsmAuthResponse(NetworkResponseEapSimGsmAuthParams params)
-      generates (SupplicantStatus status);
-
-  /**
-   * Used to send a response to the
-   * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
-   *
-   * @param params Params to be used for EAP UMTS authentication.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  sendNetworkEapSimUmtsAuthResponse(NetworkResponseEapSimUmtsAuthParams params)
-      generates (SupplicantStatus status);
-
-  /**
-   * Used to send a response to the
-   * |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request.
-   *
-   * @param identity Identity to be used for the network.
-   * @return status Status of the operation.
-   *         Possible status codes:
-   *         |SupplicantStatusCode.SUCCESS|,
-   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
-   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
-   */
-  sendNetworkEapIdentityResponse(vec<uint8_t> identity)
-      generates (SupplicantStatus status);
+  getType() generates (SupplicantStatus status, IfaceType type);
 };
diff --git a/wifi/supplicant/1.0/ISupplicantP2pIface.hal b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
new file mode 100644
index 0000000..ea0878b
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantP2pIface.hal
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2016 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.wifi.supplicant@1.0;
+
+import ISupplicantIface;
+import ISupplicantP2pIfaceCallback;
+
+/**
+ * Interface exposed by wpa_supplicant for each P2P mode network
+ * interface (e.g p2p0) it controls.
+ */
+interface ISupplicantP2pIface extends ISupplicantIface {
+  /**
+   * Register for callbacks from this interface.
+   *
+   * These callbacks are invoked for events that are specific to this interface.
+   * Registration of multiple callback objects is supported. These objects must
+   * be automatically deleted when the corresponding client process is dead or
+   * if this interface is removed.
+   *
+   * @param callback An instance of the |ISupplicantP2pIfaceCallback| HIDL
+   *        interface object.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  registerCallback(ISupplicantP2pIfaceCallback callback)
+      generates (SupplicantStatus status);
+};
diff --git a/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal b/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal
new file mode 100644
index 0000000..1574e6a
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantP2pIfaceCallback.hal
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2016 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.wifi.supplicant@1.0;
+
+/**
+ * Callback Interface exposed by the wpa_supplicant service
+ * for each P2P mode interface (ISupplicantP2pIface).
+ *
+ * Clients need to host an instance of this HIDL interface object and
+ * pass a reference of the object to wpa_supplicant via the
+ * corresponding |ISupplicantP2pIface.registerCallback| method.
+ */
+interface ISupplicantP2pIfaceCallback {
+  /**
+   * Used to indicate that a new network has been added.
+   *
+   * @param id Network ID allocated to the corresponding network.
+   */
+  oneway onNetworkAdded(SupplicantNetworkId id);
+
+  /**
+   * Used to indicate that a network has been removed.
+   *
+   * @param id Network ID allocated to the corresponding network.
+   */
+  oneway onNetworkRemoved(SupplicantNetworkId id);
+};
diff --git a/wifi/supplicant/1.0/ISupplicantP2pNetwork.hal b/wifi/supplicant/1.0/ISupplicantP2pNetwork.hal
new file mode 100644
index 0000000..13eeae7
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantP2pNetwork.hal
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2016 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.wifi.supplicant@1.0;
+
+import ISupplicantNetwork;
+import ISupplicantP2pNetworkCallback;
+
+/**
+ * Interface exposed by wpa_supplicant for each P2P mode network
+ * configuration it controls.
+ */
+interface ISupplicantP2pNetwork extends ISupplicantNetwork {
+  /**
+   * Register for callbacks from this network.
+   *
+   * These callbacks are invoked for events that are specific to this network.
+   * Registration of multiple callback objects is supported. These objects must
+   * be automatically deleted when the corresponding client process is dead or
+   * if this network is removed.
+   *
+   * @param callback An instance of the |ISupplicantP2pNetworkCallback| HIDL
+   *        interface object.
+   * @return status P2ptus of the operation.
+   *         Possible status codes:
+   *         |SupplicantP2ptusCode.SUCCESS|,
+   *         |SupplicantP2ptusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantP2ptusCode.FAILURE_NETWORK_INVALID|
+   */
+  registerCallback(ISupplicantP2pNetworkCallback callback)
+      generates (SupplicantStatus status);
+};
diff --git a/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.hal b/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.hal
new file mode 100644
index 0000000..d171a09
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantP2pNetworkCallback.hal
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2016 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.wifi.supplicant@1.0;
+
+/**
+ * Callback Interface exposed by the wpa_supplicant service
+ * for each network (ISupplicantP2pNetwork).
+ *
+ * Clients need to host an instance of this HIDL interface object and
+ * pass a reference of the object to wpa_supplicant via the
+ * corresponding |ISupplicantP2pNetwork.registerCallback| method.
+ */
+interface ISupplicantP2pNetworkCallback {
+    // TODO(rpius): Add the reqd callbacks.
+};
diff --git a/wifi/supplicant/1.0/ISupplicantStaIface.hal b/wifi/supplicant/1.0/ISupplicantStaIface.hal
new file mode 100644
index 0000000..4e2c7c8
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantStaIface.hal
@@ -0,0 +1,136 @@
+/*
+ * Copyright 2016 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.wifi.supplicant@1.0;
+
+import ISupplicantIface;
+import ISupplicantStaIfaceCallback;
+
+/**
+ * Interface exposed by wpa_supplicant for each station mode network
+ * interface (e.g wlan0) it controls.
+ */
+interface ISupplicantStaIface extends ISupplicantIface {
+  /**
+   * Register for callbacks from this interface.
+   *
+   * These callbacks are invoked for events that are specific to this interface.
+   * Registration of multiple callback objects is supported. These objects must
+   * be automatically deleted when the corresponding client process is dead or
+   * if this interface is removed.
+   *
+   * @param callback An instance of the |ISupplicantStaIfaceCallback| HIDL
+   *        interface object.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  registerCallback(ISupplicantStaIfaceCallback callback)
+      generates (SupplicantStatus status);
+
+  /**
+   * Reconnect to the currently active network, even if we are already
+   * connected.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
+   */
+  reassociate() generates (SupplicantStatus status);
+
+  /**
+   * Reconnect to the currently active network, if we are currently
+   * disconnected.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_NOT_DISCONNECTED|
+   */
+  reconnect() generates (SupplicantStatus status);
+
+  /**
+   * Disconnect from the current active network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
+   */
+  disconnect() generates (SupplicantStatus status);
+
+  /**
+   * Turn on/off power save mode for the interface.
+   *
+   * @param enable Indicate if power save is to be turned on/off.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_DISABLED|
+   */
+  setPowerSave(bool enable) generates (SupplicantStatus status);
+
+  /**
+   * Initiate TDLS discover with the provided peer mac address.
+   *
+   * @param macAddress MAC address of the peer.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  initiateTdlsDiscover(MacAddress macAddress)
+      generates (SupplicantStatus status);
+
+  /**
+   * Initiate TDLS setup with the provided peer mac address.
+   *
+   * @param macAddress MAC address of the peer.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  initiateTdlsSetup(MacAddress macAddress)
+      generates (SupplicantStatus status);
+
+  /**
+   * Initiate TDLS teardown with the provided peer mac address.
+   *
+   * @param macAddress MAC address of the peer.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_IFACE_INVALID|
+   */
+  initiateTdlsTeardown(MacAddress macAddress)
+      generates (SupplicantStatus status);
+};
diff --git a/wifi/supplicant/1.0/ISupplicantIfaceCallback.hal b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
similarity index 96%
rename from wifi/supplicant/1.0/ISupplicantIfaceCallback.hal
rename to wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
index 8e193cd..d104814 100644
--- a/wifi/supplicant/1.0/ISupplicantIfaceCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaIfaceCallback.hal
@@ -18,13 +18,13 @@
 
 /**
  * Callback Interface exposed by the wpa_supplicant service
- * for each interface (ISupplicantIface).
+ * for each station mode interface (ISupplicantStaIface).
  *
  * Clients need to host an instance of this HIDL interface object and
  * pass a reference of the object to wpa_supplicant via the
- * corresponding |ISupplicantIface.registerCallback| method.
+ * corresponding |ISupplicantStaIface.registerCallback| method.
  */
-interface ISupplicantIfaceCallback {
+interface ISupplicantStaIfaceCallback {
   /** Various states of the interface reported by |onStateChanged|.*/
   enum State : uint32_t {
     /**
@@ -38,7 +38,7 @@
      * due to rfkill. wpa_supplicant refuses any new operations that would
      * use the radio until the interface has been enabled.
      */
-    INTERFACE_DISABLED = 1,
+    IFACE_DISABLED = 1,
     /**
      * This state is entered if there are no enabled networks in the
      * configuration. wpa_supplicant is not trying to associate with a new
diff --git a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
new file mode 100644
index 0000000..ce23932
--- /dev/null
+++ b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
@@ -0,0 +1,711 @@
+/*
+ * Copyright 2016 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.wifi.supplicant@1.0;
+
+import ISupplicantNetwork;
+import ISupplicantStaNetworkCallback;
+
+/**
+ * Interface exposed by wpa_supplicant for each station mode network
+ * configuration it controls.
+ */
+interface ISupplicantStaNetwork extends ISupplicantNetwork {
+  /**
+   * Size limits for some of the params used in this interface.
+   */
+  enum ParamSizeLimits : uint32_t {
+    /** Max length of SSID param. */
+    SSID_MAX_LEN_IN_BYTES = 32,
+
+    /** Min length of PSK passphrase param. */
+    PSK_PASSPHRASE_MIN_LEN_IN_BYTES = 8,
+
+    /** Max length of PSK passphrase param. */
+    PSK_PASSPHRASE_MAX_LEN_IN_BYTES = 63,
+
+    /** Max number of WEP keys param. */
+    WEP_KEYS_MAX_NUM = 4,
+
+    /** Length of each WEP40 keys param. */
+    WEP40_KEY_LEN_IN_BYTES = 5,
+    /** Length of each WEP104 keys param. */
+    WEP104_KEY_LEN_IN_BYTES = 13,
+  };
+
+  /** Possble mask of values for KeyMgmt param. */
+  enum KeyMgmtMask : uint32_t {
+    WPA_EAP = 1 << 0,
+    WPA_PSK = 1 << 1,
+    NONE = 1 << 2,
+    IEEE8021X = 1 << 3
+  };
+
+  /** Possble mask of values for Proto param. */
+  enum ProtoMask : uint32_t {
+    WPA = 1 << 0,
+    RSN = 1 << 1,
+    /** Unused 1 << 2 */
+    OSEN = 1 << 3
+  };
+
+  /** Possble mask of values for AuthAlg param. */
+  enum AuthAlgMask : uint32_t {
+    OPEN = 1 << 0,
+    SHARED = 1 << 1,
+    LEAP = 1 << 2
+  };
+
+  /** Possble mask of values for GroupCipher param. */
+  enum GroupCipherMask : uint32_t {
+    WEP40 = 1 << 1,
+    WEP104 = 1 << 2,
+    TKIP = 1 << 3,
+    CCMP = 1 << 4
+  };
+
+  /** Possble mask of values for PairwiseCipher param. */
+  enum PairwiseCipherMask : uint32_t {
+    NONE = 1 << 0,
+    TKIP = 1 << 3,
+    CCMP = 1 << 4
+  };
+
+  /** Possble values for EapMethod param. */
+  enum EapMethod : uint32_t {
+    PEAP = 0,
+    TLS = 1,
+    TTLS = 2,
+    PWD = 3,
+    SIM = 4,
+    AKA = 5,
+    AKA_PRIME = 6,
+    WFA_UNAUTH_TLS = 7
+  };
+
+  /** Possble values for Phase2Method param. */
+  enum EapPhase2Method : uint32_t {
+    NONE = 0,
+    PAP = 1,
+    MSPAP = 2,
+    MSPAPV2 = 3,
+    GTC = 4
+  };
+
+  /** Params of |sendNetworkEapSimGsmAuthResponse| request. (Refer RFC 4186) */
+  struct NetworkResponseEapSimGsmAuthParams {
+    uint8_t[8] kc;
+    uint8_t[4] sres;
+  };
+
+  /** Params of |sendNetworkEapSimUmtsAuthResponse| request. (Refer RFC 4187) */
+  struct NetworkResponseEapSimUmtsAuthParams {
+    vec<uint8_t> res;
+    uint8_t[16] ik;
+    uint8_t[16] ck;
+  };
+
+  /**
+   * Register for callbacks from this network.
+   *
+   * These callbacks are invoked for events that are specific to this network.
+   * Registration of multiple callback objects is supported. These objects must
+   * be automatically deleted when the corresponding client process is dead or
+   * if this network is removed.
+   *
+   * @param callback An instance of the |ISupplicantStaNetworkCallback| HIDL
+   *        interface object.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  registerCallback(ISupplicantStaNetworkCallback callback)
+      generates (SupplicantStatus status);
+
+  /**
+   * Setters for the various network params.
+   * These correspond to elements of |wpa_sssid| struct used internally by
+   * wpa_supplicant to represent each network.
+   */
+  /**
+   * Set SSID for this network.
+   *
+   * @param ssid value to set.
+   *        Max length of |ParamSizeLimits.SSID_MAX_LEN_IN_BYTES|.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setSsid(Ssid ssid) generates (SupplicantStatus status);
+
+  /**
+   * Set the network to only connect to an AP with provided BSSID.
+   *
+   * @param bssid value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setBssid(Bssid bssid) generates (SupplicantStatus status);
+
+  /**
+   * Set whether to send probe requests for this network (hidden).
+   *
+   * @param enable true to set, false otherwise.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setScanSsid(bool enable) generates (SupplicantStatus status);
+
+  /**
+   * Set key management mask for the network.
+   *
+   * @param keyMgmtMask value to set.
+   *        Combination of |KeyMgmtMask| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setKeyMgmt(uint32_t keyMgmtMask) generates (SupplicantStatus status);
+
+  /**
+   * Set proto mask for the network.
+   *
+   * @param protoMask value to set.
+   *        Combination of |ProtoMask| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setProto(uint32_t protoMask) generates (SupplicantStatus status);
+
+  /**
+   * Set auth alg mask for the network.
+   *
+   * @param authAlgMask value to set.
+   *        Combination of |ProtoMask| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setAuthAlg(uint32_t authAlgMask) generates (SupplicantStatus status);
+
+  /**
+   * Set group cipher mask for the network.
+   *
+   * @param groupCipherMask value to set.
+   *        Combination of |ProtoMask| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setGroupCipher(uint32_t groupCipherMask)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set pairwise cipher mask for the network.
+   *
+   * @param pairwiseCipherMask value to set.
+   *        Combination of |ProtoMask| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setPairwiseCipher(uint32_t pairwiseCipherMask)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set passphrase for WPA_PSK network.
+   *
+   * @param psk value to set.
+   *        Length of value must be between
+   *        |ParamSizeLimits.PSK_PASSPHRASE_MIN_LEN_IN_BYTES| and
+   *        |ParamSizeLimits.PSK_PASSPHRASE_MAX_LEN_IN_BYTES|.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setPskPassphrase(string psk) generates (SupplicantStatus status);
+
+  /**
+   * Set WEP key for WEP network.
+   *
+   * @param keyIdx Index of wep key to set.
+   *        Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
+   * @param wepKey value to set.
+   *        Length of each key must be either
+   *        |ParamSizeLimits.WEP40_KEY_LEN_IN_BYTES| or
+   *        |ParamSizeLimits.WEP104_KEY_LEN_IN_BYTES|.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setWepKey(uint32_t keyIdx, vec<uint8_t> wepKey)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set default Tx key index for WEP network.
+   *
+   * @param KeyIdx value to set.
+   *        Max of |ParamSizeLimits.WEP_KEYS_MAX_NUM|.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setWepTxKeyIdx(uint32_t keyIdx)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set whether RequirePmf is enabled for this network.
+   *
+   * @param enable true to set, false otherwise.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setRequirePmf(bool enable) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Method for this network.
+   *
+   * @param method value to be set.
+   *        Must be one of |EapMethod| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapMethod(EapMethod method)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Phase2 Method for this network.
+   *
+   * @param method value to set.
+   *        Must be one of |EapPhase2Method| values.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapPhase2Method(EapPhase2Method method)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Identity for this network.
+   *
+   * @param identity value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapIdentity(vec<uint8_t> identity)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Anonymous Identity for this network.
+   *
+   * @param identity value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapAnonymousIdentity(vec<uint8_t> identity)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Password for this network.
+   *
+   * @param password value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapPassword(vec<uint8_t> password)
+      generates (SupplicantStatus status);
+
+  /**
+   * Set EAP CA certificate file path for this network.
+   *
+   * @param path value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapCACert(string path) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP CA certificate directory path for this network.
+   *
+   * @param path value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapCAPath(string path) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Client certificate file path for this network.
+   *
+   * @param path value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapClientCert(string path) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP private key file path for this network.
+   *
+   * @param path value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapPrivateKey(string path) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP subject match for this network.
+   *
+   * @param match value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapSubjectMatch(string match) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Altsubject match for this network.
+   *
+   * @param match value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapAltSubjectMatch(string match)
+      generates (SupplicantStatus status);
+
+  /**
+   * Enable EAP Open SSL Engine for this network.
+   *
+   * @param enable true to set, false otherwise.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapEngine(bool enable) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Open SSL Engine ID for this network.
+   *
+   * @param id value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapEngineID(string id) generates (SupplicantStatus status);
+
+  /**
+   * Set EAP Domain suffix match for this network.
+   *
+   * @param match value to set.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  setEapDomainSuffixMatch(string match)
+      generates (SupplicantStatus status);
+
+  /**
+   * Getters for the various network params.
+   */
+  /**
+   * Get SSID for this network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return ssid value set.
+   */
+  getSsid() generates (SupplicantStatus status, Ssid ssid);
+
+  /**
+   * Get the BSSID set for this network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return bssid value set.
+   */
+  getBssid() generates (SupplicantStatus status, Bssid bssid);
+
+  /**
+   * Get whether Probe Requests are being sent for this network (hidden).
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return enabled true if set, false otherwise.
+   */
+  getScanSsid() generates (SupplicantStatus status, bool enabled);
+
+  /**
+   * Get the key mgmt mask set for the network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return keyMgmtMask Combination of |KeyMgmtMask| values.
+   */
+  getKeyMgmt()
+      generates (SupplicantStatus status, uint32_t keyMgmtMask);
+
+  /**
+   * Get the proto mask set for the network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return protoMask Combination of |ProtoMask| values.
+   */
+  getProto() generates (SupplicantStatus status, uint32_t protoMask);
+
+  /**
+   * Get the auth alg mask set for the network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return authAlgMask Combination of |AuthAlgMask| values.
+   */
+  getAuthAlg()
+      generates (SupplicantStatus status, uint32_t authAlgMask);
+
+  /**
+   * Get the group cipher mask set for the network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return groupCipherMask Combination of |GroupCipherMask| values.
+   */
+  getGroupCipher()
+      generates (SupplicantStatus status, uint32_t groupCipherMask);
+
+  /**
+   * Get the pairwise cipher mask set for the network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return pairwiseCipherMask Combination of |PairwiseCipherMask| values.
+   */
+  getPairwiseCipher()
+      generates (SupplicantStatus status, uint32_t pairwiseCipherMask);
+
+  /**
+   * Get passphrase for WPA_PSK network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return psk value set.
+   */
+  getPskPassphrase() generates (SupplicantStatus status, string psk);
+
+  /**
+   * Get WEP key for WEP network.
+   *
+   * @param keyIdx Index of wep key to be fetched.
+   *        Max of |WEP_KEYS_MAX_NUM|.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return wepKey value set.
+   */
+  getWepKey(uint32_t keyIdx)
+      generates (SupplicantStatus status, vec<uint8_t> wepKey);
+
+  /**
+   * Get default Tx key index for WEP network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return keyIdx value set.
+   */
+  getWepTxKeyIdx()
+      generates (SupplicantStatus status, uint32_t keyIdx);
+
+  /**
+   * Get whether RequirePmf is enabled for this network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   * @return enabled true if set, false otherwise.
+   */
+  getRequirePmf() generates (SupplicantStatus status, bool enabled);
+
+  /**
+   * Enable the network for connection purposes.
+   *
+   * This must trigger a connection to the network if:
+   * a) |noConnect| is false, and
+   * b) This is the only network configured, and
+   * c) Is visible in the current scan results.
+   *
+   * @param noConnect Only enable the network, dont trigger a connect.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  enable(bool noConnect) generates (SupplicantStatus status);
+
+  /**
+   * Disable the network for connection purposes.
+   *
+   * This must trigger a disconnection from the network, if currently
+   * connected to this one.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  disable() generates (SupplicantStatus status);
+
+  /**
+   * Initiate connection to this network.
+   *
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  select() generates (SupplicantStatus status);
+
+  /**
+   * Used to send a response to the
+   * |ISupplicantNetworkCallback.onNetworkEapSimGsmAuthRequest| request.
+   *
+   * @param params Params to be used for EAP GSM authentication.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  sendNetworkEapSimGsmAuthResponse(NetworkResponseEapSimGsmAuthParams params)
+      generates (SupplicantStatus status);
+
+  /**
+   * Used to send a response to the
+   * |ISupplicantNetworkCallback.onNetworkEapSimUmtsAuthRequest| request.
+   *
+   * @param params Params to be used for EAP UMTS authentication.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  sendNetworkEapSimUmtsAuthResponse(NetworkResponseEapSimUmtsAuthParams params)
+      generates (SupplicantStatus status);
+
+  /**
+   * Used to send a response to the
+   * |ISupplicantNetworkCallback.onNetworkEapIdentityRequest| request.
+   *
+   * @param identity Identity to be used for the network.
+   * @return status Status of the operation.
+   *         Possible status codes:
+   *         |SupplicantStatusCode.SUCCESS|,
+   *         |SupplicantStatusCode.FAILURE_UNKNOWN|,
+   *         |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
+   */
+  sendNetworkEapIdentityResponse(vec<uint8_t> identity)
+      generates (SupplicantStatus status);
+};
diff --git a/wifi/supplicant/1.0/ISupplicantNetworkCallback.hal b/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.hal
similarity index 93%
rename from wifi/supplicant/1.0/ISupplicantNetworkCallback.hal
rename to wifi/supplicant/1.0/ISupplicantStaNetworkCallback.hal
index 9a5ddd5..2419dcc 100644
--- a/wifi/supplicant/1.0/ISupplicantNetworkCallback.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaNetworkCallback.hal
@@ -18,13 +18,13 @@
 
 /**
  * Callback Interface exposed by the wpa_supplicant service
- * for each network (ISupplicantNetwork).
+ * for each network (ISupplicantStaNetwork).
  *
  * Clients need to host an instance of this HIDL interface object and
  * pass a reference of the object to wpa_supplicant via the
- * corresponding |ISupplicantNetwork.registerCallback| method.
+ * corresponding |ISupplicantStaNetwork.registerCallback| method.
  */
-interface ISupplicantNetworkCallback {
+interface ISupplicantStaNetworkCallback {
   /** Params of |onNetworkEapSimGsmAuthRequest| request. (Refer RFC 4186) */
   typedef uint8_t[16] GsmRand;
   struct NetworkRequestEapSimGsmAuthParams {
diff --git a/wifi/supplicant/1.0/types.hal b/wifi/supplicant/1.0/types.hal
index e9426a6..16a8d15 100644
--- a/wifi/supplicant/1.0/types.hal
+++ b/wifi/supplicant/1.0/types.hal
@@ -65,3 +65,11 @@
 
 /** Supplicant network ID type. */
 typedef uint32_t SupplicantNetworkId;
+
+/**
+ * List of Iface types supported.
+ */
+enum IfaceType : uint32_t {
+  STA,
+  P2P
+};