Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f5c3dab5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Migrate from using taskIDs to taskViewIDs in RecentsView" into sc-v2-dev

parents 144b16bb 51a6c921
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -189,7 +189,7 @@ public final class LauncherActivityInterface extends
                launcher != null && launcher.getStateManager().getState().overviewUi
                        ? launcher.getOverviewPanel() : null;
        if (recentsView == null || (!launcher.hasBeenResumed()
                && recentsView.getRunningTaskId() == -1)) {
                && recentsView.getRunningTaskViewId() == -1)) {
            // If live tile has ended, return null.
            return null;
        }
+1 −1
Original line number Diff line number Diff line
@@ -139,7 +139,7 @@ public final class TaskViewUtils {

        // If the opening task id is not currently visible in overview, then fall back to normal app
        // icon launch animation
        TaskView taskView = recentsView.getTaskView(openingTaskId);
        TaskView taskView = recentsView.getTaskViewByTaskId(openingTaskId);
        if (taskView == null || !recentsView.isTaskViewVisible(taskView)) {
            return null;
        }
+8 −6
Original line number Diff line number Diff line
@@ -95,7 +95,7 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta
            TaskViewSimulator taskViewSimulator) {
        super.onPrepareGestureEndAnimation(animatorSet, endTarget, taskViewSimulator);
        if (mHomeTaskInfo != null && endTarget == RECENTS && animatorSet != null) {
            TaskView tv = getTaskView(mHomeTaskInfo.taskId);
            TaskView tv = getTaskViewByTaskId(mHomeTaskInfo.taskId);
            if (tv != null) {
                PendingAnimation pa = createTaskDismissAnimation(tv, true, false, 150,
                        false /* dismissingForSplitSelection*/);
@@ -117,8 +117,9 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta
    }

    @Override
    public void setCurrentTask(int runningTaskId) {
        super.setCurrentTask(runningTaskId);
    public void setCurrentTask(int runningTaskViewId) {
        super.setCurrentTask(runningTaskViewId);
        int runningTaskId = getTaskIdsForRunningTaskView()[0];
        if (mHomeTaskInfo != null && mHomeTaskInfo.taskId != runningTaskId) {
            mHomeTaskInfo = null;
            setRunningTaskHidden(false);
@@ -128,7 +129,7 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta
    @Nullable
    @Override
    protected TaskView getHomeTaskView() {
        return mHomeTaskInfo != null ? getTaskView(mHomeTaskInfo.taskId) : null;
        return mHomeTaskInfo != null ? getTaskViewByTaskId(mHomeTaskInfo.taskId) : null;
    }

    @Override
@@ -148,11 +149,12 @@ public class FallbackRecentsView extends RecentsView<RecentsActivity, RecentsSta
        // When quick-switching on 3p-launcher, we add a "stub" tile corresponding to Launcher
        // as well. This tile is never shown as we have setCurrentTaskHidden, but allows use to
        // track the index of the next task appropriately, as if we are switching on any other app.
        if (mHomeTaskInfo != null && mHomeTaskInfo.taskId == mRunningTaskId && !tasks.isEmpty()) {
        int runningTaskId = getTaskIdsForRunningTaskView()[0];
        if (mHomeTaskInfo != null && mHomeTaskInfo.taskId == runningTaskId && !tasks.isEmpty()) {
            // Check if the task list has running task
            boolean found = false;
            for (Task t : tasks) {
                if (t.key.id == mRunningTaskId) {
                if (t.key.id == runningTaskId) {
                    found = true;
                    break;
                }
+151 −63

File changed.

Preview size limit exceeded, changes collapsed.

+20 −3

File changed.

Preview size limit exceeded, changes collapsed.

Loading