am 8d25eab1: Merge "Releasing lock even if exception is thrown."

* commit '8d25eab10523ac2424dc645dc697126dbadad588':
  Releasing lock even if exception is thrown.
This commit is contained in:
Brad Fitzpatrick
2011-03-15 11:37:37 -07:00
committed by Android Git Automerger

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();
}
}
}