Loading core/java/android/os/HwBinder.java +10 −3 Original line number Diff line number Diff line Loading @@ -16,10 +16,10 @@ package android.os; import java.util.ArrayList; import java.util.NoSuchElementException; import libcore.util.NativeAllocationRegistry; import java.util.NoSuchElementException; /** @hide */ public abstract class HwBinder implements IHwBinder { private static final String TAG = "HwBinder"; Loading @@ -46,9 +46,16 @@ public abstract class HwBinder implements IHwBinder { public native final void registerService(String serviceName) throws RemoteException; public static native final IHwBinder getService( public static final IHwBinder getService( String iface, String serviceName) throws RemoteException, NoSuchElementException { return getService(iface, serviceName, false /* retry */); } public static native final IHwBinder getService( String iface, String serviceName, boolean retry) throws RemoteException, NoSuchElementException; public static native final void configureRpcThreadpool( Loading core/jni/android_os_HwBinder.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -296,7 +296,8 @@ static jobject JHwBinder_native_getService( JNIEnv *env, jclass /* clazzObj */, jstring ifaceNameObj, jstring serviceNameObj) { jstring serviceNameObj, jboolean retry) { using ::android::hidl::base::V1_0::IBase; using ::android::hardware::details::getRawServiceInternal; Loading @@ -319,8 +320,7 @@ static jobject JHwBinder_native_getService( serviceName = str.c_str(); } // TODO(b/67981006): true /* retry */ sp<IBase> ret = getRawServiceInternal(ifaceName, serviceName, false /* retry */, false /* getStub */); sp<IBase> ret = getRawServiceInternal(ifaceName, serviceName, retry /* retry */, false /* getStub */); sp<hardware::IBinder> service = hardware::toBinder<hidl::base::V1_0::IBase>(ret); if (service == NULL) { Loading Loading @@ -360,7 +360,7 @@ static JNINativeMethod gMethods[] = { { "registerService", "(Ljava/lang/String;)V", (void *)JHwBinder_native_registerService }, { "getService", "(Ljava/lang/String;Ljava/lang/String;)L" PACKAGE_PATH "/IHwBinder;", { "getService", "(Ljava/lang/String;Ljava/lang/String;Z)L" PACKAGE_PATH "/IHwBinder;", (void *)JHwBinder_native_getService }, { "configureRpcThreadpool", "(JZ)V", Loading Loading
core/java/android/os/HwBinder.java +10 −3 Original line number Diff line number Diff line Loading @@ -16,10 +16,10 @@ package android.os; import java.util.ArrayList; import java.util.NoSuchElementException; import libcore.util.NativeAllocationRegistry; import java.util.NoSuchElementException; /** @hide */ public abstract class HwBinder implements IHwBinder { private static final String TAG = "HwBinder"; Loading @@ -46,9 +46,16 @@ public abstract class HwBinder implements IHwBinder { public native final void registerService(String serviceName) throws RemoteException; public static native final IHwBinder getService( public static final IHwBinder getService( String iface, String serviceName) throws RemoteException, NoSuchElementException { return getService(iface, serviceName, false /* retry */); } public static native final IHwBinder getService( String iface, String serviceName, boolean retry) throws RemoteException, NoSuchElementException; public static native final void configureRpcThreadpool( Loading
core/jni/android_os_HwBinder.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -296,7 +296,8 @@ static jobject JHwBinder_native_getService( JNIEnv *env, jclass /* clazzObj */, jstring ifaceNameObj, jstring serviceNameObj) { jstring serviceNameObj, jboolean retry) { using ::android::hidl::base::V1_0::IBase; using ::android::hardware::details::getRawServiceInternal; Loading @@ -319,8 +320,7 @@ static jobject JHwBinder_native_getService( serviceName = str.c_str(); } // TODO(b/67981006): true /* retry */ sp<IBase> ret = getRawServiceInternal(ifaceName, serviceName, false /* retry */, false /* getStub */); sp<IBase> ret = getRawServiceInternal(ifaceName, serviceName, retry /* retry */, false /* getStub */); sp<hardware::IBinder> service = hardware::toBinder<hidl::base::V1_0::IBase>(ret); if (service == NULL) { Loading Loading @@ -360,7 +360,7 @@ static JNINativeMethod gMethods[] = { { "registerService", "(Ljava/lang/String;)V", (void *)JHwBinder_native_registerService }, { "getService", "(Ljava/lang/String;Ljava/lang/String;)L" PACKAGE_PATH "/IHwBinder;", { "getService", "(Ljava/lang/String;Ljava/lang/String;Z)L" PACKAGE_PATH "/IHwBinder;", (void *)JHwBinder_native_getService }, { "configureRpcThreadpool", "(JZ)V", Loading