From 3e80b60ef76d4514345087e9e3e3838d98307794 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Mon, 30 Apr 2018 12:42:36 +0200 Subject: PIP: Partial fix to wrong insets during bounds animation Partially fixes an issue where the bounds animation when expanding / collapsing the PIP menu would case the insets to get wrongly applied. The same thing still happens when animating from collapsed to fullscreen, which requires a larger fix. Bug: 77802617 Test: Enable cutout, enter PIP, tap on PIP window, verify transition is not jumpy. Change-Id: I3edb4f8dec10ed85963853fa7e69812dfb198273 --- .../core/java/com/android/server/am/ActivityStackSupervisor.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java index e5565dccc70e..b1ca64eaf7a0 100644 --- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java @@ -2890,10 +2890,8 @@ public class ActivityStackSupervisor extends ConfigurationContainer implements D try { ActivityRecord r = stack.topRunningActivityLocked(); Rect insetBounds = null; - if (tempPinnedTaskBounds != null) { - // We always use 0,0 as the position for the inset rect because - // if we are getting insets at all in the pinned stack it must mean - // we are headed for fullscreen. + if (tempPinnedTaskBounds != null && stack.isAnimatingBoundsToFullscreen()) { + // Use 0,0 as the position for the inset rect because we are headed for fullscreen. insetBounds = tempRect; insetBounds.top = 0; insetBounds.left = 0; -- cgit v1.2.3-59-g8ed1b