Build power.ranchu and add power hal to manifest.xml

Bug: 37302997
Bug: 37863919

Test: Build and run sdk_google_aw_x86-userdebug emulator

Change-Id: Id8fc018b005b011426d3e0bc885ee8ef00dec1eb
(cherry picked from commit 4aa73d308e16905c5971d7c7ede464a824ed770a)
diff --git a/manifest.xml b/manifest.xml
index 0d2ffe0..7d359a0 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -24,11 +24,11 @@
         </interface>
     </hal>
     <hal format="hidl">
-        <name>android.hardware.graphics.mapper</name>
-        <transport arch="32+64">passthrough</transport>
-        <version>2.0</version>
+        <name>android.hardware.power</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
         <interface>
-            <name>IMapper</name>
+            <name>IPower</name>
             <instance>default</instance>
         </interface>
     </hal>
diff --git a/power/Android.mk b/power/Android.mk
index ffbc457..3839088 100644
--- a/power/Android.mk
+++ b/power/Android.mk
@@ -27,3 +27,14 @@
 LOCAL_MODULE := power.goldfish
 LOCAL_MODULE_TAGS := optional
 include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_RELATIVE_PATH := hw
+LOCAL_CFLAGS += -DQEMU_HARDWARE
+LOCAL_SHARED_LIBRARIES := liblog libcutils
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include
+LOCAL_SRC_FILES := power_qemu.c
+LOCAL_MODULE := power.ranchu
+LOCAL_MODULE_TAGS := optional
+include $(BUILD_SHARED_LIBRARY)