diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-12-16 13:07:28 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-12-16 13:07:28 -0800 |
commit | 64b591de33c53c0d41228ab494295cbf92d18315 (patch) | |
tree | c70996364a4a06d5b392bf041e657373a80233bf /services | |
parent | 060f2175465c61b4461439b82ecc387534938f32 (diff) | |
parent | cb8f0e099c0e149b6fcc477f9b554a2688f99820 (diff) | |
download | frameworks_base-64b591de33c53c0d41228ab494295cbf92d18315.zip frameworks_base-64b591de33c53c0d41228ab494295cbf92d18315.tar.gz frameworks_base-64b591de33c53c0d41228ab494295cbf92d18315.tar.bz2 |
Merge "Fix issue #3291975: Google services frame work crash..."
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/WindowManagerService.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/java/com/android/server/WindowManagerService.java b/services/java/com/android/server/WindowManagerService.java index ba7692d..3cf8138 100644 --- a/services/java/com/android/server/WindowManagerService.java +++ b/services/java/com/android/server/WindowManagerService.java @@ -4958,7 +4958,7 @@ public class WindowManagerService extends IWindowManager.Stub } Binder.restoreCallingIdentity(ident); - if (frame.isEmpty()) { + if (frame.isEmpty() || maxLayer == 0) { return null; } @@ -4990,6 +4990,10 @@ public class WindowManagerService extends IWindowManager.Stub rawss = Surface.screenshot(dw, dh, 0, maxLayer); } + if (rawss == null) { + return null; + } + Bitmap bm = Bitmap.createBitmap(sw, sh, rawss.getConfig()); Matrix matrix = new Matrix(); ScreenRotationAnimation.createRotationMatrix(rot, dw, dh, matrix); |