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

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

ImageReader: Make close thread safe

Bug: 30191606
Change-Id: Ic5b53c416a7fe3ebcaad2ab78f2e9aef3b790c88
parent ff080be0
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -512,13 +512,13 @@ public class ImageReader implements AutoCloseable {
            mAcquiredImages.clear();

            nativeClose();
        }

            if (mEstimatedNativeAllocBytes > 0) {
                VMRuntime.getRuntime().registerNativeFree(mEstimatedNativeAllocBytes);
                mEstimatedNativeAllocBytes = 0;
            }
        }
    }

    @Override
    protected void finalize() throws Throwable {