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

Commit 61b3688c authored by Abhisek Devkota's avatar Abhisek Devkota Committed by Steve Kondik
Browse files

Revert "SystemUI: Fix missing top task in recent panel."

See http://review.cyanogenmod.org/#/c/74397/

This reverts commit 0616667d.

Change-Id: I0d024a3b75204521546380c955680cb4c8c9468e
parent c315b331
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -576,11 +576,6 @@ public class ActivityManager {
     */
    public static final int RECENT_IGNORE_UNAVAILABLE = 0x0002;

    /**
     * @hide
     */
    public static final int RECENT_DO_NOT_COUNT_EXCLUDED = 0x0004;

    /**
     * Return a list of the tasks that the user has recently launched, with
     * the most recent being first and older ones after in order.
+1 −12
Original line number Diff line number Diff line
@@ -439,15 +439,12 @@ public class RecentTasksLoader implements View.OnTouchListener {
                mContext.getSystemService(Context.ACTIVITY_SERVICE);

                final List<ActivityManager.RecentTaskInfo> recentTasks =
                        am.getRecentTasks(MAX_TASKS, ActivityManager.RECENT_IGNORE_UNAVAILABLE
                                | ActivityManager.RECENT_WITH_EXCLUDED
                                | ActivityManager.RECENT_DO_NOT_COUNT_EXCLUDED);
                        am.getRecentTasks(MAX_TASKS, ActivityManager.RECENT_IGNORE_UNAVAILABLE);
                int numTasks = recentTasks.size();
                ActivityInfo homeInfo = new Intent(Intent.ACTION_MAIN)
                        .addCategory(Intent.CATEGORY_HOME).resolveActivityInfo(pm, 0);

                boolean firstScreenful = true;
                boolean loadOneExcluded = true;
                ArrayList<TaskDescription> tasks = new ArrayList<TaskDescription>();

                // skip the first task - assume it's either the home screen or the current activity.
@@ -465,7 +462,6 @@ public class RecentTasksLoader implements View.OnTouchListener {

                    // Don't load the current home activity.
                    if (isCurrentHomeActivity(intent.getComponent(), homeInfo)) {
                        loadOneExcluded = false;
                        continue;
                    }

@@ -474,13 +470,6 @@ public class RecentTasksLoader implements View.OnTouchListener {
                        continue;
                    }

                    if (!loadOneExcluded && (recentInfo.baseIntent.getFlags()
                            & Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) != 0) {
                        continue;
                    }

                    loadOneExcluded = false;

                    TaskDescription item = createTaskDescription(recentInfo.id,
                            recentInfo.persistentId, recentInfo.baseIntent,
                            recentInfo.origActivity, recentInfo.description);
+1 −5
Original line number Diff line number Diff line
@@ -7030,13 +7030,9 @@ public final class ActivityManagerService extends ActivityManagerNative
                    }
                    
                    res.add(rti);
                    if ((tr.intent.getFlags() & Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS) == 0
                            || (flags & ActivityManager.RECENT_DO_NOT_COUNT_EXCLUDED) == 0
                            || i == 0) {
                    maxNum--;
                }
            }
            }
            return res;
        }
    }