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

Commit 5f862061 authored by Matthew Ng's avatar Matthew Ng Committed by android-build-merger
Browse files

Merge "Reset wait for transition state to false when recents goes invisible" into oc-dr1-dev

am: 673e3c41

Change-Id: Iedcf8f27eacdba8ad96a4753fb108f4539930fb9
parents 44bdd5cc 673e3c41
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -54,6 +54,7 @@ import com.android.systemui.plugins.PluginActivityManager;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.ConfigurationChangedEvent;
import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
import com.android.systemui.recents.events.activity.LaunchTaskFailedEvent;
import com.android.systemui.recents.events.activity.RecentsActivityStartingEvent;
import com.android.systemui.recents.events.component.RecentsVisibilityChangedEvent;
import com.android.systemui.recents.events.component.ScreenPinningRequestEvent;
@@ -613,6 +614,14 @@ public class Recents extends SystemUI
                }
            });
        }

        // This will catch the cases when a user launches from recents to another app
        // (and vice versa) that is not in the recents stack (such as home or bugreport) and it
        // would not reset the wait for transition flag. This will catch it and make sure that the
        // flag is reset.
        if (!event.visible) {
            mImpl.setWaitingForTransitionStart(false);
        }
    }

    /**
@@ -685,6 +694,11 @@ public class Recents extends SystemUI
        }
    }

    public final void onBusEvent(LaunchTaskFailedEvent event) {
        // Reset the transition when tasks fail to launch
        mImpl.setWaitingForTransitionStart(false);
    }

    public final void onBusEvent(ConfigurationChangedEvent event) {
        // Update the configuration for the Recents component when the activity configuration
        // changes as well