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

Commit a94fc524 authored by Christopher Wiley's avatar Christopher Wiley
Browse files

Map Errors.h's UNEXPECTED_NULL to NullPointerException

Many native services reject null references with this status_t.
Map it to an appropriate exception for Java Binder clients.

Bug: 25615695
Change-Id: I16a4f44da35839892fc4d332f95382f06485b2a7
parent 8e19803a
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -711,6 +711,9 @@ void signalExceptionForError(JNIEnv* env, jobject obj, status_t err,
            jniThrowException(env, "java/lang/RuntimeException",
                    "Not allowed to write file descriptors here");
            break;
        case UNEXPECTED_NULL:
            jniThrowNullPointerException(env, NULL);
            break;
        case -EBADF:
            jniThrowException(env, "java/lang/RuntimeException",
                    "Bad file descriptor");