Revise camera HAL 2, and add unit test skeleton.

- Add missing method in stream_ops (set_buffers_geometry)

- Remove extra method in stream_ops (set_swap_interval)

- Document metadata queue protocol

- Change metadata queue methods to be set/get through function calls
  only, instead of a struct member in the HAL device ops.

- Change vendor extension tag query methods to be retrieved by a get
  call, instead of a struct member in the HAL device ops.

- Add basic gtest unit test skeleton, which currently just returns
  static info from all camera devices.

Change-Id: I94117097b0243023ad60638070cc7f0cefec18e6
diff --git a/tests/camera2/Android.mk b/tests/camera2/Android.mk
new file mode 100644
index 0000000..340ec30
--- /dev/null
+++ b/tests/camera2/Android.mk
@@ -0,0 +1,27 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= \
+	camera2.cpp
+
+LOCAL_SHARED_LIBRARIES := \
+	libutils \
+	libstlport \
+	libhardware \
+	libcamera_metadata
+
+LOCAL_STATIC_LIBRARIES := \
+	libgtest \
+	libgtest_main
+
+LOCAL_C_INCLUDES += \
+	bionic \
+	bionic/libstdc++/include \
+	external/gtest/include \
+	external/stlport/stlport \
+	system/media/camera/include \
+
+LOCAL_MODULE:= camera2_hal_tests
+LOCAL_MODULE_TAGS := tests
+
+include $(BUILD_EXECUTABLE)