Merge "Releasing lock even if exception is thrown."

This commit is contained in:
Brad Fitzpatrick
2011-03-15 11:23:44 -07:00
committed by Android Code Review

View File

@@ -1065,10 +1065,11 @@ public final class ViewRoot extends Handler implements ViewParent,
}
}
mSurfaceHolder.mSurfaceLock.lock();
// Make surface invalid.
//mSurfaceHolder.mSurface.copyFrom(mSurface);
mSurfaceHolder.mSurface = new Surface();
mSurfaceHolder.mSurfaceLock.unlock();
try {
mSurfaceHolder.mSurface = new Surface();
} finally {
mSurfaceHolder.mSurfaceLock.unlock();
}
}
}