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

Commit 0cf7f4da authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "HIDL Java: DeadObjectException" am: 628198a9 am: d16ad56f am:...

Merge "HIDL Java: DeadObjectException" am: 628198a9 am: d16ad56f am: 6a969595 am: 5ae197cb am: d753383b

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1355810

Change-Id: I8e147fb8895ea98c643cc7bff7295eae13bb5300
parents be844008 d753383b
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -122,10 +122,18 @@ void signalExceptionForError(JNIEnv *env, status_t err, bool canThrowRemoteExcep
            std::stringstream ss;
            ss << "HwBinder Error: (" << err << ")";

            jniThrowException(
                    env,
                    canThrowRemoteException ? "android/os/RemoteException" : "java/lang/RuntimeException",
                    ss.str().c_str());
            const char* exception = nullptr;
            if (canThrowRemoteException) {
                if (err == DEAD_OBJECT) {
                    exception = "android/os/DeadObjectException";
                } else {
                    exception = "android/os/RemoteException";
                }
            } else {
                exception = "java/lang/RuntimeException";
            }

            jniThrowException(env, exception, ss.str().c_str());

            break;
        }