Loading quickstep/src/com/android/launcher3/hybridhotseat/HotseatEduActivity.java +3 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Intent; import android.os.Bundle; import com.android.launcher3.BaseActivity; import com.android.launcher3.Launcher; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.util.ActivityTracker; Loading @@ -37,7 +38,8 @@ public class HotseatEduActivity extends Activity { .addCategory(Intent.CATEGORY_HOME) .setPackage(getPackageName()) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); new HotseatActivityTracker<>().addToIntent(homeIntent); Launcher.ACTIVITY_TRACKER.registerCallback(new HotseatActivityTracker()); startActivity(homeIntent); finish(); } Loading quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +9 −3 Original line number Diff line number Diff line Loading @@ -349,6 +349,13 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, } if (mActivity != null) { if (mStateCallback.hasStates(STATE_GESTURE_COMPLETED)) { // If the activity has restarted between setting the page scroll settling callback // and actually receiving the callback, just mark the gesture completed mGestureState.setState(STATE_RECENTS_SCROLLING_FINISHED); return true; } // The launcher may have been recreated as a result of device rotation. int oldState = mStateCallback.getState() & ~LAUNCHER_UI_STATES; initStateCallbacks(); Loading Loading @@ -1717,13 +1724,12 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, /** * Registers a callback to run when the activity is ready. * @param intent The intent that will be used to start the activity if it doesn't exist already. */ public void initWhenReady(Intent intent) { public void initWhenReady() { // Preload the plan RecentsModel.INSTANCE.get(mContext).getTasks(null); mActivityInitListener.register(intent); mActivityInitListener.register(); } /** Loading quickstep/src/com/android/quickstep/OverviewCommandHelper.java +2 −3 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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); Loading quickstep/src/com/android/quickstep/RecentsActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> { @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); ACTIVITY_TRACKER.handleNewIntent(this, intent); ACTIVITY_TRACKER.handleNewIntent(this); } /** Loading quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java +2 −2 Original line number Diff line number Diff line Loading @@ -389,8 +389,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC mInteractionHandler = mHandlerFactory.newHandler(mGestureState, touchTimeMs); mInteractionHandler.setGestureEndCallback(this::onInteractionGestureFinished); mMotionPauseDetector.setOnMotionPauseListener(mInteractionHandler.getMotionPauseListener()); Intent intent = new Intent(mInteractionHandler.getLaunchIntent()); mInteractionHandler.initWhenReady(intent); mInteractionHandler.initWhenReady(); if (mTaskAnimationManager.isRecentsAnimationRunning()) { mActiveCallbacks = mTaskAnimationManager.continueRecentsAnimation(mGestureState); Loading @@ -398,6 +397,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC mTaskAnimationManager.notifyRecentsAnimationState(mInteractionHandler); notifyGestureStarted(true /*isLikelyToStartNewTask*/); } else { Intent intent = new Intent(mInteractionHandler.getLaunchIntent()); intent.putExtra(INTENT_EXTRA_LOG_TRACE_ID, mGestureState.getGestureId()); mActiveCallbacks = mTaskAnimationManager.startRecentsAnimation(mGestureState, intent, mInteractionHandler); Loading Loading
quickstep/src/com/android/launcher3/hybridhotseat/HotseatEduActivity.java +3 −1 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Intent; import android.os.Bundle; import com.android.launcher3.BaseActivity; import com.android.launcher3.Launcher; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.util.ActivityTracker; Loading @@ -37,7 +38,8 @@ public class HotseatEduActivity extends Activity { .addCategory(Intent.CATEGORY_HOME) .setPackage(getPackageName()) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); new HotseatActivityTracker<>().addToIntent(homeIntent); Launcher.ACTIVITY_TRACKER.registerCallback(new HotseatActivityTracker()); startActivity(homeIntent); finish(); } Loading
quickstep/src/com/android/quickstep/AbsSwipeUpHandler.java +9 −3 Original line number Diff line number Diff line Loading @@ -349,6 +349,13 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, } if (mActivity != null) { if (mStateCallback.hasStates(STATE_GESTURE_COMPLETED)) { // If the activity has restarted between setting the page scroll settling callback // and actually receiving the callback, just mark the gesture completed mGestureState.setState(STATE_RECENTS_SCROLLING_FINISHED); return true; } // The launcher may have been recreated as a result of device rotation. int oldState = mStateCallback.getState() & ~LAUNCHER_UI_STATES; initStateCallbacks(); Loading Loading @@ -1717,13 +1724,12 @@ public abstract class AbsSwipeUpHandler<T extends StatefulActivity<S>, /** * Registers a callback to run when the activity is ready. * @param intent The intent that will be used to start the activity if it doesn't exist already. */ public void initWhenReady(Intent intent) { public void initWhenReady() { // Preload the plan RecentsModel.INSTANCE.get(mContext).getTasks(null); mActivityInitListener.register(intent); mActivityInitListener.register(); } /** Loading
quickstep/src/com/android/quickstep/OverviewCommandHelper.java +2 −3 Original line number Diff line number Diff line Loading @@ -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 Loading @@ -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); Loading
quickstep/src/com/android/quickstep/RecentsActivity.java +1 −1 Original line number Diff line number Diff line Loading @@ -141,7 +141,7 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> { @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); ACTIVITY_TRACKER.handleNewIntent(this, intent); ACTIVITY_TRACKER.handleNewIntent(this); } /** Loading
quickstep/src/com/android/quickstep/inputconsumers/OtherActivityInputConsumer.java +2 −2 Original line number Diff line number Diff line Loading @@ -389,8 +389,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC mInteractionHandler = mHandlerFactory.newHandler(mGestureState, touchTimeMs); mInteractionHandler.setGestureEndCallback(this::onInteractionGestureFinished); mMotionPauseDetector.setOnMotionPauseListener(mInteractionHandler.getMotionPauseListener()); Intent intent = new Intent(mInteractionHandler.getLaunchIntent()); mInteractionHandler.initWhenReady(intent); mInteractionHandler.initWhenReady(); if (mTaskAnimationManager.isRecentsAnimationRunning()) { mActiveCallbacks = mTaskAnimationManager.continueRecentsAnimation(mGestureState); Loading @@ -398,6 +397,7 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC mTaskAnimationManager.notifyRecentsAnimationState(mInteractionHandler); notifyGestureStarted(true /*isLikelyToStartNewTask*/); } else { Intent intent = new Intent(mInteractionHandler.getLaunchIntent()); intent.putExtra(INTENT_EXTRA_LOG_TRACE_ID, mGestureState.getGestureId()); mActiveCallbacks = mTaskAnimationManager.startRecentsAnimation(mGestureState, intent, mInteractionHandler); Loading