Skip to content
Commit ccfa7d8b authored by Hongwei Wang's avatar Hongwei Wang
Browse files

Adjust PiP source rect hint for window bounds

The source rect hint specified by the app is normally a result of
View#getGlobalVisibleRect (or equivalent) that does not count the window
offset in scenarios like the app is placed in the middle of display by
the system when
    - app specifies sensorLandscape
    - display is actually in portrait mode (on large screens)

Fixed this by adjust the source rect hint on ActivityRecord whenever the
internal PictureInPictureParams is updated.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dr7uy1qxB1RGjZVvElo7kr
Bug: 235599028
Test: Verify entering PiP animation working as intended for \
      app specifies sensorLandscape when auto-enter-pip and \
      make-launch-into-pip (aka. content-pip).
Test: atest WmTests:ActivityRecorderTests \
            WmTests:ActivityStarterTests
Change-Id: Id991adbae45a7b61d09105a9aee9cbfecd6b66be
parent 18dfc2fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment