Replace IInterface::asBinder() with a static

so we can do NULL checks again, and update calls to IInterface::asBinder()
to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
diff --git a/IInterface.cpp b/IInterface.cpp
index 99a9ffe..8c60dc4 100644
--- a/IInterface.cpp
+++ b/IInterface.cpp
@@ -27,14 +27,18 @@
 IInterface::~IInterface() {
 }
 
-sp<IBinder> IInterface::asBinder()
+// static
+sp<IBinder> IInterface::asBinder(const IInterface* iface)
 {
-    return onAsBinder();
+    if (iface == NULL) return NULL;
+    return const_cast<IInterface*>(iface)->onAsBinder();
 }
 
-sp<const IBinder> IInterface::asBinder() const
+// static
+sp<IBinder> IInterface::asBinder(const sp<IInterface>& iface)
 {
-    return const_cast<IInterface*>(this)->onAsBinder();
+    if (iface == NULL) return NULL;
+    return iface->onAsBinder();
 }
 
 // ---------------------------------------------------------------------------