summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Bryce Lee <brycelee@google.com> 2017-05-31 10:27:42 -0700
committer Bryce Lee <brycelee@google.com> 2017-05-31 10:27:42 -0700
commit6db4d15d726b8830ad56766352a79fe0417cb9c2 (patch)
treefdc0d9b4c14e382182ca0db0d5c529c4394ee3d4
parent06951ac74d9e74b29037b0a5d8e3b9ad85983b5b (diff)
Handle not having main window in createThumbnailAppAnimator.
A recent code change associated the SurfaceControl with the main window owner id. However, it is possible for the an AppWindowToken to not have a main window. This case is handled later in the method. This CL restores the original behavior of using the calling uid in the cases no main window is present. Change-Id: Iad69fe383c2208c1db523c8b4601a8f927f9318a Fixes: 62096254 Test: go/wm-smoke
-rw-r--r--services/core/java/com/android/server/wm/WindowSurfacePlacer.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/wm/WindowSurfacePlacer.java b/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
index 4a1a7052a8b0..424b25ec4d9d 100644
--- a/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
+++ b/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
@@ -694,7 +694,8 @@ class WindowSurfacePlacer {
SurfaceControl surfaceControl = new SurfaceControl(mService.mFxSession,
"thumbnail anim", dirty.width(), dirty.height(),
PixelFormat.TRANSLUCENT, SurfaceControl.HIDDEN,
- appToken.windowType, window.mOwnerUid);
+ appToken.windowType,
+ window != null ? window.mOwnerUid : Binder.getCallingUid());
surfaceControl.setLayerStack(display.getLayerStack());
if (SHOW_TRANSACTIONS) {
Slog.i(TAG, " THUMBNAIL " + surfaceControl + ": CREATE");