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

Commit 15591134 authored by Chavi Weingarten's avatar Chavi Weingarten Committed by Android (Google) Code Review
Browse files

Merge "Lock in Surface#destroy" into tm-dev

parents 7b11af45 40e361cb
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -341,11 +341,13 @@ public class Surface implements Parcelable {
     */
     */
    @UnsupportedAppUsage
    @UnsupportedAppUsage
    public void destroy() {
    public void destroy() {
        synchronized (mLock) {
            if (mNativeObject != 0) {
            if (mNativeObject != 0) {
                nativeDestroy(mNativeObject);
                nativeDestroy(mNativeObject);
            }
            }
            release();
            release();
        }
        }
    }


    /**
    /**
     * Destroys the HwuiContext without completely
     * Destroys the HwuiContext without completely