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

Commit 987ba026 authored by Zak Cohen's avatar Zak Cohen Committed by Automerger Merge Worker
Browse files

Thumbnail Cache - check canceled status on the right thread. am: 19797b41

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12029198

Change-Id: I4be3f6ad965dce8e01fff78500334b95e098863c
parents 458fef86 19797b41
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -166,11 +166,13 @@ public class TaskThumbnailCache {
            public void run() {
                ThumbnailData thumbnail = ActivityManagerWrapper.getInstance().getTaskThumbnail(
                        key.id, lowResolution);

                MAIN_EXECUTOR.execute(() -> {
                    if (isCanceled()) {
                        // We don't call back to the provided callback in this case
                        return;
                    }
                MAIN_EXECUTOR.execute(() -> {

                    mCache.put(key, thumbnail);
                    callback.accept(thumbnail);
                    onEnd();