summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Burke <daveburke@google.com>2011-10-18 22:33:40 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-10-18 22:33:40 -0700
commitd7035c58b006b62084232c8db6c4f7c4002170cc (patch)
treeab6011cd7d51c995bf36948ba669aa391f9b007b
parent5264f6003bbcb8ca70df034379154914260cc322 (diff)
parent526f0a0e158cf46c244edc57624c15ebce26c71f (diff)
downloadframeworks_base-d7035c58b006b62084232c8db6c4f7c4002170cc.zip
frameworks_base-d7035c58b006b62084232c8db6c4f7c4002170cc.tar.gz
frameworks_base-d7035c58b006b62084232c8db6c4f7c4002170cc.tar.bz2
Merge "Fix a hang in SF caused by invalid transform matrix from the WM" into ics-mr0
-rw-r--r--services/java/com/android/server/wm/WindowState.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/services/java/com/android/server/wm/WindowState.java b/services/java/com/android/server/wm/WindowState.java
index e921818..eeffb02 100644
--- a/services/java/com/android/server/wm/WindowState.java
+++ b/services/java/com/android/server/wm/WindowState.java
@@ -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();
}