Merge "Reset wait for transition state to false when recents goes invisible" into oc-dr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
673e3c41ec
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user