From e4dd96453179d9f5449fe33c6aa4b909ba440f5b Mon Sep 17 00:00:00 2001 From: Wale Ogunwale Date: Tue, 10 May 2016 08:39:01 -0700 Subject: [PATCH] Fixed logic error when calculating window touch exclude region. Problem was introduced in ag/960365. We need to properly set the temp variable to the current task bounds before trying to use it. Bug: 26962445 Change-Id: I3cded03582e1379e16fa48f69da6ceadb92d8d4b --- services/core/java/com/android/server/wm/DisplayContent.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 1fdc714dbf5af..fba439f8ca60b 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -378,6 +378,8 @@ class DisplayContent { * We save the focused task region once we find it, and add it back at the end. */ + task.getDimBounds(mTmpRect); + if (task == focusedTask) { addBackFocusedTask = true; mTmpRect2.set(mTmpRect); @@ -385,7 +387,6 @@ class DisplayContent { final boolean isFreeformed = task.inFreeformWorkspace(); if (task != focusedTask || isFreeformed) { - task.getDimBounds(mTmpRect); if (isFreeformed) { // If the task is freeformed, enlarge the area to account for outside // touch area for resize.