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

Commit d0495c9f authored by Rob Carr's avatar Rob Carr Committed by Automerger Merge Worker
Browse files

Merge "ANativeWindow_fromSurface: Use acquire not incStrong" into sc-dev am: b71cd0f5

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14443411

Change-Id: If8b3f2031530c7a9a466610372a84a399dc88ec0
parents 0bc579d9 b71cd0f5
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -30,7 +30,7 @@ using namespace android;
ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface) {
ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface) {
    sp<ANativeWindow> win = android_view_Surface_getNativeWindow(env, surface);
    sp<ANativeWindow> win = android_view_Surface_getNativeWindow(env, surface);
    if (win != NULL) {
    if (win != NULL) {
        win->incStrong((void*)ANativeWindow_fromSurface);
        ANativeWindow_acquire(win.get());
    }
    }
    return win.get();
    return win.get();
}
}