Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9c4127e authored by Winson Chung's avatar Winson Chung
Browse files

Add fallback to reset the waiting for transition state.

- When launching into recents directly in another orientation, it
  appears that the animation start callback is not made, which then
  causes the transition-waiting state to persist until Overview is
  next hidden. As a fallback, if we get onEnterAnimationComplete()
  on the activity, then the animation has started and completed, so
  we can reset the state.

Bug: 64694148
Test: Launch fixed-portrait app, hold device in landscape and then hit
      recents button, ensure that recents button still works after.

Change-Id: Ibac8554c1f71324838fef1f04db2d88b16ffe219
parent 21f34896
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ import com.android.systemui.recents.events.activity.ToggleRecentsEvent;
import com.android.systemui.recents.events.component.ActivityUnpinnedEvent;
import com.android.systemui.recents.events.component.RecentsVisibilityChangedEvent;
import com.android.systemui.recents.events.component.ScreenPinningRequestEvent;
import com.android.systemui.recents.events.component.SetWaitingForTransitionStartEvent;
import com.android.systemui.recents.events.ui.AllTaskViewsDismissedEvent;
import com.android.systemui.recents.events.ui.DeleteTaskDataEvent;
import com.android.systemui.recents.events.ui.HideIncompatibleAppOverlayEvent;
@@ -502,6 +503,11 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
    public void onEnterAnimationComplete() {
        super.onEnterAnimationComplete();
        EventBus.getDefault().send(new EnterRecentsWindowAnimationCompletedEvent());

        // Workaround for b/64694148: The animation started callback is not made (see
        // RecentsImpl.getThumbnailTransitionActivityOptions) so reset the transition-waiting state
        // once the enter animation has completed.
        EventBus.getDefault().send(new SetWaitingForTransitionStartEvent(false));
    }

    @Override