Merge \"ImageReader: Make close thread safe\" into nyc-mr1-dev

am: 2f8bf1f024

Change-Id: I9954f6b7b7ab997391acbe3f16cbce36d9c5de3c
This commit is contained in:
Chien-Yu Chen
2016-07-19 21:12:07 +00:00
committed by android-build-merger

View File

@@ -512,11 +512,11 @@ public class ImageReader implements AutoCloseable {
mAcquiredImages.clear();
nativeClose();
}
if (mEstimatedNativeAllocBytes > 0) {
VMRuntime.getRuntime().registerNativeFree(mEstimatedNativeAllocBytes);
mEstimatedNativeAllocBytes = 0;
if (mEstimatedNativeAllocBytes > 0) {
VMRuntime.getRuntime().registerNativeFree(mEstimatedNativeAllocBytes);
mEstimatedNativeAllocBytes = 0;
}
}
}