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

Commit 979f5ed9 authored by Wale Ogunwale's avatar Wale Ogunwale
Browse files

Revert "Dont update thumbnails of freeform windows on focus change"

This reverts commit 17690ffc.

Can not reproduce the problem reported in the original bug that
required the reverted CL.

Bug: 23591449
Bug: 23562904
Change-Id: I8262cef52036816e9b3f422f6b75b1959a4da7cd
parent b52b1805
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -901,14 +901,8 @@ final class ActivityStack {
        prev.task.touchActiveTime();
        prev.task.touchActiveTime();
        clearLaunchTime(prev);
        clearLaunchTime(prev);
        final ActivityRecord next = mStackSupervisor.topRunningActivityLocked();
        final ActivityRecord next = mStackSupervisor.topRunningActivityLocked();
        // In freeform mode we only update the thumbnail when there is no thumbnail yet since every
        if (mService.mHasRecents
        // focus change will request a thumbnail to be taken.
                && (next == null || next.noDisplay || next.task != prev.task || uiSleeping)) {
        // Note furthermore that since windows can change their content in freeform mode all the
        // time a thumbnail is possibly constantly outdated.
        if (mService.mHasRecents &&
                (next == null || next.noDisplay || next.task != prev.task || uiSleeping) &&
                (!prev.task.hasThumbnail() ||
                        prev.task.stack.mStackId != FREEFORM_WORKSPACE_STACK_ID)) {
            prev.updateThumbnailLocked(screenshotActivities(prev), null);
            prev.updateThumbnailLocked(screenshotActivities(prev), null);
        }
        }
        stopFullyDrawnTraceIfNeeded();
        stopFullyDrawnTraceIfNeeded();
+0 −8
Original line number Original line Diff line number Diff line
@@ -477,14 +477,6 @@ final class TaskRecord {
        setNextAffiliate(null);
        setNextAffiliate(null);
    }
    }


    /**
     * Returns true when we have a thumbnail.
     * @return Returns true if there is a thumbnail.
     */
    boolean hasThumbnail() {
        return mLastThumbnail != null;
    }

    /**
    /**
     * Sets the last thumbnail.
     * Sets the last thumbnail.
     * @return whether the thumbnail was set
     * @return whether the thumbnail was set