Hidlize IBase and use IBase instead of IBinder.

Note: system/libhidl/base is the libhidlbase project.
system/libhidl/transport/base is the
android.hidl.base@1.0 HAL files.

Test: hidl_test

Change-Id: Ic3464b5e50c0896de9b26f44a409496f8df37c39
diff --git a/transport/include/hidl/HidlBinderSupport.h b/transport/include/hidl/HidlBinderSupport.h
index d6a308b..fb209c4 100644
--- a/transport/include/hidl/HidlBinderSupport.h
+++ b/transport/include/hidl/HidlBinderSupport.h
@@ -320,19 +320,18 @@
     {                                                                                    \
         using ::android::sp;                                                             \
         using ::android::hardware::defaultServiceManager;                                \
-        using ::android::hardware::IBinder;                                              \
         using ::android::hidl::manager::V1_0::IServiceManager;                           \
         sp<I##INTERFACE> iface;                                                          \
         const sp<IServiceManager> sm = defaultServiceManager();                          \
         if (sm != nullptr && !getStub) {                                                 \
-            sp<IBinder> binderIface;                                                     \
+            sp<::android::hidl::base::V1_0::IBase> base;                                 \
             ::android::hardware::Return<void> ret =                                      \
                 sm->get(PACKAGE "::I" #INTERFACE, serviceName.c_str(),                   \
-                    [&binderIface](sp<IBinder> iface) {                                  \
-                        binderIface = iface;                                             \
+                    [&base](sp<::android::hidl::base::V1_0::IBase> found) {              \
+                        base = found;                                                    \
                     });                                                                  \
             if (ret.getStatus().isOk()) {                                                \
-                iface = IHw##INTERFACE::asInterface(binderIface);                        \
+                iface = I##INTERFACE::castFrom(base);                                    \
                 if (iface != nullptr) {                                                  \
                     return iface;                                                        \
                 }                                                                        \