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-06-01 08:04:21 -0700
commite6c25d4a6f35449a8420f0d1e87529426786ad60 (patch)
treebdb19eccc2739fecbed5a512b5b2fdd48d84f2c0
parent94ea9bb5719c8c6cdad51406611772b158f70c3d (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: I8255be9e0d68adc75fda0947c64f869b7eeb76c9 Fixes: 62096254 Test: go/wm-smoke
-rw-r--r--services/core/java/com/android/server/wm/WindowSurfacePlacer.java4
1 files changed, 3 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 cb1b2e6abc58..4442bb87ec33 100644
--- a/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
+++ b/services/core/java/com/android/server/wm/WindowSurfacePlacer.java
@@ -41,6 +41,7 @@ import android.content.res.Configuration;
import android.graphics.GraphicBuffer;
import android.graphics.PixelFormat;
import android.graphics.Rect;
+import android.os.Binder;
import android.os.Debug;
import android.os.Trace;
import android.util.ArraySet;
@@ -693,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");