Merge "Lock in Surface#destroy" into tm-dev am: 1559113427
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18283681 Change-Id: I6d3c713b74465a15dd15a14b10ca3d3fd32ed79b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -341,10 +341,12 @@ public class Surface implements Parcelable {
|
|||||||
*/
|
*/
|
||||||
@UnsupportedAppUsage
|
@UnsupportedAppUsage
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
if (mNativeObject != 0) {
|
synchronized (mLock) {
|
||||||
nativeDestroy(mNativeObject);
|
if (mNativeObject != 0) {
|
||||||
|
nativeDestroy(mNativeObject);
|
||||||
|
}
|
||||||
|
release();
|
||||||
}
|
}
|
||||||
release();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user