Creates a libdumpstateheaders module to export headers.

Currently, the device-specific dumpstate projects uses dumpstate.h
by importing just the header in the their makefiles:

LOCAL_C_INCLUDES := frameworks/native/cmds/dumpstate

But this approach makes it hard to include external stuff on
dumpstate.h (like common macros) because it breaks the device-specific
builds (unless they are changed to include the proper shared library
dependency).

A better approach is to define a libdumpstateheaders that contains the
proper dependencies, and let the projects use it instead:

LOCAL_STATIC_LIBRARIES := libdumpstateheaders

BUG: 26379932
BUG: 31982882
Test: DumpstateTest passes and manual verification

Change-Id: Iaabff379aded412f33cda1f93f3253866aff9f25
diff --git a/cmds/dumpstate/Android.mk b/cmds/dumpstate/Android.mk
index 695e464..116650d 100644
--- a/cmds/dumpstate/Android.mk
+++ b/cmds/dumpstate/Android.mk
@@ -20,6 +20,25 @@
         liblog \
         libselinux
 
+# ====================#
+# libdumpstateheaders #
+# ====================#
+# TODO: this module is necessary so the device-specific libdumpstate implementations do not
+# need to add any other dependency (like libbase). Should go away once dumpstate HAL changes.
+include $(CLEAR_VARS)
+
+LOCAL_EXPORT_C_INCLUDE_DIRS = $(LOCAL_PATH)
+LOCAL_MODULE := libdumpstateheaders
+LOCAL_EXPORT_SHARED_LIBRARY_HEADERS := \
+        $(COMMON_SHARED_LIBRARIES)
+LOCAL_EXPORT_STATIC_LIBRARY_HEADERS := \
+        $(COMMON_ZIP_LIBRARIES)
+# Soong requires that whats is on LOCAL_EXPORTED_ is also on LOCAL_
+LOCAL_SHARED_LIBRARIES := $(LOCAL_EXPORT_SHARED_LIBRARY_HEADERS)
+LOCAL_STATIC_LIBRARIES := $(LOCAL_EXPORT_STATIC_LIBRARY_HEADERS)
+
+include $(BUILD_STATIC_LIBRARY)
+
 # ==========#
 # dumpstate #
 # ==========#