mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Workaround for handling the restart of an already visible task
- If a task is already visible, then startActivity is a no-op and the remote transition that launcher expects to run is not started. As a workaround (until restarts are an actual transition), listen for the case where a task is restarted and invoke the end callbacks Fixes: 286016555 Test: Repro steps on the bug Change-Id: Iec3ab97c8817a5e95399cec90f891d65f369d234
This commit is contained in:
@@ -144,6 +144,7 @@ import com.android.quickstep.util.StaggeredWorkspaceAnim;
|
||||
import com.android.quickstep.util.SurfaceTransaction;
|
||||
import com.android.quickstep.util.SurfaceTransaction.SurfaceProperties;
|
||||
import com.android.quickstep.util.SurfaceTransactionApplier;
|
||||
import com.android.quickstep.util.TaskRestartedDuringLaunchListener;
|
||||
import com.android.quickstep.util.WorkspaceRevealAnim;
|
||||
import com.android.quickstep.views.FloatingWidgetView;
|
||||
import com.android.quickstep.views.RecentsView;
|
||||
@@ -299,6 +300,12 @@ public class QuickstepTransitionManager implements OnDeviceProfileChangeListener
|
||||
boolean fromRecents = isLaunchingFromRecents(v, null /* targets */);
|
||||
RunnableList onEndCallback = new RunnableList();
|
||||
|
||||
// Handle the case where an already visible task is launched which results in no transition
|
||||
TaskRestartedDuringLaunchListener restartedListener =
|
||||
new TaskRestartedDuringLaunchListener();
|
||||
restartedListener.register(onEndCallback::executeAllAndDestroy);
|
||||
onEndCallback.add(restartedListener::unregister);
|
||||
|
||||
mAppLaunchRunner = new AppLaunchAnimationRunner(v, onEndCallback);
|
||||
ItemInfo tag = (ItemInfo) v.getTag();
|
||||
if (tag != null && tag.shouldUseBackgroundAnimation()) {
|
||||
|
||||
Reference in New Issue
Block a user