HAL test: statically test the size of HAL structs

Ensure none of the HAL structs change size over time.
Issues might arise when making changes without taking the different
pointer sizes for specific architectures into account.

Change-Id: I63f00004a23f09b2f46df01e7c69296766a5d03f
diff --git a/tests/hardware/Android.mk b/tests/hardware/Android.mk
new file mode 100644
index 0000000..90cae87
--- /dev/null
+++ b/tests/hardware/Android.mk
@@ -0,0 +1,12 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := struct-size
+LOCAL_SRC_FILES := struct-size.cpp
+LOCAL_SHARED_LIBRARIES := libhardware
+LOCAL_CFLAGS := -std=gnu++11 -O0
+
+LOCAL_C_INCLUDES += \
+    system/media/camera/include
+
+include $(BUILD_STATIC_LIBRARY)