Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b29739e1 authored by Steven Moreland's avatar Steven Moreland Committed by android-build-merger
Browse files

Merge "Revert "HIDL Java getService now the same as C++."" am: 65d1e549

am: 4868f531

Change-Id: I80789cb8e1cf0d49e3f85fffe29a12eb74b7726e
parents 24611949 4868f531
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -48,8 +48,7 @@ public abstract class HwBinder implements IHwBinder {

    public static native final IHwBinder getService(
            String iface,
            String serviceName,
            boolean isTry)
            String serviceName)
        throws RemoteException, NoSuchElementException;

    public static native final void configureRpcThreadpool(
+4 −4
Original line number Diff line number Diff line
@@ -303,8 +303,7 @@ static jobject JHwBinder_native_getService(
        JNIEnv *env,
        jclass /* clazzObj */,
        jstring ifaceNameObj,
        jstring serviceNameObj,
        jboolean isTry) {
        jstring serviceNameObj) {

    using ::android::hidl::base::V1_0::IBase;
    using ::android::hardware::details::getRawServiceInternal;
@@ -332,7 +331,8 @@ static jobject JHwBinder_native_getService(
    std::string serviceName(serviceNameCStr);
    env->ReleaseStringUTFChars(serviceNameObj, serviceNameCStr);

    sp<IBase> ret = getRawServiceInternal(ifaceName, serviceName, !isTry /* retry */, false /* getStub */);
    // TODO(b/67981006): true /* retry */
    sp<IBase> ret = getRawServiceInternal(ifaceName, serviceName, false /* retry */, false /* getStub */); 
    sp<hardware::IBinder> service = hardware::toBinder<hidl::base::V1_0::IBase>(ret);

    if (service == NULL) {
@@ -371,7 +371,7 @@ static JNINativeMethod gMethods[] = {
    { "registerService", "(Ljava/lang/String;)V",
        (void *)JHwBinder_native_registerService },

    { "getService", "(Ljava/lang/String;Ljava/lang/String;Z)L" PACKAGE_PATH "/IHwBinder;",
    { "getService", "(Ljava/lang/String;Ljava/lang/String;)L" PACKAGE_PATH "/IHwBinder;",
        (void *)JHwBinder_native_getService },

    { "configureRpcThreadpool", "(JZ)V",