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

Commit 0375cb04 authored by Chien-Yu Chen's avatar Chien-Yu Chen
Browse files

ImageWriter: Remove exception for closing twice

because close() will be called again when GC kicks in.

Bug: 20945169
Change-Id: If3c5a13be241977ccf4692d5301c423b7ff38918
parent 98b40aac
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -361,8 +361,7 @@ static void ImageWriter_close(JNIEnv* env, jobject thiz, jlong nativeCtx) {
    ALOGV("%s:", __FUNCTION__);
    JNIImageWriterContext* const ctx = reinterpret_cast<JNIImageWriterContext *>(nativeCtx);
    if (ctx == NULL || thiz == NULL) {
        jniThrowException(env, "java/lang/IllegalStateException",
                "ImageWriterContext is not initialized");
        // ImageWriter is already closed.
        return;
    }