Loading quickstep/src/com/android/launcher3/taskbar/FallbackTaskbarUIController.java +0 −7 Original line number Diff line number Diff line Loading @@ -104,13 +104,6 @@ public class FallbackTaskbarUIController extends TaskbarUIController { } } @Override protected boolean isInOverview() { TopTaskTracker.CachedTaskInfo topTask = TopTaskTracker.INSTANCE .get(mControllers.taskbarActivityContext).getCachedTopTask(true); return topTask.isRecentsTask(); } @Override public RecentsView getRecentsView() { return mRecentsActivity.getOverviewPanel(); Loading quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +7 −43 Original line number Diff line number Diff line Loading @@ -43,9 +43,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_V import android.animation.AnimatorSet; import android.animation.ValueAnimator; import android.app.ActivityManager.RunningTaskInfo; import android.app.ActivityOptions; import android.app.ActivityTaskManager; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; Loading Loading @@ -134,13 +132,10 @@ import com.android.systemui.unfold.updates.RotationChangeProvider; import com.android.systemui.unfold.util.ScopedUnfoldTransitionProgressProvider; import java.io.PrintWriter; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.function.Consumer; import java.util.stream.Collectors; /** * The {@link ActivityContext} with which we inflate Taskbar-related Views. This allows UI elements Loading Loading @@ -1180,25 +1175,15 @@ public class TaskbarActivityContext extends BaseTaskbarContext { @Nullable Task foundTask = foundTasks[0]; if (foundTask != null) { TaskView foundTaskView = recents.getTaskViewByTaskId(foundTask.key.id); if (foundTaskView != null) { // The foundTaskView contains the 1-2 taskIds we are looking for. // If we are already in-app and running the correct tasks, no need // to do anything. if (FeatureFlags.enableAppPairs() && isAlreadyInApp(foundTaskView.getTaskIds())) { return; } // If we are in Overview and the TaskView tile is visible, expand that // tile. if (foundTaskView.isVisibleToUser()) { if (foundTaskView != null && foundTaskView.isVisibleToUser()) { TestLogging.recordEvent( TestProtocol.SEQUENCE_MAIN, "start: taskbarAppIcon"); foundTaskView.launchTasks(); return; } } } // If none of the above cases apply, launch a new app or app pair. if (findExactPairMatch) { // We did not find the app pair we were looking for, so launch one. recents.getSplitSelectController().getAppPairsController().launchAppPair( Loading @@ -1210,27 +1195,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext { ); } /** * Checks if a given list of taskIds are all already running in-app. */ private boolean isAlreadyInApp(int[] ids) { if (mControllers.uiController.isInOverview()) { return false; } RunningTaskInfo[] currentlyRunningTasks = ActivityManagerWrapper.getInstance() .getRunningTasks(false /* filterOnlyVisibleRecents */); Set<Integer> currentlyRunningIds = Arrays.stream(currentlyRunningTasks) .map(task -> task.taskId).collect(Collectors.toSet()); for (int id : ids) { if (id != ActivityTaskManager.INVALID_TASK_ID && !currentlyRunningIds.contains(id)) { return false; } } return true; } private void startItemInfoActivity(ItemInfo info) { Intent intent = new Intent(info.getIntent()) .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Loading Loading
quickstep/src/com/android/launcher3/taskbar/FallbackTaskbarUIController.java +0 −7 Original line number Diff line number Diff line Loading @@ -104,13 +104,6 @@ public class FallbackTaskbarUIController extends TaskbarUIController { } } @Override protected boolean isInOverview() { TopTaskTracker.CachedTaskInfo topTask = TopTaskTracker.INSTANCE .get(mControllers.taskbarActivityContext).getCachedTopTask(true); return topTask.isRecentsTask(); } @Override public RecentsView getRecentsView() { return mRecentsActivity.getOverviewPanel(); Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarActivityContext.java +7 −43 Original line number Diff line number Diff line Loading @@ -43,9 +43,7 @@ import static com.android.systemui.shared.system.QuickStepContract.SYSUI_STATE_V import android.animation.AnimatorSet; import android.animation.ValueAnimator; import android.app.ActivityManager.RunningTaskInfo; import android.app.ActivityOptions; import android.app.ActivityTaskManager; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; Loading Loading @@ -134,13 +132,10 @@ import com.android.systemui.unfold.updates.RotationChangeProvider; import com.android.systemui.unfold.util.ScopedUnfoldTransitionProgressProvider; import java.io.PrintWriter; import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.Set; import java.util.function.Consumer; import java.util.stream.Collectors; /** * The {@link ActivityContext} with which we inflate Taskbar-related Views. This allows UI elements Loading Loading @@ -1180,25 +1175,15 @@ public class TaskbarActivityContext extends BaseTaskbarContext { @Nullable Task foundTask = foundTasks[0]; if (foundTask != null) { TaskView foundTaskView = recents.getTaskViewByTaskId(foundTask.key.id); if (foundTaskView != null) { // The foundTaskView contains the 1-2 taskIds we are looking for. // If we are already in-app and running the correct tasks, no need // to do anything. if (FeatureFlags.enableAppPairs() && isAlreadyInApp(foundTaskView.getTaskIds())) { return; } // If we are in Overview and the TaskView tile is visible, expand that // tile. if (foundTaskView.isVisibleToUser()) { if (foundTaskView != null && foundTaskView.isVisibleToUser()) { TestLogging.recordEvent( TestProtocol.SEQUENCE_MAIN, "start: taskbarAppIcon"); foundTaskView.launchTasks(); return; } } } // If none of the above cases apply, launch a new app or app pair. if (findExactPairMatch) { // We did not find the app pair we were looking for, so launch one. recents.getSplitSelectController().getAppPairsController().launchAppPair( Loading @@ -1210,27 +1195,6 @@ public class TaskbarActivityContext extends BaseTaskbarContext { ); } /** * Checks if a given list of taskIds are all already running in-app. */ private boolean isAlreadyInApp(int[] ids) { if (mControllers.uiController.isInOverview()) { return false; } RunningTaskInfo[] currentlyRunningTasks = ActivityManagerWrapper.getInstance() .getRunningTasks(false /* filterOnlyVisibleRecents */); Set<Integer> currentlyRunningIds = Arrays.stream(currentlyRunningTasks) .map(task -> task.taskId).collect(Collectors.toSet()); for (int id : ids) { if (id != ActivityTaskManager.INVALID_TASK_ID && !currentlyRunningIds.contains(id)) { return false; } } return true; } private void startItemInfoActivity(ItemInfo info) { Intent intent = new Intent(info.getIntent()) .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Loading