mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 08:16:49 +00:00
Don't rely on intent to call back from activity tracker
- The intent is not updated in certain cases which means that the callback may not be made if Launcher gets recreated. Instead have the tracker manage the set of registered callbacks. - This change allows AbsSwipeUpHandler to continue to receive onActivityInit calls even if Launcher restarts, and also to handle a case where restarting while waiting for a page-settling callback will continue to finish the gesture. Bug: 183962705 Test: Force recreate at various points in the gesture Change-Id: Ib5ead8c868e798e26e56776f57bd715c79d087cd
This commit is contained in:
@@ -184,9 +184,7 @@ public class OverviewCommandHelper {
|
||||
.newHandler(gestureState, cmd.createTime);
|
||||
interactionHandler.setGestureEndCallback(
|
||||
() -> onTransitionComplete(cmd, interactionHandler));
|
||||
|
||||
Intent intent = new Intent(interactionHandler.getLaunchIntent());
|
||||
interactionHandler.initWhenReady(intent);
|
||||
interactionHandler.initWhenReady();
|
||||
|
||||
RecentsAnimationListener recentAnimListener = new RecentsAnimationListener() {
|
||||
@Override
|
||||
@@ -212,6 +210,7 @@ public class OverviewCommandHelper {
|
||||
cmd.mActiveCallbacks.addListener(recentAnimListener);
|
||||
mTaskAnimationManager.notifyRecentsAnimationState(recentAnimListener);
|
||||
} else {
|
||||
Intent intent = new Intent(interactionHandler.getLaunchIntent());
|
||||
intent.putExtra(INTENT_EXTRA_LOG_TRACE_ID, gestureState.getGestureId());
|
||||
cmd.mActiveCallbacks = mTaskAnimationManager.startRecentsAnimation(
|
||||
gestureState, intent, interactionHandler);
|
||||
|
||||
Reference in New Issue
Block a user