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

Commit 16a6279e authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

resolved conflicts for merge of 2094bf7b to master

Change-Id: I1820d186ca602bb3cd21a15f3c23f7d6d309d43b
parents 222ab662 2094bf7b
Loading
Loading
Loading
Loading
+9 −11
Original line number Diff line number Diff line
@@ -1041,24 +1041,22 @@ final class ActivityRecord {
    }

    ActivityRecord getWaitingHistoryRecordLocked() {
        // First find the real culprit...  if we are waiting
        // for another app to start, then we have paused dispatching
        // for this activity.
        // First find the real culprit...  if this activity is waiting for
        // another activity to start or has stopped, then the key dispatching
        // timeout should not be caused by this.
        ActivityRecord r = this;
        if (mStackSupervisor.mWaitingVisibleActivities.contains(this)) {
        if (mStackSupervisor.mWaitingVisibleActivities.contains(this) || stopped) {
            final ActivityStack stack = mStackSupervisor.getFocusedStack();
            // Hmmm, who might we be waiting for?
            r = stack.mResumedActivity;
            // Try to use the one which is closest to top.
            ActivityRecord r = stack.mResumedActivity;
            if (r == null) {
                r = stack.mPausingActivity;
            }
            // Both of those null?  Fall back to 'this' again
            if (r == null) {
                r = this;
            if (r != null) {
                return r;
            }
        }

        return r;
        return this;
    }

    /**
+7 −3
Original line number Diff line number Diff line
@@ -650,17 +650,21 @@ public final class ActivityStackSupervisor implements DisplayListener {
    }

    boolean allResumedActivitiesVisible() {
        boolean foundResumed = false;
        for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
            ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
            for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
                final ActivityStack stack = stacks.get(stackNdx);
                final ActivityRecord r = stack.mResumedActivity;
                if (r != null && (!r.nowVisible || mWaitingVisibleActivities.contains(r))) {
                if (r != null) {
                    if (!r.nowVisible || r.waitingVisible) {
                        return false;
                    }
                    foundResumed = true;
                }
            }
        return true;
        }
        return foundResumed;
    }

    /**