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

Commit 9e6d073a authored by Zhijun He's avatar Zhijun He
Browse files

ImageReader: fix the 0 crop rect size issue

Rect isValid actually include the zero size case, which we don't want to include
in our case. This causes camera ImageReader test case fails at buffer size
sanity check.

Bug: 9802344
Change-Id: I561f5a049c6117c613df1e1b2789c43af9a19628
parent 0a6a80f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -737,7 +737,7 @@ static jint ImageReader_imageSetup(JNIEnv* env, jobject thiz,
    int outputHeight = buffer->height;

    // Correct width/height when crop is set.
    if (buffer->crop.isValid()) {
    if (!buffer->crop.isEmpty()) {
        outputWidth = buffer->crop.getWidth();
        outputHeight = buffer->crop.getHeight();
    }