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

Commit fdf4c6f7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "binder - include calling PID/UID in uncaught remote exception code" am:...

Merge "binder - include calling PID/UID in uncaught remote exception code" am: ea62c769 am: ac0f55b4 am: 816bcf29

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



Change-Id: I9a8536bb910a9c24248126444d82aadee3e6d3f7
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 240c3926 816bcf29
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -413,9 +413,13 @@ protected:

        if (env->ExceptionCheck()) {
            ScopedLocalRef<jthrowable> excep(env, env->ExceptionOccurred());
            binder_report_exception(env, excep.get(),
                                    "*** Uncaught remote exception!  "
                                    "(Exceptions are not yet supported across processes.)");

            auto state = IPCThreadState::self();
            String8 msg;
            msg.appendFormat("*** Uncaught remote exception! Exceptions are not yet supported "
                             "across processes. Client PID %d UID %d.",
                             state->getCallingPid(), state->getCallingUid());
            binder_report_exception(env, excep.get(), msg.c_str());
            res = JNI_FALSE;
        }

@@ -431,6 +435,7 @@ protected:
            ScopedLocalRef<jthrowable> excep(env, env->ExceptionOccurred());
            binder_report_exception(env, excep.get(),
                                    "*** Uncaught exception in onBinderStrictModePolicyChange");
            // TODO: should turn this to fatal?
        }

        // Need to always call through the native implementation of