am d7035c58: Merge "Fix a hang in SF caused by invalid transform matrix from the WM" into ics-mr0

* commit 'd7035c58b006b62084232c8db6c4f7c4002170cc':
  Fix a hang in SF caused by invalid transform matrix from the WM
This commit is contained in:
Dave Burke
2011-10-18 22:34:51 -07:00
committed by Android Git Automerger

View File

@@ -1120,7 +1120,11 @@ final class WindowState implements WindowManagerPolicy.WindowState {
// window's center).
final float w = frame.width();
final float h = frame.height();
tmpMatrix.setScale(1 + 2/w, 1 + 2/h, w/2, h/2);
if (w>=1 && h>=1) {
tmpMatrix.setScale(1 + 2/w, 1 + 2/h, w/2, h/2);
} else {
tmpMatrix.reset();
}
} else {
tmpMatrix.reset();
}