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

Commit 5b68d0e2 authored by Chris Li's avatar Chris Li Committed by Automerger Merge Worker
Browse files

Merge "Not resume the invisible TaskFragment when resume top Task" into...

Merge "Not resume the invisible TaskFragment when resume top Task" into sc-v2-dev am: db888014 am: 48478699

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15574561

Change-Id: I6ba07ec8b89273fc0088f546f7953a7c6c9efd7e
parents ee2dd366 48478699
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -3114,10 +3114,6 @@ class Task extends TaskFragment {
        });
    }

    boolean isFocusableAndVisible() {
        return isTopActivityFocusable() && shouldBeVisible(null /* starting */);
    }

    void positionChildAtTop(ActivityRecord child) {
        positionChildAt(child, POSITION_TOP);
    }
@@ -5037,7 +5033,10 @@ class Task extends TaskFragment {
            if (topFragment == f) {
                return;
            }

            if (!f.isFocusableAndVisible()) {
                // No need to resume activity in TaskFragment that is not visible.
                return;
            }
            resumed[0] |= f.resumeTopActivity(prev, options, deferPause);
        }, true);
        return resumed[0];
+4 −0
Original line number Diff line number Diff line
@@ -1262,6 +1262,10 @@ class TaskFragment extends WindowContainer<WindowContainer> {
        return getVisibility(starting) != TASK_FRAGMENT_VISIBILITY_INVISIBLE;
    }

    boolean isFocusableAndVisible() {
        return isTopActivityFocusable() && shouldBeVisible(null /* starting */);
    }

    final boolean startPausing(boolean uiSleeping, ActivityRecord resuming, String reason) {
        return startPausing(mTaskSupervisor.mUserLeaving, uiSleeping, resuming, reason);
    }