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

Commit 59d25d00 authored by Mike Lockwood's avatar Mike Lockwood
Browse files

Catch Java exceptions in the FileObserver JNI code



Change-Id: I8aed85baadef7a3ea80333b33df0743e0d349915
BUG: 2404428
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent fc081668
Loading
Loading
Loading
Loading
+16 −12
Original line number Diff line number Diff line
@@ -84,6 +84,10 @@ static void android_os_fileobserver_observe(JNIEnv* env, jobject object, jint fd
            }

            env->CallVoidMethod(object, method_onEvent, event->wd, event->mask, path);
            if (env->ExceptionCheck()) {
                env->ExceptionDescribe();
                env->ExceptionClear();
            }
            if (path != NULL)
            {
                env->DeleteLocalRef(path);