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
This commit is contained in:
Winson Chung
2018-04-10 12:15:21 -07:00
parent d39b8755b5
commit f23931f915
@@ -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;