From f23931f9153b30d730165752a52ea522b865f53a Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 10 Apr 2018 12:15:21 -0700 Subject: [PATCH] Reset the force-invisible flag after the animation into launcher completes. - In the case where an app auto-enters into PiP, we don't run the predefined remote animation, which means that the force-invisible flag is never reset. With ag/3876550, we can rely on enter animation complete to be called after the transition, and we can reset the flag here as well. Bug: 77730018 Change-Id: Ifa4cbe518047eed7ab327721ff6d17db1a2b8cd5 --- src/com/android/launcher3/BaseActivity.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/com/android/launcher3/BaseActivity.java b/src/com/android/launcher3/BaseActivity.java index a41edc08b4..d1334722d6 100644 --- a/src/com/android/launcher3/BaseActivity.java +++ b/src/com/android/launcher3/BaseActivity.java @@ -142,6 +142,15 @@ public abstract class BaseActivity extends Activity { } } + @Override + public void onEnterAnimationComplete() { + super.onEnterAnimationComplete(); + + // Needed for activities that auto-enter PiP, which will not trigger a remote animation to + // be created + clearForceInvisibleFlag(INVISIBLE_BY_STATE_HANDLER); + } + @Override protected void onStop() { mActivityFlags &= ~ACTIVITY_STATE_STARTED & ~ACTIVITY_STATE_USER_ACTIVE;