Loading quickstep/src/com/android/quickstep/FallbackSwipeHandler.java +7 −5 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import com.android.launcher3.states.StateAnimationConfig; import com.android.launcher3.util.DisplayController; import com.android.quickstep.fallback.FallbackRecentsView; import com.android.quickstep.fallback.RecentsState; import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.util.RectFSpringAnim; import com.android.quickstep.util.SurfaceTransaction.SurfaceProperties; import com.android.quickstep.util.TransformParams; Loading Loading @@ -151,19 +152,20 @@ public class FallbackSwipeHandler extends return new FallbackPipToHomeAnimationFactory(); } mActiveAnimationFactory = new FallbackHomeAnimationFactory(duration); startHomeIntent(mActiveAnimationFactory, runningTaskTarget); startHomeIntent(mActiveAnimationFactory, runningTaskTarget, "FallbackSwipeHandler-home"); return mActiveAnimationFactory; } private void startHomeIntent( @Nullable FallbackHomeAnimationFactory gestureContractAnimationFactory, @Nullable RemoteAnimationTarget runningTaskTarget) { @Nullable RemoteAnimationTarget runningTaskTarget, @NonNull String reason) { ActivityOptions options = ActivityOptions.makeCustomAnimation(mContext, 0, 0); Intent intent = new Intent(mGestureState.getHomeIntent()); if (gestureContractAnimationFactory != null && runningTaskTarget != null) { gestureContractAnimationFactory.addGestureContract(intent, runningTaskTarget.taskInfo); } startHomeIntentSafely(mContext, intent, options.toBundle()); startHomeIntentSafely(mContext, intent, options.toBundle(), reason); } @Override Loading @@ -185,8 +187,8 @@ public class FallbackSwipeHandler extends // the PiP task appearing. recentsCallback = () -> { callback.run(); startHomeIntent( null /* gestureContractAnimationFactory */, null /* runningTaskTarget */); startHomeIntent(null /* gestureContractAnimationFactory */, null /* runningTaskTarget */, "FallbackSwipeHandler-resumeLauncher"); }; } else { recentsCallback = callback; Loading quickstep/src/com/android/quickstep/OverviewCommandHelper.java +2 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.launcher3.statemanager.StatefulActivity; import com.android.launcher3.taskbar.TaskbarUIController; import com.android.launcher3.util.RunnableList; import com.android.quickstep.RecentsAnimationCallbacks.RecentsAnimationListener; import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; import com.android.systemui.shared.recents.model.ThumbnailData; Loading Loading @@ -220,6 +221,7 @@ public class OverviewCommandHelper { return true; } if (cmd.type == TYPE_HOME) { ActiveGestureLog.INSTANCE.addLog("OverviewCommandHelper.executeCommand(TYPE_HOME)"); mService.startActivity(mOverviewComponentObserver.getHomeIntent()); return true; } Loading quickstep/src/com/android/quickstep/OverviewComponentObserver.java +8 −3 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import androidx.annotation.Nullable; import com.android.launcher3.R; import com.android.launcher3.util.SimpleBroadcastReceiver; import com.android.quickstep.util.ActiveGestureLog; import com.android.systemui.shared.system.PackageManagerWrapper; import java.io.PrintWriter; Loading Loading @@ -276,20 +277,24 @@ public final class OverviewComponentObserver { /** * Starts the intent for the current home activity. */ public static void startHomeIntentSafely(@NonNull Context context, @Nullable Bundle options) { public static void startHomeIntentSafely(@NonNull Context context, @Nullable Bundle options, @NonNull String reason) { RecentsAnimationDeviceState deviceState = new RecentsAnimationDeviceState(context); OverviewComponentObserver observer = new OverviewComponentObserver(context, deviceState); Intent intent = observer.getHomeIntent(); observer.onDestroy(); deviceState.destroy(); startHomeIntentSafely(context, intent, options); startHomeIntentSafely(context, intent, options, reason); } /** * Starts the intent for the current home activity. */ public static void startHomeIntentSafely( @NonNull Context context, @NonNull Intent homeIntent, @Nullable Bundle options) { @NonNull Context context, @NonNull Intent homeIntent, @Nullable Bundle options, @NonNull String reason) { ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString( "OverviewComponentObserver.startHomeIntent: ").append(reason)); try { context.startActivity(homeIntent, options); } catch (NullPointerException | ActivityNotFoundException | SecurityException e) { Loading quickstep/src/com/android/quickstep/RecentsActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ import java.util.List; * See {@link com.android.quickstep.views.RecentsView}. */ public final class RecentsActivity extends StatefulActivity<RecentsState> { private static final String TAG = "RecentsActivity"; public static final ActivityTracker<RecentsActivity> ACTIVITY_TRACKER = new ActivityTracker<>(); Loading Loading @@ -427,7 +428,7 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> { new RemoteAnimationAdapter(runner, HOME_APPEAR_DURATION, 0), new RemoteTransition(runner.toRemoteTransition(), getIApplicationThread(), "StartHomeFromRecents")); startHomeIntentSafely(this, options.toBundle()); startHomeIntentSafely(this, options.toBundle(), TAG); } private final RemoteAnimationFactory mAnimationToHomeFactory = Loading quickstep/src/com/android/quickstep/TouchInteractionService.java +1 −0 Original line number Diff line number Diff line Loading @@ -1299,6 +1299,7 @@ public class TouchInteractionService extends Service { Log.i(TAG, "preloadOverview: forSUWAllSet=" + forSUWAllSet + ", isHomeAndOverviewSame=" + mOverviewComponentObserver.isHomeAndOverviewSame()); ActiveGestureLog.INSTANCE.addLog("preloadRecentsAnimation"); mTaskAnimationManager.preloadRecentsAnimation(overviewIntent); } Loading Loading
quickstep/src/com/android/quickstep/FallbackSwipeHandler.java +7 −5 Original line number Diff line number Diff line Loading @@ -66,6 +66,7 @@ import com.android.launcher3.states.StateAnimationConfig; import com.android.launcher3.util.DisplayController; import com.android.quickstep.fallback.FallbackRecentsView; import com.android.quickstep.fallback.RecentsState; import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.util.RectFSpringAnim; import com.android.quickstep.util.SurfaceTransaction.SurfaceProperties; import com.android.quickstep.util.TransformParams; Loading Loading @@ -151,19 +152,20 @@ public class FallbackSwipeHandler extends return new FallbackPipToHomeAnimationFactory(); } mActiveAnimationFactory = new FallbackHomeAnimationFactory(duration); startHomeIntent(mActiveAnimationFactory, runningTaskTarget); startHomeIntent(mActiveAnimationFactory, runningTaskTarget, "FallbackSwipeHandler-home"); return mActiveAnimationFactory; } private void startHomeIntent( @Nullable FallbackHomeAnimationFactory gestureContractAnimationFactory, @Nullable RemoteAnimationTarget runningTaskTarget) { @Nullable RemoteAnimationTarget runningTaskTarget, @NonNull String reason) { ActivityOptions options = ActivityOptions.makeCustomAnimation(mContext, 0, 0); Intent intent = new Intent(mGestureState.getHomeIntent()); if (gestureContractAnimationFactory != null && runningTaskTarget != null) { gestureContractAnimationFactory.addGestureContract(intent, runningTaskTarget.taskInfo); } startHomeIntentSafely(mContext, intent, options.toBundle()); startHomeIntentSafely(mContext, intent, options.toBundle(), reason); } @Override Loading @@ -185,8 +187,8 @@ public class FallbackSwipeHandler extends // the PiP task appearing. recentsCallback = () -> { callback.run(); startHomeIntent( null /* gestureContractAnimationFactory */, null /* runningTaskTarget */); startHomeIntent(null /* gestureContractAnimationFactory */, null /* runningTaskTarget */, "FallbackSwipeHandler-resumeLauncher"); }; } else { recentsCallback = callback; Loading
quickstep/src/com/android/quickstep/OverviewCommandHelper.java +2 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.launcher3.statemanager.StatefulActivity; import com.android.launcher3.taskbar.TaskbarUIController; import com.android.launcher3.util.RunnableList; import com.android.quickstep.RecentsAnimationCallbacks.RecentsAnimationListener; import com.android.quickstep.util.ActiveGestureLog; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; import com.android.systemui.shared.recents.model.ThumbnailData; Loading Loading @@ -220,6 +221,7 @@ public class OverviewCommandHelper { return true; } if (cmd.type == TYPE_HOME) { ActiveGestureLog.INSTANCE.addLog("OverviewCommandHelper.executeCommand(TYPE_HOME)"); mService.startActivity(mOverviewComponentObserver.getHomeIntent()); return true; } Loading
quickstep/src/com/android/quickstep/OverviewComponentObserver.java +8 −3 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ import androidx.annotation.Nullable; import com.android.launcher3.R; import com.android.launcher3.util.SimpleBroadcastReceiver; import com.android.quickstep.util.ActiveGestureLog; import com.android.systemui.shared.system.PackageManagerWrapper; import java.io.PrintWriter; Loading Loading @@ -276,20 +277,24 @@ public final class OverviewComponentObserver { /** * Starts the intent for the current home activity. */ public static void startHomeIntentSafely(@NonNull Context context, @Nullable Bundle options) { public static void startHomeIntentSafely(@NonNull Context context, @Nullable Bundle options, @NonNull String reason) { RecentsAnimationDeviceState deviceState = new RecentsAnimationDeviceState(context); OverviewComponentObserver observer = new OverviewComponentObserver(context, deviceState); Intent intent = observer.getHomeIntent(); observer.onDestroy(); deviceState.destroy(); startHomeIntentSafely(context, intent, options); startHomeIntentSafely(context, intent, options, reason); } /** * Starts the intent for the current home activity. */ public static void startHomeIntentSafely( @NonNull Context context, @NonNull Intent homeIntent, @Nullable Bundle options) { @NonNull Context context, @NonNull Intent homeIntent, @Nullable Bundle options, @NonNull String reason) { ActiveGestureLog.INSTANCE.addLog(new ActiveGestureLog.CompoundString( "OverviewComponentObserver.startHomeIntent: ").append(reason)); try { context.startActivity(homeIntent, options); } catch (NullPointerException | ActivityNotFoundException | SecurityException e) { Loading
quickstep/src/com/android/quickstep/RecentsActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -94,6 +94,7 @@ import java.util.List; * See {@link com.android.quickstep.views.RecentsView}. */ public final class RecentsActivity extends StatefulActivity<RecentsState> { private static final String TAG = "RecentsActivity"; public static final ActivityTracker<RecentsActivity> ACTIVITY_TRACKER = new ActivityTracker<>(); Loading Loading @@ -427,7 +428,7 @@ public final class RecentsActivity extends StatefulActivity<RecentsState> { new RemoteAnimationAdapter(runner, HOME_APPEAR_DURATION, 0), new RemoteTransition(runner.toRemoteTransition(), getIApplicationThread(), "StartHomeFromRecents")); startHomeIntentSafely(this, options.toBundle()); startHomeIntentSafely(this, options.toBundle(), TAG); } private final RemoteAnimationFactory mAnimationToHomeFactory = Loading
quickstep/src/com/android/quickstep/TouchInteractionService.java +1 −0 Original line number Diff line number Diff line Loading @@ -1299,6 +1299,7 @@ public class TouchInteractionService extends Service { Log.i(TAG, "preloadOverview: forSUWAllSet=" + forSUWAllSet + ", isHomeAndOverviewSame=" + mOverviewComponentObserver.isHomeAndOverviewSame()); ActiveGestureLog.INSTANCE.addLog("preloadRecentsAnimation"); mTaskAnimationManager.preloadRecentsAnimation(overviewIntent); } Loading