Scaling PiP proportionally on screen rotation and fold/unfold
The end bounds are stored in PipBoundsState and the transition system does not have knowledge of the proportional resize, so the value in pipChange.getEndAbsBounds() is not the correct one. Updating the rotation handler to correctly update the scale and max size in OnDisplayChangingListener, so that all future calculations are using the updated values for scale/max size. Since the value has been cached locally in PipBoundsState, having stale invocations would lead to artifacts such as PiP resizing in unexpected way upon screen rotation or during fixed rotation enter PiP animation. Test: manually Test: atest EnterPipToOtherOrientation Test: 3 button nav rotation http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/gxlk5IJSb0gVojnPfJvMxY Test: gesture nav rotation http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/ga3gIHEOVatMVTr6WXQnNX Test: 3 button nav fixed rotation enter pip http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/8A94b9HbYXvtlEuU8KQO5 Test: gesture nav fixed rotation enter pip http://recall/-/ekEuGtt9d9HWqkUtAzpHx8/gcJsqm3Hu3RaYagOapDXsS Bug: 322091225 Bug: 319083003 Bug: 308093519 Bug: 323789757 Flag: none Change-Id: Idc1429577da5c1817fe2f4ad12cefc32e0e86dd6
Showing
- libs/WindowManager/Shell/src/com/android/wm/shell/common/pip/PipBoundsState.java 6 additions, 1 deletion...l/src/com/android/wm/shell/common/pip/PipBoundsState.java
- libs/WindowManager/Shell/src/com/android/wm/shell/pip/PipTransition.java 0 additions, 6 deletions...ger/Shell/src/com/android/wm/shell/pip/PipTransition.java
- libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipController.java 19 additions, 13 deletions...ell/src/com/android/wm/shell/pip/phone/PipController.java
- libs/WindowManager/Shell/tests/flicker/pip/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt 12 additions, 0 deletions...ndroid/wm/shell/flicker/pip/EnterPipToOtherOrientation.kt
- tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/PipAppHelper.kt 8 additions, 0 deletions...src/com/android/server/wm/flicker/helpers/PipAppHelper.kt
Loading
Please register or sign in to comment