Loading quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +7 −1 Original line number Diff line number Diff line Loading @@ -1409,8 +1409,14 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer, * Launches two apps as an app pair. */ public void launchAppPair(AppPairIcon appPairIcon) { // Potentially show the Taskbar education once the app pair launch finishes mSplitSelectStateController.getAppPairsController().launchAppPair(appPairIcon, CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE); CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE, (success) -> { if (success && mTaskbarUIController != null) { mTaskbarUIController.showEduOnAppLaunch(); } }); } public boolean canStartHomeSafely() { Loading quickstep/src/com/android/quickstep/util/AppPairsController.java +13 −2 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ import com.android.wm.shell.common.split.SplitScreenConstants.PersistentSnapPosi import java.util.Arrays; import java.util.List; import java.util.function.Consumer; /** * Controller class that handles app pair interactions: saving, modifying, deleting, etc. Loading Loading @@ -232,8 +233,11 @@ public class AppPairsController { * * @param cuj Should be an integer from {@link Cuj} or -1 if no CUJ needs to be logged for jank * monitoring * @param callback Called after the app pair launch finishes animating, or null if no method is * to be called */ public void launchAppPair(AppPairIcon appPairIcon, int cuj) { public void launchAppPair(AppPairIcon appPairIcon, int cuj, @Nullable Consumer<Boolean> callback) { WorkspaceItemInfo app1 = appPairIcon.getInfo().getFirstApp(); WorkspaceItemInfo app2 = appPairIcon.getInfo().getSecondApp(); ComponentKey app1Key = new ComponentKey(app1.getTargetComponent(), app1.user); Loading Loading @@ -273,11 +277,18 @@ public class AppPairsController { mSplitSelectStateController.setLaunchingIconView(appPairIcon); mSplitSelectStateController.launchSplitTasks( AppPairsController.convertRankToSnapPosition(app1.rank)); AppPairsController.convertRankToSnapPosition(app1.rank), callback); } ); } /** * Launches an app pair but does not specify a callback */ public void launchAppPair(AppPairIcon appPairIcon, int cuj) { launchAppPair(appPairIcon, cuj, null); } /** * Returns an AppInfo associated with the app for the given ComponentKey, or null if no such * package exists in the AllAppsStore. Loading Loading
quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +7 −1 Original line number Diff line number Diff line Loading @@ -1409,8 +1409,14 @@ public class QuickstepLauncher extends Launcher implements RecentsViewContainer, * Launches two apps as an app pair. */ public void launchAppPair(AppPairIcon appPairIcon) { // Potentially show the Taskbar education once the app pair launch finishes mSplitSelectStateController.getAppPairsController().launchAppPair(appPairIcon, CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE); CUJ_LAUNCHER_LAUNCH_APP_PAIR_FROM_WORKSPACE, (success) -> { if (success && mTaskbarUIController != null) { mTaskbarUIController.showEduOnAppLaunch(); } }); } public boolean canStartHomeSafely() { Loading
quickstep/src/com/android/quickstep/util/AppPairsController.java +13 −2 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ import com.android.wm.shell.common.split.SplitScreenConstants.PersistentSnapPosi import java.util.Arrays; import java.util.List; import java.util.function.Consumer; /** * Controller class that handles app pair interactions: saving, modifying, deleting, etc. Loading Loading @@ -232,8 +233,11 @@ public class AppPairsController { * * @param cuj Should be an integer from {@link Cuj} or -1 if no CUJ needs to be logged for jank * monitoring * @param callback Called after the app pair launch finishes animating, or null if no method is * to be called */ public void launchAppPair(AppPairIcon appPairIcon, int cuj) { public void launchAppPair(AppPairIcon appPairIcon, int cuj, @Nullable Consumer<Boolean> callback) { WorkspaceItemInfo app1 = appPairIcon.getInfo().getFirstApp(); WorkspaceItemInfo app2 = appPairIcon.getInfo().getSecondApp(); ComponentKey app1Key = new ComponentKey(app1.getTargetComponent(), app1.user); Loading Loading @@ -273,11 +277,18 @@ public class AppPairsController { mSplitSelectStateController.setLaunchingIconView(appPairIcon); mSplitSelectStateController.launchSplitTasks( AppPairsController.convertRankToSnapPosition(app1.rank)); AppPairsController.convertRankToSnapPosition(app1.rank), callback); } ); } /** * Launches an app pair but does not specify a callback */ public void launchAppPair(AppPairIcon appPairIcon, int cuj) { launchAppPair(appPairIcon, cuj, null); } /** * Returns an AppInfo associated with the app for the given ComponentKey, or null if no such * package exists in the AllAppsStore. Loading