summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-12-16 13:07:28 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-16 13:07:28 -0800
commit64b591de33c53c0d41228ab494295cbf92d18315 (patch)
treec70996364a4a06d5b392bf041e657373a80233bf /services
parent060f2175465c61b4461439b82ecc387534938f32 (diff)
parentcb8f0e099c0e149b6fcc477f9b554a2688f99820 (diff)
downloadframeworks_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.java6
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);