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

Commit 150443a9 authored by Michael Jurka's avatar Michael Jurka Committed by Android (Google) Code Review
Browse files

Merge "Fix 7216870: recents relaunches dismissed activity" into jb-mr1-dev

parents e8e98704 08e8d846
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -120,7 +120,7 @@ public class RecentsActivity extends Activity {
        if (mRecentsPanel != null) {
            final SystemUIApplication app = (SystemUIApplication) getApplication();
            final RecentTasksLoader recentTasksLoader = app.getRecentTasksLoader();
            TaskDescription firstTask = recentTasksLoader.getFirstTask();
            TaskDescription firstTask = mRecentsPanel.getBottomTask();
            if (firstTask != null && mRecentsPanel.simulateClick(firstTask)) {
                // recents panel will take care of calling show(false);
                return;
+18 −0
Original line number Diff line number Diff line
@@ -488,6 +488,24 @@ public class RecentsPanelView extends FrameLayout implements OnItemClickListener
        showIfReady();
    }

    public TaskDescription getBottomTask() {
        if (mRecentsContainer != null) {
            ViewGroup container = mRecentsContainer;
            if (container instanceof RecentsScrollView) {
                container = (ViewGroup) container.findViewById(
                        R.id.recents_linear_layout);
            }
            if (container.getChildCount() > 0) {
                View v = container.getChildAt(container.getChildCount() - 1);
                if (v.getTag() instanceof ViewHolder) {
                    ViewHolder h = (ViewHolder)v.getTag();
                    return h.taskDescription;
                }
            }
        }
        return null;
    }

    public void clearRecentTasksList() {
        // Clear memory used by screenshots
        if (mRecentTaskDescriptions != null) {