diff options
| author | 2024-02-21 19:03:09 +0800 | |
|---|---|---|
| committer | 2024-02-21 19:03:09 +0800 | |
| commit | 353e49bbcb126ca331355fc675eaee21d392f7da (patch) | |
| tree | 891898fd4960105c2a5ab744ef991a72f732ba74 | |
| parent | b23955e748b0d2f273bc9a3fd8441e5b27f85197 (diff) | |
Always update the surface crop when moving to front
Before, we only update if the bounds is changed. However, it doesn't
cover the case when the bounds was changed in background during other
transition.
Now, we always update the crop when it is moving to front.
Bug: 324004650
Test: manually verify
Change-Id: I47a1524968c9a72dfa1d281a57916931fe44773f
| -rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java index 5e79681e060b..0d7e36a8be72 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/Transitions.java @@ -493,11 +493,9 @@ public class Transitions implements RemoteCallable<Transitions>, final SurfaceControl leash = change.getLeash(); final int mode = info.getChanges().get(i).getMode(); - if (mode == TRANSIT_TO_FRONT - && ((change.getStartAbsBounds().height() != change.getEndAbsBounds().height() - || change.getStartAbsBounds().width() != change.getEndAbsBounds().width()))) { - // When the window is moved to front with a different size, make sure the crop is - // updated to prevent it from using the old crop. + if (mode == TRANSIT_TO_FRONT) { + // When the window is moved to front, make sure the crop is updated to prevent it + // from using the old crop. t.setWindowCrop(leash, change.getEndAbsBounds().width(), change.getEndAbsBounds().height()); } |