OSDN Git Service

Always update DimLayer bounds when starting dim.
authorRobert Carr <racarr@google.com>
Mon, 18 Apr 2016 02:24:21 +0000 (19:24 -0700)
committerRobert Carr <racarr@google.com>
Mon, 18 Apr 2016 02:26:36 +0000 (19:26 -0700)
Otherwise animateDimLayers can occur before
updateDimLayers and we can show the dim at the
wrong size.

Bug: 26908486
Change-Id: Ifd664e48f3daa77900a7f0bffa58a379efa6b53c

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

index 3ec02b9..483db6f 100644 (file)
@@ -149,8 +149,10 @@ class DimLayerController {
             if (state.animator.mWin.mAppToken == null && !dimLayerUser.isFullscreen()) {
                 // Dim should cover the entire screen for system windows.
                 mDisplayContent.getLogicalDisplayRect(mTmpBounds);
-                state.dimLayer.setBounds(mTmpBounds);
+            } else {
+                dimLayerUser.getDimBounds(mTmpBounds);
             }
+            state.dimLayer.setBounds(mTmpBounds);
         }
     }