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

Commit 63056221 authored by Alex Chau's avatar Alex Chau
Browse files

Only refresh DISABLED_NO_THUMBNAIL when thumbnail changes

- Avoid refreshing all overlay content which happens too frequently

Bug: 193125090
Test: atest NexusLauncherTests:com.android.quickstep.TaplTestsQuickstep#testOverviewActions
Change-Id: Idcfe19a518e621c55574baae3bbe1378b7f3d08f
parent 61cfa57a
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -182,6 +182,13 @@ public class TaskOverlayFactory implements ResourceBasedOverride {
            }
        }

        /**
         * Called when the current task's thumbnail has changed.
         */
        public void refreshActionVisibility(ThumbnailData thumbnail) {
            getActionsView().updateDisabledFlags(DISABLED_NO_THUMBNAIL, thumbnail == null);
        }

        /**
         * End rendering live tile in Overview.
         *
+3 −1
Original line number Diff line number Diff line
@@ -162,7 +162,9 @@ public class TaskThumbnailView extends View implements PluginListener<OverviewSc
            mBitmapShader = new BitmapShader(bm, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
            mPaint.setShader(mBitmapShader);
            updateThumbnailMatrix();
            refreshOverlay();
            if (mOverlayEnabled) {
                getTaskOverlay().refreshActionVisibility(mThumbnailData);
            }
        } else {
            mBitmapShader = null;
            mThumbnailData = null;