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

Commit 5e8fbec6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Fix the crash issue in TruePortrait"

parents 3721f9b6 bfa01f5d
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -97,15 +97,17 @@ public class TruePortraitNativeEngine {
    }

    public boolean init(Context context, Bitmap src, Rect[] faces) {
        setFacesDetected(true);
        boolean result = false; 
        if(nativeInit(src, faces.length, faces)) {
            nativeGetPreviewSize(mPreviewSize);
            result = nativeGetPreviewSize(mPreviewSize);
        }
        if (result) {
            mSketchBm = BitmapFactory.decodeResource(context.getResources(), R.raw.sketch_bm);
            return true;
        } else {
            mSketchBm = null;
            return false;
        }
        setFacesDetected(result);   
        return result;
    }

    public void release() {