Merge "Lock in Surface#destroy" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
1559113427
@@ -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