Revert "Wait for hwservicemanager in defaultServiceManager." am: ec64c65eed am: 12202786a6
am: ead0c6c55c

Change-Id: I149098cef576114ecd8146f97f81761ec5ab7586
diff --git a/base/HidlSupport.cpp b/base/HidlSupport.cpp
index e97797d..91c9717 100644
--- a/base/HidlSupport.cpp
+++ b/base/HidlSupport.cpp
@@ -147,6 +147,7 @@
 }
 
 void hidl_handle::setTo(native_handle_t* handle, bool shouldOwn) {
+    freeHandle();
     mHandle = handle;
     mOwnsHandle = shouldOwn;
 }
diff --git a/manifest.xml b/manifest.xml
index 3fe38e7..c4fd16f 100644
--- a/manifest.xml
+++ b/manifest.xml
@@ -35,4 +35,13 @@
             <instance>default</instance>
         </interface>
     </hal>
+    <hal>
+        <name>android.frameworks.sensorservice</name>
+        <transport>hwbinder</transport>
+        <version>1.0</version>
+        <interface>
+            <name>ISensorManager</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
 </manifest>