commit | d21cf61e86f6cf588b3172bf35bbc31db785b937 | [log] [tgz] |
---|---|---|
author | Mateusz Cicheński <mateuszc@google.com> | Thu Oct 19 20:45:30 2023 +0000 |
committer | Mateusz Cicheński <mateuszc@google.com> | Thu Oct 19 23:45:37 2023 +0000 |
tree | 2e4406cefdbdede4de7a57080fcf28ecea760609 | |
parent | 3a412d0471172f9e1586b1c62506b4a389cfd4b6 [diff] |
Validate source rect hint for enter PIP in gesture nav If the source rect hint is going outside of visible app bounds, we should use icon overlay instead. Test: before http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/fPfOfGUlrBkJ8WbJDqAr2i Test: after http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/fMcHGqfpA5HCXYoAPV4vTT Bug: 305090652 Flag: NA Change-Id: I161f60bf62888c7922227e5d3185810dbe88e317
diff --git a/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java b/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java index 7cc2c46..fce38e1 100644 --- a/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java +++ b/quickstep/src/com/android/quickstep/util/SwipePipToHomeAnimator.java
@@ -145,6 +145,12 @@ sourceRectHint = null; } + if (sourceRectHint != null && !appBounds.contains(sourceRectHint)) { + // This is a situation in which the source hint rect is outside the app bounds, so it is + // not a valid rectangle to use for cropping app surface + sourceRectHint = null; + } + if (sourceRectHint == null) { mSourceRectHint.setEmpty(); mSourceHintRectInsets = null;