Camera: Switch camera2 to auto-gen C++ binder interfaces

 - Move camera service AIDL files to frameworks/av
 - Build C++ interface stubs with AIDL tools
 - Add necessary native-side parcelables and update existing ones
 - Remove manually-written stubs, rearrange remaining manual stubs
 - Adjust implementations to work with auto-generated stubs
   - Adjust method signatures for auto-gen differences
   - Add rich error messages using binder::Status

Bug: 25091611
Change-Id: I6f69f34b9d1a3f8d1fb7db87357363f8fa8483ff
diff --git a/camera/aidl/android/hardware/CameraInfo.aidl b/camera/aidl/android/hardware/CameraInfo.aidl
new file mode 100644
index 0000000..c6a3a61
--- /dev/null
+++ b/camera/aidl/android/hardware/CameraInfo.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2013 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;
+
+/** @hide */
+parcelable CameraInfo cpp_header "camera/CameraBase.h";
diff --git a/camera/aidl/android/hardware/ICamera.aidl b/camera/aidl/android/hardware/ICamera.aidl
new file mode 100644
index 0000000..f9db842
--- /dev/null
+++ b/camera/aidl/android/hardware/ICamera.aidl
@@ -0,0 +1,28 @@
+/*
+ * Copyright (C) 2013 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;
+
+/** @hide */
+interface ICamera
+{
+    /**
+     * Only one call exposed, for ICameraService testing purposes
+     *
+     * Keep up-to-date with frameworks/av/include/camera/ICamera.h
+     */
+    void disconnect();
+}
diff --git a/camera/aidl/android/hardware/ICameraClient.aidl b/camera/aidl/android/hardware/ICameraClient.aidl
new file mode 100644
index 0000000..808edee
--- /dev/null
+++ b/camera/aidl/android/hardware/ICameraClient.aidl
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2013 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;
+
+/** @hide */
+interface ICameraClient
+{
+    // For now, empty because there is a manual implementation
+}
diff --git a/camera/aidl/android/hardware/ICameraService.aidl b/camera/aidl/android/hardware/ICameraService.aidl
new file mode 100644
index 0000000..e94fd0c
--- /dev/null
+++ b/camera/aidl/android/hardware/ICameraService.aidl
@@ -0,0 +1,147 @@
+/*
+ * Copyright (C) 2013 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;
+
+import android.hardware.ICamera;
+import android.hardware.ICameraClient;
+import android.hardware.camera2.ICameraDeviceUser;
+import android.hardware.camera2.ICameraDeviceCallbacks;
+import android.hardware.camera2.params.VendorTagDescriptor;
+import android.hardware.camera2.impl.CameraMetadataNative;
+import android.hardware.ICameraServiceListener;
+import android.hardware.CameraInfo;
+
+/**
+ * Binder interface for the native camera service running in mediaserver.
+ *
+ * @hide
+ */
+interface ICameraService
+{
+    /**
+     * All camera service and device Binder calls may return a
+     * ServiceSpecificException with the following error codes
+     */
+    const int ERROR_PERMISSION_DENIED = 1;
+    const int ERROR_ALREADY_EXISTS = 2;
+    const int ERROR_ILLEGAL_ARGUMENT = 3;
+    const int ERROR_DISCONNECTED = 4;
+    const int ERROR_TIMED_OUT = 5;
+    const int ERROR_DISABLED = 6;
+    const int ERROR_CAMERA_IN_USE = 7;
+    const int ERROR_MAX_CAMERAS_IN_USE = 8;
+    const int ERROR_DEPRECATED_HAL = 9;
+    const int ERROR_INVALID_OPERATION = 10;
+
+    /**
+     * Types for getNumberOfCameras
+     */
+    const int CAMERA_TYPE_BACKWARD_COMPATIBLE = 0;
+    const int CAMERA_TYPE_ALL = 1;
+
+    /**
+     * Return the number of camera devices available in the system
+     */
+    int getNumberOfCameras(int type);
+
+    /**
+     * Fetch basic camera information for a camera device
+     */
+    CameraInfo getCameraInfo(int cameraId);
+
+    /**
+     * Default UID/PID values for non-privileged callers of
+     * connect(), connectDevice(), and connectLegacy()
+     */
+    const int USE_CALLING_UID = -1;
+    const int USE_CALLING_PID = -1;
+
+    /**
+     * Open a camera device through the old camera API
+     */
+    ICamera connect(ICameraClient client,
+            int cameraId,
+            String opPackageName,
+            int clientUid, int clientPid);
+
+    /**
+     * Open a camera device through the new camera API
+     * Only supported for device HAL versions >= 3.2
+     */
+    ICameraDeviceUser connectDevice(ICameraDeviceCallbacks callbacks,
+            int cameraId,
+            String opPackageName,
+            int clientUid);
+
+    /**
+     * halVersion constant for connectLegacy
+     */
+    const int CAMERA_HAL_API_VERSION_UNSPECIFIED = -1;
+
+    /**
+     * Open a camera device in legacy mode, if supported by the camera module HAL.
+     */
+    ICamera connectLegacy(ICameraClient client,
+            int cameraId,
+            int halVersion,
+            String opPackageName,
+            int clientUid);
+
+    /**
+     * Add/remove listeners for changes to camera device and flashlight state
+     */
+    void addListener(ICameraServiceListener listener);
+    void removeListener(ICameraServiceListener listener);
+
+    /**
+     * Read the static camera metadata for a camera device.
+     * Only supported for device HAL versions >= 3.2
+     */
+    CameraMetadataNative getCameraCharacteristics(int cameraId);
+
+    /**
+     * Read in the vendor tag descriptors from the camera module HAL.
+     * Intended to be used by the native code of CameraMetadataNative to correctly
+     * interpret camera metadata with vendor tags.
+     */
+    VendorTagDescriptor getCameraVendorTagDescriptor();
+
+    /**
+     * Read the legacy camera1 parameters into a String
+     */
+    String getLegacyParameters(int cameraId);
+
+    /**
+     * apiVersion constants for supportsCameraApi
+     */
+    const int API_VERSION_1 = 1;
+    const int API_VERSION_2 = 2;
+
+    // Determines if a particular API version is supported directly
+    boolean supportsCameraApi(int cameraId, int apiVersion);
+
+    void setTorchMode(String CameraId, boolean enabled, IBinder clientBinder);
+
+    /**
+     * Notify the camera service of a system event.  Should only be called from system_server.
+     *
+     * Callers require the android.permission.CAMERA_SEND_SYSTEM_EVENTS permission.
+     */
+    const int EVENT_NONE = 0;
+    const int EVENT_USER_SWITCHED = 1;
+    oneway void notifySystemEvent(int eventId, in int[] args);
+}
diff --git a/camera/aidl/android/hardware/ICameraServiceListener.aidl b/camera/aidl/android/hardware/ICameraServiceListener.aidl
new file mode 100644
index 0000000..4e2a8c7
--- /dev/null
+++ b/camera/aidl/android/hardware/ICameraServiceListener.aidl
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2013 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;
+
+/** @hide */
+interface ICameraServiceListener
+{
+
+    /**
+     * Initial status will be transmitted with onStatusChange immediately
+     * after this listener is added to the service listener list.
+     *
+     * Allowed transitions:
+     *
+     *     (Any)               -> NOT_PRESENT
+     *     NOT_PRESENT         -> PRESENT
+     *     NOT_PRESENT         -> ENUMERATING
+     *     ENUMERATING         -> PRESENT
+     *     PRESENT             -> NOT_AVAILABLE
+     *     NOT_AVAILABLE       -> PRESENT
+     *
+     * A state will never immediately transition back to itself.
+     *
+     * The enums must match the values in
+     * include/hardware/camera_common.h when applicable
+     */
+    // Device physically unplugged
+    const int STATUS_NOT_PRESENT      = 0;
+    // Device physically has been plugged in and the camera can be used exlusively
+    const int STATUS_PRESENT          = 1;
+    // Device physically has been plugged in but it will not be connect-able until enumeration is
+    // complete
+    const int STATUS_ENUMERATING      = 2;
+    // Camera is in use by another app and cannot be used exclusively
+    const int STATUS_NOT_AVAILABLE    = -2;
+
+    // Use to initialize variables only
+    const int STATUS_UNKNOWN          = -1;
+
+    oneway void onStatusChanged(int status, int cameraId);
+
+    /**
+     * The torch mode status of a camera.
+     *
+     * Initial status will be transmitted with onTorchStatusChanged immediately
+     * after this listener is added to the service listener list.
+     *
+     * The enums must match the values in
+     * include/hardware/camera_common.h
+     */
+    // The camera's torch mode has become not available to use via
+    // setTorchMode().
+    const int TORCH_STATUS_NOT_AVAILABLE = 0;
+    // The camera's torch mode is off and available to be turned on via
+    // setTorchMode().
+    const int TORCH_STATUS_AVAILABLE_OFF = 1;
+    // The camera's torch mode is on and available to be turned off via
+    // setTorchMode().
+    const int TORCH_STATUS_AVAILABLE_ON  = 2;
+
+    // Use to initialize variables only
+    const int TORCH_STATUS_UNKNOWN = -1;
+
+    oneway void onTorchStatusChanged(int status, String cameraId);
+}
diff --git a/camera/aidl/android/hardware/ICameraServiceProxy.aidl b/camera/aidl/android/hardware/ICameraServiceProxy.aidl
new file mode 100644
index 0000000..0e654d5
--- /dev/null
+++ b/camera/aidl/android/hardware/ICameraServiceProxy.aidl
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2015 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;
+
+/**
+ * Binder interface for the camera service proxy running in system_server.
+ *
+ * Keep in sync with frameworks/av/include/camera/ICameraServiceProxy.h
+ *
+ * @hide
+ */
+interface ICameraServiceProxy
+{
+    /**
+     * Ping the service proxy to update the valid users for the camera service.
+     */
+    oneway void pingForUserUpdate();
+
+    /**
+     * Update the status of a camera device
+     */
+     oneway void notifyCameraState(String cameraId, int newCameraState);
+}
diff --git a/camera/aidl/android/hardware/camera2/CaptureRequest.aidl b/camera/aidl/android/hardware/camera2/CaptureRequest.aidl
new file mode 100644
index 0000000..9931fc7
--- /dev/null
+++ b/camera/aidl/android/hardware/camera2/CaptureRequest.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2013 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.camera2;
+
+/** @hide */
+parcelable CaptureRequest cpp_header "camera/camera2/CaptureRequest.h";
diff --git a/camera/aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl b/camera/aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl
new file mode 100644
index 0000000..ab57db5
--- /dev/null
+++ b/camera/aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2015 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.camera2;
+
+import android.hardware.camera2.impl.CameraMetadataNative;
+import android.hardware.camera2.impl.CaptureResultExtras;
+
+/** @hide */
+interface ICameraDeviceCallbacks
+{
+    // Error codes for onDeviceError
+    const int ERROR_CAMERA_INVALID_ERROR = -1; // To indicate all invalid error codes
+    const int ERROR_CAMERA_DISCONNECTED = 0;
+    const int ERROR_CAMERA_DEVICE = 1;
+    const int ERROR_CAMERA_SERVICE = 2;
+    const int ERROR_CAMERA_REQUEST = 3;
+    const int ERROR_CAMERA_RESULT = 4;
+    const int ERROR_CAMERA_BUFFER = 5;
+
+    oneway void onDeviceError(int errorCode, in CaptureResultExtras resultExtras);
+    oneway void onDeviceIdle();
+    oneway void onCaptureStarted(in CaptureResultExtras resultExtras, long timestamp);
+    oneway void onResultReceived(in CameraMetadataNative result,
+                                 in CaptureResultExtras resultExtras);
+    oneway void onPrepared(int streamId);
+}
diff --git a/camera/aidl/android/hardware/camera2/ICameraDeviceUser.aidl b/camera/aidl/android/hardware/camera2/ICameraDeviceUser.aidl
new file mode 100644
index 0000000..250f15e
--- /dev/null
+++ b/camera/aidl/android/hardware/camera2/ICameraDeviceUser.aidl
@@ -0,0 +1,121 @@
+/*
+ * Copyright (C) 2013 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.camera2;
+
+import android.hardware.camera2.CaptureRequest;
+import android.hardware.camera2.impl.CameraMetadataNative;
+import android.hardware.camera2.params.OutputConfiguration;
+import android.hardware.camera2.utils.SubmitInfo;
+import android.view.Surface;
+
+/** @hide */
+interface ICameraDeviceUser
+{
+    void disconnect();
+
+    const int NO_IN_FLIGHT_REPEATING_FRAMES = -1;
+
+    SubmitInfo submitRequest(in CaptureRequest request, boolean streaming);
+    SubmitInfo submitRequestList(in CaptureRequest[] requestList, boolean streaming);
+
+    /**
+     * Cancel the repeating request specified by requestId
+     * Returns the frame number of the last frame that will be produced from this
+     * repeating request, or NO_IN_FLIGHT_REPEATING_FRAMES if no frames were produced
+     * by this repeating request
+     */
+    long cancelRequest(int requestId);
+
+    /**
+     * Begin the device configuration.
+     *
+     * <p>
+     * beginConfigure must be called before any call to deleteStream, createStream,
+     * or endConfigure.  It is not valid to call this when the device is not idle.
+     * <p>
+     */
+    void beginConfigure();
+
+    /**
+     * End the device configuration.
+     *
+     * <p>
+     * endConfigure must be called after stream configuration is complete (i.e. after
+     * a call to beginConfigure and subsequent createStream/deleteStream calls).  This
+     * must be called before any requests can be submitted.
+     * <p>
+     */
+    void endConfigure(boolean isConstrainedHighSpeed);
+
+    void deleteStream(int streamId);
+
+    /**
+     * Create an output stream
+     *
+     * <p>Create an output stream based on the given output configuration</p>
+     *
+     * @param outputConfiguration size, format, and other parameters for the stream
+     * @return new stream ID
+     */
+    int createStream(in OutputConfiguration outputConfiguration);
+
+    /**
+     * Create an input stream
+     *
+     * <p>Create an input stream of width, height, and format</p>
+     *
+     * @param width Width of the input buffers
+     * @param height Height of the input buffers
+     * @param format Format of the input buffers. One of HAL_PIXEL_FORMAT_*.
+     *
+     * @return new stream ID
+     */
+    int createInputStream(int width, int height, int format);
+
+    /**
+     * Get the surface of the input stream.
+     *
+     * <p>It's valid to call this method only after a stream configuration is completed
+     * successfully and the stream configuration includes a input stream.</p>
+     *
+     * @param surface An output argument for the surface of the input stream buffer queue.
+     */
+    Surface getInputSurface();
+
+    // Keep in sync with public API in
+    // frameworks/base/core/java/android/hardware/camera2/CameraDevice.java
+    const int TEMPLATE_PREVIEW = 1;
+    const int TEMPLATE_STILL_CAPTURE = 2;
+    const int TEMPLATE_RECORD = 3;
+    const int TEMPLATE_VIDEO_SNAPSHOT = 4;
+    const int TEMPLATE_ZERO_SHUTTER_LAG = 5;
+    const int TEMPLATE_MANUAL = 6;
+
+    CameraMetadataNative createDefaultRequest(int templateId);
+
+    CameraMetadataNative getCameraInfo();
+
+    void waitUntilIdle();
+
+    long flush();
+
+    void prepare(int streamId);
+
+    void tearDown(int streamId);
+
+    void prepare2(int maxCount, int streamId);
+}
diff --git a/camera/aidl/android/hardware/camera2/impl/CameraMetadataNative.aidl b/camera/aidl/android/hardware/camera2/impl/CameraMetadataNative.aidl
new file mode 100644
index 0000000..507f575
--- /dev/null
+++ b/camera/aidl/android/hardware/camera2/impl/CameraMetadataNative.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2013 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.camera2.impl;
+
+/** @hide */
+parcelable CameraMetadataNative cpp_header "camera/CameraMetadata.h";
diff --git a/camera/aidl/android/hardware/camera2/impl/CaptureResultExtras.aidl b/camera/aidl/android/hardware/camera2/impl/CaptureResultExtras.aidl
new file mode 100644
index 0000000..5f47eda
--- /dev/null
+++ b/camera/aidl/android/hardware/camera2/impl/CaptureResultExtras.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2014 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.camera2.impl;
+
+/** @hide */
+parcelable CaptureResultExtras cpp_header "camera/CaptureResult.h";
diff --git a/camera/aidl/android/hardware/camera2/params/OutputConfiguration.aidl b/camera/aidl/android/hardware/camera2/params/OutputConfiguration.aidl
new file mode 100644
index 0000000..a8ad832
--- /dev/null
+++ b/camera/aidl/android/hardware/camera2/params/OutputConfiguration.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2015 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.camera2.params;
+
+/** @hide */
+parcelable OutputConfiguration cpp_header "camera/camera2/OutputConfiguration.h";
diff --git a/camera/aidl/android/hardware/camera2/params/VendorTagDescriptor.aidl b/camera/aidl/android/hardware/camera2/params/VendorTagDescriptor.aidl
new file mode 100644
index 0000000..9ee4263
--- /dev/null
+++ b/camera/aidl/android/hardware/camera2/params/VendorTagDescriptor.aidl
@@ -0,0 +1,20 @@
+/*
+ * 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.camera2.params;
+
+/** @hide */
+parcelable VendorTagDescriptor cpp_header "camera/VendorTagDescriptor.h";
diff --git a/camera/aidl/android/hardware/camera2/utils/SubmitInfo.aidl b/camera/aidl/android/hardware/camera2/utils/SubmitInfo.aidl
new file mode 100644
index 0000000..57531ad
--- /dev/null
+++ b/camera/aidl/android/hardware/camera2/utils/SubmitInfo.aidl
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2015 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.camera2.utils;
+
+/** @hide */
+parcelable SubmitInfo cpp_header "camera/camera2/SubmitInfo.h";