OSDN Git Service

Intersect task with stack bounds for dimming
authorJorim Jaggi <jjaggi@google.com>
Sat, 26 Mar 2016 06:33:21 +0000 (23:33 -0700)
committerJorim Jaggi <jjaggi@google.com>
Mon, 28 Mar 2016 21:19:00 +0000 (14:19 -0700)
Bug: 27240436
Change-Id: I9aba4a476d81b219e4d361d606a4339b0ebc5395

services/core/java/com/android/server/wm/Task.java

index 4e8f19e..1f03c04 100644 (file)
@@ -498,7 +498,15 @@ class Task implements DimLayer.DimLayerUser {
                 return;
             }
 
-            out.set(mBounds);
+            if (!mFullscreen) {
+                // When minimizing the docked stack when going home, we don't adjust the task bounds
+                // so we need to intersect the task bounds with the stack bounds here.
+                mStack.getBounds(mTmpRect);
+                mTmpRect.intersect(mBounds);
+                out.set(mTmpRect);
+            } else {
+                out.set(mBounds);
+            }
             return;
         }