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

Commit 533daace authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Disabling affiliated tasks." into nyc-dev

parents 157fea65 d8f7431d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ public class RecentsDebugFlags implements TunerService.Tunable {
        // This disables the bitmap and icon caches
        public static final boolean DisableBackgroundCache = false;
        // Enables the task affiliations
        public static final boolean EnableAffiliatedTaskGroups = true;
        public static final boolean EnableAffiliatedTaskGroups = false;
        // TODO: To be repurposed
        public static final boolean EnableStackActionButton = false;
        // Overrides the Tuner flags and enables the timeout
+9 −3
Original line number Diff line number Diff line
@@ -160,8 +160,15 @@ public class RecentsTaskLoadPlan {
                long parentTaskLastActiveTime = parentTask != null
                        ? parentTask.lastActiveTime
                        : prevLastActiveTime;
                if (RecentsDebugFlags.Static.EnableAffiliatedTaskGroups) {
                    t.lastActiveTime = parentTaskLastActiveTime +
                            affiliatedTaskCounts.get(t.affiliatedTaskId, 0) + 1;
                } else {
                    if (t.lastActiveTime == 0) {
                        t.lastActiveTime = parentTaskLastActiveTime -
                                affiliatedTaskCounts.get(t.affiliatedTaskId, 0) - 1;
                    }
                }
            }

            // Compose the task key
@@ -201,7 +208,6 @@ public class RecentsTaskLoadPlan {
            allTasks.add(task);
            affiliatedTaskCounts.put(taskKey.id, affiliatedTaskCounts.get(taskKey.id, 0) + 1);
            affiliatedTasks.put(taskKey.id, taskKey);

            prevLastActiveTime = t.lastActiveTime;
        }
        if (newLastStackActiveTime != -1) {
+8 −6
Original line number Diff line number Diff line
@@ -429,6 +429,7 @@ public class TaskStack {
        mStackTaskList.setFilter(new TaskFilter() {
            @Override
            public boolean acceptTask(SparseArray<Task> taskIdMap, Task t, int index) {
                if (RecentsDebugFlags.Static.EnableAffiliatedTaskGroups) {
                    if (t.isAffiliatedTask()) {
                        // If this task is affiliated with another parent in the stack, then the
                        // historical state of this task depends on the state of the parent task
@@ -437,6 +438,7 @@ public class TaskStack {
                            t = parentTask;
                        }
                    }
                }
                return t.isStackTask;
            }
        });