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
|
||||
public void destroy() {
|
||||
if (mNativeObject != 0) {
|
||||
nativeDestroy(mNativeObject);
|
||||
synchronized (mLock) {
|
||||
if (mNativeObject != 0) {
|
||||
nativeDestroy(mNativeObject);
|
||||
}
|
||||
release();
|
||||
}
|
||||
release();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user