Merge "Support A11y contextual button" into sc-v2-dev
diff --git a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
index 8a7d01b..fc1556e 100644
--- a/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
+++ b/quickstep/src/com/android/launcher3/BaseQuickstepLauncher.java
@@ -37,6 +37,7 @@
 import android.os.CancellationSignal;
 import android.os.IBinder;
 import android.view.View;
+import android.window.SplashScreen;
 
 import androidx.annotation.Nullable;
 
@@ -428,6 +429,7 @@
             ActivityOptionsCompat.setLauncherSourceInfo(
                     activityOptions.options, mLastTouchUpTime);
         }
+        activityOptions.options.setSplashscreenStyle(SplashScreen.SPLASH_SCREEN_STYLE_ICON);
         addLaunchCookie(item, activityOptions.options);
         return activityOptions;
     }
diff --git a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
index 46ef698..5b4e5f2 100644
--- a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
+++ b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
@@ -161,7 +161,7 @@
         if (mSurface != surface) {
             mSurface = surface;
             if (surface != null) {
-                setDepth(mDepth);
+                dispatchTransactionSurface(mDepth);
             }
         }
     }
@@ -175,6 +175,8 @@
         float toDepth = toState.getDepth(mLauncher);
         if (Float.compare(mDepth, toDepth) != 0) {
             setDepth(toDepth);
+        } else if (toState == LauncherState.OVERVIEW) {
+            dispatchTransactionSurface(mDepth);
         }
     }
 
@@ -200,26 +202,35 @@
         if (Float.compare(mDepth, depthF) == 0) {
             return;
         }
+        if (dispatchTransactionSurface(depthF)) {
+            mDepth = depthF;
+        }
+    }
 
+    private boolean dispatchTransactionSurface(float depth) {
         boolean supportsBlur = BlurUtils.supportsBlursOnWindows();
         if (supportsBlur && (mSurface == null || !mSurface.isValid())) {
-            return;
+            return false;
         }
-        mDepth = depthF;
         ensureDependencies();
         IBinder windowToken = mLauncher.getRootView().getWindowToken();
         if (windowToken != null) {
-            mWallpaperManager.setWallpaperZoomOut(windowToken, mDepth);
+            mWallpaperManager.setWallpaperZoomOut(windowToken, depth);
         }
 
         if (supportsBlur) {
-            boolean isOpaque = mLauncher.getScrimView().isFullyOpaque();
-            int blur = isOpaque ? 0 : (int) (mDepth * mMaxBlurRadius);
+            // We cannot mark the window as opaque in overview because there will be an app window
+            // below the launcher layer, and we need to draw it -- without blurs.
+            boolean isOverview = mLauncher.isInState(LauncherState.OVERVIEW);
+            boolean opaque = mLauncher.getScrimView().isFullyOpaque() && !isOverview;
+
+            int blur = opaque || isOverview ? 0 : (int) (depth * mMaxBlurRadius);
             new SurfaceControl.Transaction()
                     .setBackgroundBlurRadius(mSurface, blur)
-                    .setOpaque(mSurface, isOpaque)
+                    .setOpaque(mSurface, opaque)
                     .apply();
         }
+        return true;
     }
 
     @Override
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarIconController.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarIconController.java
index b36b829..7dca19c 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarIconController.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarIconController.java
@@ -15,15 +15,16 @@
  */
 package com.android.launcher3.taskbar;
 
+import static com.android.launcher3.AbstractFloatingView.TYPE_ALL;
 import static com.android.systemui.shared.system.ViewTreeObserverWrapper.InsetsInfo.TOUCHABLE_INSETS_FRAME;
 import static com.android.systemui.shared.system.ViewTreeObserverWrapper.InsetsInfo.TOUCHABLE_INSETS_REGION;
 
-import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.View.OnLongClickListener;
 
 import androidx.annotation.NonNull;
 
+import com.android.launcher3.AbstractFloatingView;
 import com.android.launcher3.R;
 import com.android.launcher3.anim.AlphaUpdateListener;
 import com.android.systemui.shared.system.ViewTreeObserverWrapper.InsetsInfo;
@@ -110,15 +111,9 @@
         }
 
         public void onDragLayerViewRemoved() {
-            int count = mDragLayer.getChildCount();
-            // Ensure no other children present (like Folders, etc)
-            for (int i = 0; i < count; i++) {
-                View v = mDragLayer.getChildAt(i);
-                if (!(v instanceof TaskbarView)) {
-                    return;
-                }
+            if (AbstractFloatingView.getOpenView(mActivity, TYPE_ALL) == null) {
+                mActivity.setTaskbarWindowFullscreen(false);
             }
-            mActivity.setTaskbarWindowFullscreen(false);
         }
     }
 }
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarStateHandler.java b/quickstep/src/com/android/launcher3/taskbar/TaskbarStateHandler.java
index e56ee87..20d4133 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarStateHandler.java
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarStateHandler.java
@@ -27,6 +27,8 @@
 import com.android.launcher3.statemanager.StateManager;
 import com.android.launcher3.states.StateAnimationConfig;
 import com.android.launcher3.util.MultiValueAlpha;
+import com.android.quickstep.AnimatedFloat;
+import com.android.quickstep.SystemUiProxy;
 
 /**
  * StateHandler to animate Taskbar according to Launcher's state machine. Does nothing if Taskbar
@@ -39,12 +41,17 @@
     // Contains Taskbar-related properties we should aniamte. If null, don't do anything.
     private @Nullable MultiValueAlpha.AlphaProperty mTaskbarAlpha = null;
 
+    private AnimatedFloat mNavbarButtonAlpha = new AnimatedFloat(this::updateNavbarButtonAlpha);
+
     public TaskbarStateHandler(BaseQuickstepLauncher launcher) {
         mLauncher = launcher;
     }
 
     public void setAnimationController(MultiValueAlpha.AlphaProperty taskbarAlpha) {
         mTaskbarAlpha = taskbarAlpha;
+        // Reapply state.
+        setState(mLauncher.getStateManager().getState());
+        updateNavbarButtonAlpha();
     }
 
     @Override
@@ -68,5 +75,14 @@
 
         boolean isTaskbarVisible = (toState.getVisibleElements(mLauncher) & TASKBAR) != 0;
         setter.setFloat(mTaskbarAlpha, MultiValueAlpha.VALUE, isTaskbarVisible ? 1f : 0f, LINEAR);
+        // Make the nav bar visible in states that taskbar isn't visible.
+        // TODO: We should draw our own handle instead of showing the nav bar.
+        float navbarButtonAlpha = isTaskbarVisible ? 0f : 1f;
+        setter.setFloat(mNavbarButtonAlpha, AnimatedFloat.VALUE, navbarButtonAlpha, LINEAR);
+    }
+
+
+    private void updateNavbarButtonAlpha() {
+        SystemUiProxy.INSTANCE.get(mLauncher).setNavBarButtonAlpha(mNavbarButtonAlpha.value, false);
     }
 }
diff --git a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java
index 1d52315..7a968c1 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/BaseRecentsViewStateController.java
@@ -17,6 +17,7 @@
 package com.android.launcher3.uioverrides;
 
 import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE_IN_OUT;
+import static com.android.launcher3.anim.Interpolators.INSTANT;
 import static com.android.launcher3.anim.Interpolators.LINEAR;
 import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_FADE;
 import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_MODAL;
@@ -113,7 +114,8 @@
                 toState.getOverviewModalness(),
                 config.getInterpolator(ANIM_OVERVIEW_MODAL, LINEAR));
         setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS,
-                toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()) ? 1f : 0f, LINEAR);
+                toState.displayOverviewTasksAsGrid(mLauncher.getDeviceProfile()) ? 1f : 0f,
+                INSTANT);
     }
 
     abstract FloatProperty getTaskModalnessProperty();
diff --git a/quickstep/src/com/android/quickstep/RecentsActivity.java b/quickstep/src/com/android/quickstep/RecentsActivity.java
index 0e9e3ad..6852642 100644
--- a/quickstep/src/com/android/quickstep/RecentsActivity.java
+++ b/quickstep/src/com/android/quickstep/RecentsActivity.java
@@ -40,6 +40,7 @@
 import android.os.Looper;
 import android.view.SurfaceControl.Transaction;
 import android.view.View;
+import android.window.SplashScreen;
 
 import androidx.annotation.Nullable;
 
@@ -222,9 +223,11 @@
                 wrapper, RECENTS_LAUNCH_DURATION,
                 RECENTS_LAUNCH_DURATION - STATUS_BAR_TRANSITION_DURATION
                         - STATUS_BAR_TRANSITION_PRE_DELAY);
-        return new ActivityOptionsWrapper(
+        final ActivityOptionsWrapper activityOptions = new ActivityOptionsWrapper(
                 ActivityOptionsCompat.makeRemoteAnimation(adapterCompat),
                 onEndCallback);
+        activityOptions.options.setSplashscreenStyle(SplashScreen.SPLASH_SCREEN_STYLE_ICON);
+        return activityOptions;
     }
 
     /**
@@ -350,8 +353,7 @@
     public void startHome() {
         if (LIVE_TILE.get()) {
             RecentsView recentsView = getOverviewPanel();
-            recentsView.switchToScreenshot(() -> recentsView.finishRecentsAnimation(true,
-                    this::startHomeInternal));
+            recentsView.switchToScreenshotAndFinishAnimationToRecents(this::startHomeInternal);
         } else {
             startHomeInternal();
         }
diff --git a/quickstep/src/com/android/quickstep/SystemUiProxy.java b/quickstep/src/com/android/quickstep/SystemUiProxy.java
index d040904..090fd01 100644
--- a/quickstep/src/com/android/quickstep/SystemUiProxy.java
+++ b/quickstep/src/com/android/quickstep/SystemUiProxy.java
@@ -85,6 +85,7 @@
     private float mLastNavButtonAlpha;
     private boolean mLastNavButtonAnimate;
     private boolean mHasNavButtonAlphaBeenSet = false;
+    private Runnable mPendingSetNavButtonAlpha = null;
 
     // TODO(141886704): Find a way to remove this
     private int mLastSystemUiStateFlags;
@@ -157,6 +158,11 @@
             setSmartspaceCallback(mPendingSmartspaceCallback);
             mPendingSmartspaceCallback = null;
         }
+
+        if (mPendingSetNavButtonAlpha != null) {
+            mPendingSetNavButtonAlpha.run();
+            mPendingSetNavButtonAlpha = null;
+        }
     }
 
     public void clearProxy() {
@@ -240,14 +246,18 @@
         boolean changed = Float.compare(alpha, mLastNavButtonAlpha) != 0
                 || animate != mLastNavButtonAnimate
                 || !mHasNavButtonAlphaBeenSet;
-        if (mSystemUiProxy != null && changed) {
-            mLastNavButtonAlpha = alpha;
-            mLastNavButtonAnimate = animate;
-            mHasNavButtonAlphaBeenSet = true;
-            try {
-                mSystemUiProxy.setNavBarButtonAlpha(alpha, animate);
-            } catch (RemoteException e) {
-                Log.w(TAG, "Failed call setNavBarButtonAlpha", e);
+        if (changed) {
+            if (mSystemUiProxy == null) {
+                mPendingSetNavButtonAlpha = () -> setNavBarButtonAlpha(alpha, animate);
+            } else {
+                mLastNavButtonAlpha = alpha;
+                mLastNavButtonAnimate = animate;
+                mHasNavButtonAlphaBeenSet = true;
+                try {
+                    mSystemUiProxy.setNavBarButtonAlpha(alpha, animate);
+                } catch (RemoteException e) {
+                    Log.w(TAG, "Failed call setNavBarButtonAlpha", e);
+                }
             }
         }
     }
diff --git a/quickstep/src/com/android/quickstep/TaskShortcutFactory.java b/quickstep/src/com/android/quickstep/TaskShortcutFactory.java
index 4ec1c15..a078bf3 100644
--- a/quickstep/src/com/android/quickstep/TaskShortcutFactory.java
+++ b/quickstep/src/com/android/quickstep/TaskShortcutFactory.java
@@ -30,6 +30,7 @@
 import android.os.Handler;
 import android.os.Looper;
 import android.view.View;
+import android.window.SplashScreen;
 
 import com.android.launcher3.BaseDraggingActivity;
 import com.android.launcher3.DeviceProfile;
@@ -165,6 +166,9 @@
             dismissTaskMenuView(mTarget);
 
             ActivityOptions options = mFactory.makeLaunchOptions(mTarget);
+            if (options != null) {
+                options.setSplashscreenStyle(SplashScreen.SPLASH_SCREEN_STYLE_ICON);
+            }
             if (options != null
                     && ActivityManagerWrapper.getInstance().startActivityFromRecents(taskId,
                             options)) {
diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
index 52083bb..854067b 100644
--- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
+++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsStateController.java
@@ -15,6 +15,7 @@
  */
 package com.android.quickstep.fallback;
 
+import static com.android.launcher3.anim.Interpolators.INSTANT;
 import static com.android.launcher3.anim.Interpolators.LINEAR;
 import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_MODAL;
 import static com.android.launcher3.states.StateAnimationConfig.ANIM_OVERVIEW_SCALE;
@@ -93,7 +94,7 @@
                 config.getInterpolator(ANIM_OVERVIEW_MODAL, LINEAR));
         setter.setFloat(mRecentsView, FULLSCREEN_PROGRESS, state.isFullScreen() ? 1 : 0, LINEAR);
         setter.setFloat(mRecentsView, RECENTS_GRID_PROGRESS,
-                state.displayOverviewTasksAsGrid(mActivity.getDeviceProfile()) ? 1f : 0f, LINEAR);
+                state.displayOverviewTasksAsGrid(mActivity.getDeviceProfile()) ? 1f : 0f, INSTANT);
 
         setter.setViewBackgroundColor(mActivity.getScrimView(), state.getScrimColor(mActivity),
                 config.getInterpolator(ANIM_SCRIM_FADE, LINEAR));
diff --git a/quickstep/src/com/android/quickstep/util/AnimatorControllerWithResistance.java b/quickstep/src/com/android/quickstep/util/AnimatorControllerWithResistance.java
index 7f94839..f1b4e3d 100644
--- a/quickstep/src/com/android/quickstep/util/AnimatorControllerWithResistance.java
+++ b/quickstep/src/com/android/quickstep/util/AnimatorControllerWithResistance.java
@@ -49,6 +49,7 @@
 
     private enum RecentsResistanceParams {
         FROM_APP(0.75f, 0.5f, 1f),
+        FROM_APP_TABLET(0.9f, 0.75f, 1f),
         FROM_OVERVIEW(1f, 0.75f, 0.5f);
 
         RecentsResistanceParams(float scaleStartResist, float scaleMaxResist,
@@ -228,7 +229,7 @@
 
         // These are not required, or can have a default value that is generally correct.
         @Nullable public PendingAnimation resistAnim = null;
-        public RecentsResistanceParams resistanceParams = RecentsResistanceParams.FROM_APP;
+        public RecentsResistanceParams resistanceParams;
         public float startScale = 1f;
         public float startTranslation = 0f;
 
@@ -242,6 +243,11 @@
             this.scaleProperty = scaleProperty;
             this.translationTarget = translationTarget;
             this.translationProperty = translationProperty;
+            if (dp.isTablet) {
+                resistanceParams = RecentsResistanceParams.FROM_APP_TABLET;
+            } else {
+                resistanceParams = RecentsResistanceParams.FROM_APP;
+            }
         }
 
         private RecentsParams setResistAnim(PendingAnimation resistAnim) {
diff --git a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
index b15bbf3..0e6ce87 100644
--- a/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
+++ b/quickstep/src/com/android/quickstep/util/TaskViewSimulator.java
@@ -256,8 +256,8 @@
 
         float fullScreenProgress = Utilities.boundToRange(this.fullScreenProgress.value, 0, 1);
         mCurrentFullscreenParams.setProgress(
-                fullScreenProgress, recentsViewScale.value, mTaskRect.width(), mDp,
-                mPositionHelper);
+                fullScreenProgress, recentsViewScale.value, /*taskViewScale=*/1f, mTaskRect.width(),
+                mDp, mPositionHelper);
 
         // Apply thumbnail matrix
         RectF insets = mCurrentFullscreenParams.mCurrentDrawnInsets;
diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java
index 17d1afc..923533a 100644
--- a/quickstep/src/com/android/quickstep/views/RecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/RecentsView.java
@@ -176,6 +176,10 @@
         TaskThumbnailCache.HighResLoadingState.HighResLoadingStateChangedCallback,
         TaskVisualsChangeListener, SplitScreenBounds.OnChangeListener {
 
+    // TODO(b/184899234): We use this timeout to wait a fixed period after switching to the
+    // screenshot when dismissing the current live task to ensure the app can try and get stopped.
+    private static final int REMOVE_TASK_WAIT_FOR_APP_STOP_MS = 100;
+
     public static final FloatProperty<RecentsView> CONTENT_ALPHA =
             new FloatProperty<RecentsView>("contentAlpha") {
                 @Override
@@ -369,6 +373,7 @@
     protected final Rect mTempRect = new Rect();
     protected final RectF mTempRectF = new RectF();
     private final PointF mTempPointF = new PointF();
+    private final Matrix mTempMatrix = new Matrix();
     private final float[] mTempFloat = new float[1];
     private final List<OnScrollChangedListener> mScrollListeners = new ArrayList<>();
 
@@ -498,7 +503,7 @@
     private Task mTmpRunningTask;
     protected int mFocusedTaskId = -1;
 
-    private boolean mRunningTaskIconScaledDown = false;
+    private boolean mTaskIconScaledDown = false;
 
     private boolean mOverviewStateEnabled;
     private boolean mHandleTaskStackChanges;
@@ -1187,6 +1192,7 @@
             TaskView taskView = getTaskViewAt(i);
             if (mIgnoreResetTaskId != taskView.getTaskId()) {
                 taskView.resetViewTransforms();
+                taskView.setIconScaleAndDim(mTaskIconScaledDown ? 0 : 1);
                 taskView.setStableAlpha(mContentAlpha);
                 taskView.setFullscreenProgress(mFullscreenProgress);
                 taskView.setModalness(mTaskModalness);
@@ -1205,11 +1211,6 @@
             setRunningTaskHidden(mRunningTaskTileHidden);
         }
 
-        // Force apply the scale.
-        if (mIgnoreResetTaskId != mRunningTaskId) {
-            applyRunningTaskIconScale();
-        }
-
         updateCurveProperties();
         // Update the set of visible task's data
         loadVisibleTaskData(TaskView.FLAG_UPDATE_ALL);
@@ -1357,12 +1358,11 @@
         for (int i = 0; i < taskCount; i++) {
             TaskView taskView = getTaskViewAt(i);
             taskView.updateTaskSize();
-            taskView.getPrimaryFullscreenTranslationProperty().set(taskView,
-                    accumulatedTranslationX);
-            taskView.getSecondaryFullscreenTranslationProperty().set(taskView, 0f);
+            taskView.getPrimaryNonGridTranslationProperty().set(taskView, accumulatedTranslationX);
+            taskView.getSecondaryNonGridTranslationProperty().set(taskView, 0f);
             // Compensate space caused by TaskView scaling.
             float widthDiff =
-                    taskView.getLayoutParams().width * (1 - taskView.getFullscreenScale());
+                    taskView.getLayoutParams().width * (1 - taskView.getNonGridScale());
             accumulatedTranslationX += mIsRtl ? widthDiff : -widthDiff;
         }
 
@@ -1661,7 +1661,7 @@
         setEnableFreeScroll(false);
         setEnableDrawingLiveTile(false);
         setRunningTaskHidden(true);
-        setRunningTaskIconScaledDown(true);
+        setTaskIconScaledDown(true);
     }
 
     /**
@@ -1670,9 +1670,7 @@
      */
     public void onSwipeUpAnimationSuccess() {
         Log.d("b/186444448", "onSwipeUpAnimationSuccess");
-        if (getRunningTaskView() != null) {
-            animateUpRunningTaskIconScale();
-        }
+        animateUpTaskIconScale();
         setSwipeDownShouldLaunchApp(true);
     }
 
@@ -1756,7 +1754,7 @@
             setRunningTaskViewShowScreenshot(true);
         }
         setRunningTaskHidden(false);
-        animateUpRunningTaskIconScale();
+        animateUpTaskIconScale();
         animateActionsViewIn();
 
         mCurrentGestureEndTarget = null;
@@ -1820,7 +1818,7 @@
 
         if (mRunningTaskId != -1) {
             // Reset the state on the old running task view
-            setRunningTaskIconScaledDown(false);
+            setTaskIconScaledDown(false);
             setRunningTaskViewShowScreenshot(true);
             setRunningTaskHidden(false);
         }
@@ -1851,21 +1849,13 @@
         }
     }
 
-    public void setRunningTaskIconScaledDown(boolean isScaledDown) {
-        if (mRunningTaskIconScaledDown != isScaledDown) {
-            mRunningTaskIconScaledDown = isScaledDown;
-            applyRunningTaskIconScale();
-        }
-    }
-
-    public boolean isTaskIconScaledDown(TaskView taskView) {
-        return mRunningTaskIconScaledDown && getRunningTaskView() == taskView;
-    }
-
-    private void applyRunningTaskIconScale() {
-        TaskView firstTask = getRunningTaskView();
-        if (firstTask != null) {
-            firstTask.setIconScaleAndDim(mRunningTaskIconScaledDown ? 0 : 1);
+    public void setTaskIconScaledDown(boolean isScaledDown) {
+        if (mTaskIconScaledDown != isScaledDown) {
+            mTaskIconScaledDown = isScaledDown;
+            int taskCount = getTaskViewCount();
+            for (int i = 0; i < taskCount; i++) {
+                getTaskViewAt(i).setIconScaleAndDim(mTaskIconScaledDown ? 0 : 1);
+            }
         }
     }
 
@@ -1876,14 +1866,14 @@
         anim.start();
     }
 
-    public void animateUpRunningTaskIconScale() {
-        mRunningTaskIconScaledDown = false;
-        TaskView firstTask = getRunningTaskView();
-        Log.d("b/186444448", "animateUpRunningTaskIconScale: firstTask="
-                + (firstTask != null ? "t:" + firstTask.getTask() : null));
-        if (firstTask != null) {
-            firstTask.setIconScaleAnimStartProgress(0f);
-            firstTask.animateIconScaleAndDimIntoView();
+    public void animateUpTaskIconScale() {
+        mTaskIconScaledDown = false;
+        Log.d("b/186444448", "animateUpRunningTaskIconScale");
+        int taskCount = getTaskViewCount();
+        for (int i = 0; i < taskCount; i++) {
+            TaskView taskView = getTaskViewAt(i);
+            taskView.setIconScaleAnimStartProgress(0f);
+            taskView.animateIconScaleAndDimIntoView();
         }
     }
 
@@ -2025,20 +2015,18 @@
         // We need to maintain snapped task's page scroll invariant between quick switch and
         // overview, so we sure snapped task's grid translation is 0, and add a non-fullscreen
         // translationX that is the same as snapped task's full scroll adjustment.
-        float snappedTaskFullscreenScrollAdjustment = 0;
+        float snappedTaskNonGridScrollAdjustment = 0;
         float snappedTaskGridTranslationX = 0;
         if (snappedTaskView != null) {
-            snappedTaskFullscreenScrollAdjustment = snappedTaskView.getScrollAdjustment(
+            snappedTaskNonGridScrollAdjustment = snappedTaskView.getScrollAdjustment(
                     /*fullscreenEnabled=*/true, /*gridEnabled=*/false);
             snappedTaskGridTranslationX = gridTranslations[snappedPage - mTaskViewStartIndex];
         }
 
         for (int i = 0; i < taskCount; i++) {
             TaskView taskView = getTaskViewAt(i);
-            taskView.setGridTranslationX(gridTranslations[i] - snappedTaskGridTranslationX);
-            taskView.getPrimaryNonFullscreenTranslationProperty().set(taskView,
-                    snappedTaskFullscreenScrollAdjustment);
-            taskView.getSecondaryNonFullscreenTranslationProperty().set(taskView, 0f);
+            taskView.setGridTranslationX(gridTranslations[i] - snappedTaskGridTranslationX
+                    + snappedTaskNonGridScrollAdjustment);
         }
 
         // Use the accumulated translation of the row containing the last task.
@@ -2073,7 +2061,7 @@
 
         float clearAllTotalTranslationX =
                 clearAllAccumulatedTranslation + clearAllShorterRowCompensation
-                        + clearAllShortTotalCompensation + snappedTaskFullscreenScrollAdjustment;
+                        + clearAllShortTotalCompensation + snappedTaskNonGridScrollAdjustment;
         if (focusedTaskIndex < taskCount) {
             // Shift by focused task's width and spacing if a task is focused.
             clearAllTotalTranslationX +=
@@ -2193,7 +2181,7 @@
                 .setDampingRatio(rp.getFloat(R.dimen.dismiss_task_trans_y_damping_ratio))
                 .setStiffness(rp.getFloat(R.dimen.dismiss_task_trans_y_stiffness));
         FloatProperty<TaskView> dismissingTaskViewTranslate =
-                taskView.getSecondaryDissmissTranslationProperty();;
+                taskView.getSecondaryDissmissTranslationProperty();
         // TODO(b/186800707) translate entire grid size distance
         int translateDistance = mOrientationHandler.getSecondaryDimension(taskView);
         int positiveNegativeFactor = mOrientationHandler.getSecondaryTranslationDirectionFactor();
@@ -2226,7 +2214,7 @@
         anim.add(ObjectAnimator.ofFloat(taskView, dismissingTaskViewTranslate,
                 positiveNegativeFactor * translateDistance * 2).setDuration(duration), LINEAR, sp);
 
-        if (LIVE_TILE.get() && taskView.isRunningTask()) {
+        if (LIVE_TILE.get() && mEnableDrawingLiveTile && taskView.isRunningTask()) {
             anim.addOnFrameCallback(() -> {
                 mLiveTileTaskViewSimulator.taskSecondaryTranslation.value =
                         mOrientationHandler.getSecondaryValue(
@@ -2349,6 +2337,15 @@
                     anim.setFloat(child, translationProperty, scrollDiff, clampToProgress(LINEAR,
                             Utilities.boundToRange(INITIAL_DISMISS_TRANSLATION_INTERPOLATION_OFFSET
                                     + additionalDismissDuration, 0f, 1f), 1));
+                    if (LIVE_TILE.get() && mEnableDrawingLiveTile && child instanceof TaskView
+                            && ((TaskView) child).isRunningTask()) {
+                        anim.addOnFrameCallback(() -> {
+                            mLiveTileTaskViewSimulator.taskPrimaryTranslation.value =
+                                    mOrientationHandler.getPrimaryValue(child.getTranslationX(),
+                                            child.getTranslationY());
+                            redrawLiveTile();
+                        });
+                    }
                     needsCurveUpdates = true;
                 }
             } else if (child instanceof TaskView) {
@@ -2423,8 +2420,11 @@
                 if (success) {
                     if (shouldRemoveTask) {
                         if (dismissedTaskView.getTask() != null) {
-                            UI_HELPER_EXECUTOR.execute(() -> ActivityManagerWrapper.getInstance()
-                                    .removeTask(dismissedTaskId));
+                            switchToScreenshotAndFinishAnimationToRecents(() -> {
+                                UI_HELPER_EXECUTOR.getHandler().postDelayed(() ->
+                                        ActivityManagerWrapper.getInstance().removeTask(
+                                                dismissedTaskId), REMOVE_TASK_WAIT_FOR_APP_STOP_MS);
+                            });
                             mActivity.getStatsLogManager().logger()
                                     .withItemInfo(dismissedTaskView.getItemInfo())
                                     .log(LAUNCHER_TASK_DISMISS_SWIPE_UP);
@@ -2460,6 +2460,7 @@
                         // Update scroll and snap to page.
                         updateScrollSynchronously();
                         snapToPageImmediately(pageToSnapTo);
+                        dispatchScrollChanged();
                     }
                 }
                 onDismissAnimationEnds();
@@ -2529,10 +2530,13 @@
         mPendingAnimation.addEndListener(isSuccess -> {
             if (isSuccess) {
                 // Remove all the task views now
-                UI_HELPER_EXECUTOR.execute(
-                        ActivityManagerWrapper.getInstance()::removeAllRecentTasks);
-                removeTasksViewsAndClearAllButton();
-                startHome();
+                switchToScreenshotAndFinishAnimationToRecents(() -> {
+                    UI_HELPER_EXECUTOR.getHandler().postDelayed(
+                            ActivityManagerWrapper.getInstance()::removeAllRecentTasks,
+                            REMOVE_TASK_WAIT_FOR_APP_STOP_MS);
+                    removeTasksViewsAndClearAllButton();
+                    startHome();
+                });
             }
             mPendingAnimation = null;
         });
@@ -2687,9 +2691,7 @@
     protected void onConfigurationChanged(Configuration newConfig) {
         super.onConfigurationChanged(newConfig);
         if (LIVE_TILE.get() && mEnableDrawingLiveTile && newConfig.orientation != mOrientation) {
-            switchToScreenshot(
-                    () -> finishRecentsAnimation(true /* toRecents */,
-                            this::updateRecentsRotation));
+            switchToScreenshotAndFinishAnimationToRecents(this::updateRecentsRotation);
             mEnableDrawingLiveTile = false;
         } else {
             updateRecentsRotation();
@@ -2874,6 +2876,12 @@
             outRect.offset(taskView.getPersistentTranslationX(),
                     taskView.getPersistentTranslationY());
             outRect.top += mActivity.getDeviceProfile().overviewTaskThumbnailTopMarginPx;
+
+            mTempMatrix.reset();
+            float persistentScale = taskView.getPersistentScale();
+            mTempMatrix.postScale(persistentScale, persistentScale,
+                    mIsRtl ? outRect.right : outRect.left, outRect.top);
+            mTempMatrix.mapRect(outRect);
         }
         outRect.offset(mOrientationHandler.getPrimaryValue(-midPointScroll, 0),
                 mOrientationHandler.getSecondaryValue(-midPointScroll, 0));
@@ -3687,6 +3695,10 @@
         }
     }
 
+    public void switchToScreenshotAndFinishAnimationToRecents(Runnable onFinishRunnable) {
+        switchToScreenshot(() -> finishRecentsAnimation(true /* toRecents */, onFinishRunnable));
+    }
+
     /**
      * Switch the current running task view to static snapshot mode,
      * capturing the snapshot at the same time.
diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java
index ea37d70..8ed6c14 100644
--- a/quickstep/src/com/android/quickstep/views/TaskView.java
+++ b/quickstep/src/com/android/quickstep/views/TaskView.java
@@ -158,7 +158,7 @@
     public static final long SCALE_ICON_DURATION = 120;
     private static final long DIM_ANIM_DURATION = 700;
 
-    private static final Interpolator FULLSCREEN_INTERPOLATOR = ACCEL_DEACCEL;
+    private static final Interpolator GRID_INTERPOLATOR = ACCEL_DEACCEL;
 
     /**
      * This technically can be a vanilla {@link TouchDelegate} class, however that class requires
@@ -289,55 +289,29 @@
                 }
             };
 
-    private static final FloatProperty<TaskView> FULLSCREEN_TRANSLATION_X =
-            new FloatProperty<TaskView>("fullscreenTranslationX") {
+    private static final FloatProperty<TaskView> NON_GRID_TRANSLATION_X =
+            new FloatProperty<TaskView>("nonGridTranslationX") {
                 @Override
                 public void setValue(TaskView taskView, float v) {
-                    taskView.setFullscreenTranslationX(v);
+                    taskView.setNonGridTranslationX(v);
                 }
 
                 @Override
                 public Float get(TaskView taskView) {
-                    return taskView.mFullscreenTranslationX;
+                    return taskView.mNonGridTranslationX;
                 }
             };
 
-    private static final FloatProperty<TaskView> FULLSCREEN_TRANSLATION_Y =
-            new FloatProperty<TaskView>("fullscreenTranslationY") {
+    private static final FloatProperty<TaskView> NON_GRID_TRANSLATION_Y =
+            new FloatProperty<TaskView>("nonGridTranslationY") {
                 @Override
                 public void setValue(TaskView taskView, float v) {
-                    taskView.setFullscreenTranslationY(v);
+                    taskView.setNonGridTranslationY(v);
                 }
 
                 @Override
                 public Float get(TaskView taskView) {
-                    return taskView.mFullscreenTranslationY;
-                }
-            };
-
-    private static final FloatProperty<TaskView> NON_FULLSCREEN_TRANSLATION_X =
-            new FloatProperty<TaskView>("nonFullscreenTranslationX") {
-                @Override
-                public void setValue(TaskView taskView, float v) {
-                    taskView.setNonFullscreenTranslationX(v);
-                }
-
-                @Override
-                public Float get(TaskView taskView) {
-                    return taskView.mNonFullscreenTranslationX;
-                }
-            };
-
-    private static final FloatProperty<TaskView> NON_FULLSCREEN_TRANSLATION_Y =
-            new FloatProperty<TaskView>("nonFullscreenTranslationY") {
-                @Override
-                public void setValue(TaskView taskView, float v) {
-                    taskView.setNonFullscreenTranslationY(v);
-                }
-
-                @Override
-                public Float get(TaskView taskView) {
-                    return taskView.mNonFullscreenTranslationY;
+                    return taskView.mNonGridTranslationY;
                 }
             };
 
@@ -362,7 +336,7 @@
     private final DigitalWellBeingToast mDigitalWellBeingToast;
     private float mFullscreenProgress;
     private float mGridProgress;
-    private float mFullscreenScale = 1;
+    private float mNonGridScale = 1;
     private final FullscreenDrawParams mCurrentFullscreenParams;
     private final StatefulActivity mActivity;
 
@@ -374,16 +348,14 @@
     private float mTaskResistanceTranslationX;
     private float mTaskResistanceTranslationY;
     // The following translation variables should only be used in the same orientation as Launcher.
-    private float mFullscreenTranslationX;
-    private float mFullscreenTranslationY;
-    // Applied as a complement to fullscreenTranslation, for adjusting the carousel overview, or the
-    // in transition carousel before forming the grid on tablets.
-    private float mNonFullscreenTranslationX;
-    private float mNonFullscreenTranslationY;
     private float mBoxTranslationY;
     // The following grid translations scales with mGridProgress.
     private float mGridTranslationX;
     private float mGridTranslationY;
+    // Applied as a complement to gridTranslation, for adjusting the carousel overview and quick
+    // switch.
+    private float mNonGridTranslationX;
+    private float mNonGridTranslationY;
     // Used when in SplitScreenSelectState
     private float mSplitSelectTranslationY;
     private float mSplitSelectTranslationX;
@@ -881,9 +853,8 @@
 
     @Override
     public void onRecycle() {
-        mFullscreenTranslationX = mFullscreenTranslationY = mNonFullscreenTranslationX =
-                mNonFullscreenTranslationY = mGridTranslationX = mGridTranslationY =
-                        mBoxTranslationY = 0f;
+        mNonGridTranslationX = mNonGridTranslationY =
+                mGridTranslationX = mGridTranslationY = mBoxTranslationY = 0f;
         resetViewTransforms();
         // Clear any references to the thumbnail (it will be re-read either from the cache or the
         // system on next bind)
@@ -969,13 +940,13 @@
         }
     }
 
-    private void setFullscreenScale(float fullscreenScale) {
-        mFullscreenScale = fullscreenScale;
+    private void setNonGridScale(float nonGridScale) {
+        mNonGridScale = nonGridScale;
         applyScale();
     }
 
-    public float getFullscreenScale() {
-        return mFullscreenScale;
+    public float getNonGridScale() {
+        return mNonGridScale;
     }
 
     private void setSnapshotScale(float dismissScale) {
@@ -997,12 +968,22 @@
 
     private void applyScale() {
         float scale = 1;
-        float fullScreenProgress = FULLSCREEN_INTERPOLATOR.getInterpolation(mFullscreenProgress);
-        scale *= Utilities.mapRange(fullScreenProgress, 1f, mFullscreenScale);
+        scale *= getPersistentScale();
         setScaleX(scale);
         setScaleY(scale);
     }
 
+    /**
+     * Returns multiplication of scale that is persistent (e.g. fullscreen and grid), and does not
+     * change according to a temporary state.
+     */
+    public float getPersistentScale() {
+        float scale = 1;
+        float gridProgress = GRID_INTERPOLATOR.getInterpolation(mGridProgress);
+        scale *= Utilities.mapRange(gridProgress, mNonGridScale, 1f);
+        return scale;
+    }
+
     private void setSplitSelectTranslationX(float x) {
         mSplitSelectTranslationX = x;
         applyTranslationX();
@@ -1042,23 +1023,13 @@
         applyTranslationY();
     }
 
-    private void setFullscreenTranslationX(float fullscreenTranslationX) {
-        mFullscreenTranslationX = fullscreenTranslationX;
+    private void setNonGridTranslationX(float nonGridTranslationX) {
+        mNonGridTranslationX = nonGridTranslationX;
         applyTranslationX();
     }
 
-    private void setFullscreenTranslationY(float fullscreenTranslationY) {
-        mFullscreenTranslationY = fullscreenTranslationY;
-        applyTranslationY();
-    }
-
-    private void setNonFullscreenTranslationX(float nonFullscreenTranslationX) {
-        mNonFullscreenTranslationX = nonFullscreenTranslationX;
-        applyTranslationX();
-    }
-
-    private void setNonFullscreenTranslationY(float nonFullscreenTranslationY) {
-        mNonFullscreenTranslationY = nonFullscreenTranslationY;
+    private void setNonGridTranslationY(float nonGridTranslationY) {
+        mNonGridTranslationY = nonGridTranslationY;
         applyTranslationY();
     }
 
@@ -1082,13 +1053,10 @@
 
     public float getScrollAdjustment(boolean fullscreenEnabled, boolean gridEnabled) {
         float scrollAdjustment = 0;
-        if (fullscreenEnabled) {
-            scrollAdjustment += getPrimaryFullscreenTranslationProperty().get(this);
-        } else {
-            scrollAdjustment += getPrimaryNonFullscreenTranslationProperty().get(this);
-        }
         if (gridEnabled) {
             scrollAdjustment += mGridTranslationX;
+        } else {
+            scrollAdjustment += getPrimaryNonGridTranslationProperty().get(this);
         }
         return scrollAdjustment;
     }
@@ -1100,7 +1068,7 @@
     public float getSizeAdjustment(boolean fullscreenEnabled) {
         float sizeAdjustment = 1;
         if (fullscreenEnabled) {
-            sizeAdjustment *= mFullscreenScale;
+            sizeAdjustment *= mNonGridScale;
         }
         return sizeAdjustment;
     }
@@ -1125,9 +1093,7 @@
      * change according to a temporary state (e.g. task offset).
      */
     public float getPersistentTranslationX() {
-        return getFullscreenTrans(mFullscreenTranslationX)
-                + getNonFullscreenTrans(mNonFullscreenTranslationX)
-                + getGridTrans(mGridTranslationX);
+        return getNonGridTrans(mNonGridTranslationX) + getGridTrans(mGridTranslationX);
     }
 
     /**
@@ -1136,8 +1102,7 @@
      */
     public float getPersistentTranslationY() {
         return mBoxTranslationY
-                + getFullscreenTrans(mFullscreenTranslationY)
-                + getNonFullscreenTrans(mNonFullscreenTranslationY)
+                + getNonGridTrans(mNonGridTranslationY)
                 + getGridTrans(mGridTranslationY);
     }
 
@@ -1171,24 +1136,14 @@
                 TASK_RESISTANCE_TRANSLATION_X, TASK_RESISTANCE_TRANSLATION_Y);
     }
 
-    public FloatProperty<TaskView> getPrimaryFullscreenTranslationProperty() {
+    public FloatProperty<TaskView> getPrimaryNonGridTranslationProperty() {
         return getPagedOrientationHandler().getPrimaryValue(
-                FULLSCREEN_TRANSLATION_X, FULLSCREEN_TRANSLATION_Y);
+                NON_GRID_TRANSLATION_X, NON_GRID_TRANSLATION_Y);
     }
 
-    public FloatProperty<TaskView> getSecondaryFullscreenTranslationProperty() {
+    public FloatProperty<TaskView> getSecondaryNonGridTranslationProperty() {
         return getPagedOrientationHandler().getSecondaryValue(
-                FULLSCREEN_TRANSLATION_X, FULLSCREEN_TRANSLATION_Y);
-    }
-
-    public FloatProperty<TaskView> getPrimaryNonFullscreenTranslationProperty() {
-        return getPagedOrientationHandler().getPrimaryValue(
-                NON_FULLSCREEN_TRANSLATION_X, NON_FULLSCREEN_TRANSLATION_Y);
-    }
-
-    public FloatProperty<TaskView> getSecondaryNonFullscreenTranslationProperty() {
-        return getPagedOrientationHandler().getSecondaryValue(
-                NON_FULLSCREEN_TRANSLATION_X, NON_FULLSCREEN_TRANSLATION_Y);
+                NON_GRID_TRANSLATION_X, NON_GRID_TRANSLATION_Y);
     }
 
     @Override
@@ -1326,19 +1281,9 @@
         mIconView.setVisibility(progress < 1 ? VISIBLE : INVISIBLE);
         getThumbnail().getTaskOverlay().setFullscreenProgress(progress);
 
-        applyTranslationX();
-        applyTranslationY();
-        applyScale();
-
         TaskThumbnailView thumbnail = getThumbnail();
         updateCurrentFullscreenParams(thumbnail.getPreviewPositionHelper());
 
-        if (!getRecentsView().isTaskIconScaledDown(this)) {
-            // Some of the items in here are dependent on the current fullscreen params, but don't
-            // update them if the icon is supposed to be scaled down.
-            setIconScaleAndDim(progress, true /* invert */);
-        }
-
         thumbnail.setFullscreenParams(mCurrentFullscreenParams);
         mOutlineProvider.updateParams(
                 mCurrentFullscreenParams,
@@ -1353,6 +1298,7 @@
         mCurrentFullscreenParams.setProgress(
                 mFullscreenProgress,
                 getRecentsView().getScaleX(),
+                getScaleX(),
                 getWidth(), mActivity.getDeviceProfile(),
                 previewPositionHelper);
     }
@@ -1363,7 +1309,7 @@
      */
     void updateTaskSize() {
         ViewGroup.LayoutParams params = getLayoutParams();
-        float fullscreenScale;
+        float nonGridScale;
         float boxTranslationY;
         int expectedWidth;
         int expectedHeight;
@@ -1394,18 +1340,18 @@
             expectedHeight = boxHeight + thumbnailPadding;
 
             // Scale to to fit task Rect.
-            fullscreenScale = taskWidth / (float) boxWidth;
+            nonGridScale = taskWidth / (float) boxWidth;
 
             // Align to top of task Rect.
             boxTranslationY = (expectedHeight - thumbnailPadding - taskHeight) / 2.0f;
         } else {
-            fullscreenScale = 1f;
+            nonGridScale = 1f;
             boxTranslationY = 0f;
             expectedWidth = ViewGroup.LayoutParams.MATCH_PARENT;
             expectedHeight = ViewGroup.LayoutParams.MATCH_PARENT;
         }
 
-        setFullscreenScale(fullscreenScale);
+        setNonGridScale(nonGridScale);
         setBoxTranslationY(boxTranslationY);
         if (params.width != expectedWidth || params.height != expectedHeight) {
             params.width = expectedWidth;
@@ -1414,20 +1360,15 @@
         }
     }
 
-    private float getFullscreenTrans(float endTranslation) {
-        float progress = FULLSCREEN_INTERPOLATOR.getInterpolation(mFullscreenProgress);
-        return Utilities.mapRange(progress, 0, endTranslation);
-    }
-
-    private float getNonFullscreenTrans(float endTranslation) {
-        return endTranslation - getFullscreenTrans(endTranslation);
-    }
-
     private float getGridTrans(float endTranslation) {
-        float progress = ACCEL_DEACCEL.getInterpolation(mGridProgress);
+        float progress = GRID_INTERPOLATOR.getInterpolation(mGridProgress);
         return Utilities.mapRange(progress, 0, endTranslation);
     }
 
+    private float getNonGridTrans(float endTranslation) {
+        return endTranslation - getGridTrans(endTranslation);
+    }
+
     public boolean isRunningTask() {
         if (getRecentsView() == null) {
             return false;
@@ -1494,8 +1435,8 @@
         /**
          * Sets the progress in range [0, 1]
          */
-        public void setProgress(float fullscreenProgress, float parentScale, int previewWidth,
-                DeviceProfile dp, PreviewPositionHelper pph) {
+        public void setProgress(float fullscreenProgress, float parentScale, float taskViewScale,
+                int previewWidth, DeviceProfile dp, PreviewPositionHelper pph) {
             RectF insets = pph.getInsetsToDrawInFullscreen();
 
             float currentInsetsLeft = insets.left * fullscreenProgress;
@@ -1506,7 +1447,7 @@
 
             mCurrentDrawnCornerRadius =
                     Utilities.mapRange(fullscreenProgress, mCornerRadius, fullscreenCornerRadius)
-                            / parentScale;
+                            / parentScale / taskViewScale;
 
             // We scaled the thumbnail to fit the content (excluding insets) within task view width.
             // Now that we are drawing left/right insets again, we need to scale down to fit them.
diff --git a/res/drawable/widgets_list_bottom_ripple.xml b/res/drawable/widgets_list_bottom_ripple.xml
deleted file mode 100644
index c2debb1..0000000
--- a/res/drawable/widgets_list_bottom_ripple.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2021, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:color="?android:attr/colorControlHighlight">
-    <item android:id="@android:id/mask">
-        <shape android:shape="rectangle">
-            <solid android:color="@color/surface" />
-            <corners
-                android:topLeftRadius="@dimen/widget_list_content_corner_radius"
-                android:topRightRadius="@dimen/widget_list_content_corner_radius"
-                android:bottomLeftRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:bottomRightRadius="@dimen/widget_list_top_bottom_corner_radius" />
-        </shape>
-    </item>
-    <item android:id="@android:id/background">
-        <shape android:shape="rectangle">
-            <solid android:color="@color/surface" />
-            <corners
-                android:topLeftRadius="@dimen/widget_list_content_corner_radius"
-                android:topRightRadius="@dimen/widget_list_content_corner_radius"
-                android:bottomLeftRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:bottomRightRadius="@dimen/widget_list_top_bottom_corner_radius" />
-        </shape>
-    </item>
-</ripple>
\ No newline at end of file
diff --git a/res/drawable/widgets_list_middle_ripple.xml b/res/drawable/widgets_list_middle_ripple.xml
deleted file mode 100644
index 83f96a0..0000000
--- a/res/drawable/widgets_list_middle_ripple.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2021, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:color="?android:attr/colorControlHighlight">
-    <item android:id="@android:id/mask">
-        <shape android:shape="rectangle">
-            <solid android:color="@color/surface" />
-            <corners
-                android:topLeftRadius="@dimen/widget_list_content_corner_radius"
-                android:topRightRadius="@dimen/widget_list_content_corner_radius"
-                android:bottomLeftRadius="@dimen/widget_list_content_corner_radius"
-                android:bottomRightRadius="@dimen/widget_list_content_corner_radius" />
-        </shape>
-    </item>
-
-    <item android:id="@android:id/background">
-        <shape android:shape="rectangle">
-            <solid android:color="@color/surface" />
-            <corners
-                android:topLeftRadius="@dimen/widget_list_content_corner_radius"
-                android:topRightRadius="@dimen/widget_list_content_corner_radius"
-                android:bottomLeftRadius="@dimen/widget_list_content_corner_radius"
-                android:bottomRightRadius="@dimen/widget_list_content_corner_radius" />
-        </shape>
-    </item>
-</ripple>
\ No newline at end of file
diff --git a/res/drawable/widgets_list_single_item_ripple.xml b/res/drawable/widgets_list_single_item_ripple.xml
deleted file mode 100644
index a4223a8..0000000
--- a/res/drawable/widgets_list_single_item_ripple.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2021, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:color="?android:attr/colorControlHighlight">
-    <item android:id="@android:id/mask">
-        <shape android:shape="rectangle">
-            <solid android:color="@color/surface" />
-            <corners
-                android:topLeftRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:topRightRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:bottomLeftRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:bottomRightRadius="@dimen/widget_list_top_bottom_corner_radius" />
-        </shape>
-    </item>
-    <item android:id="@android:id/background">
-        <shape android:shape="rectangle">
-            <solid android:color="@color/surface" />
-            <corners
-                android:topLeftRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:topRightRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:bottomLeftRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:bottomRightRadius="@dimen/widget_list_top_bottom_corner_radius" />
-        </shape>
-    </item>
-</ripple>
\ No newline at end of file
diff --git a/res/drawable/widgets_list_top_ripple.xml b/res/drawable/widgets_list_top_ripple.xml
deleted file mode 100644
index bc0876e..0000000
--- a/res/drawable/widgets_list_top_ripple.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-**
-** Copyright 2021, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-**     http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:color="?android:attr/colorControlHighlight">
-    <item android:id="@android:id/mask">
-        <shape android:shape="rectangle">
-            <solid android:color="@color/surface" />
-            <corners
-                android:topLeftRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:topRightRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:bottomLeftRadius="@dimen/widget_list_content_corner_radius"
-                android:bottomRightRadius="@dimen/widget_list_content_corner_radius" />
-        </shape>
-    </item>
-
-    <item android:id="@android:id/background">
-        <shape android:shape="rectangle">
-            <solid android:color="@color/surface" />
-            <corners
-                android:topLeftRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:topRightRadius="@dimen/widget_list_top_bottom_corner_radius"
-                android:bottomLeftRadius="@dimen/widget_list_content_corner_radius"
-                android:bottomRightRadius="@dimen/widget_list_content_corner_radius" />
-        </shape>
-    </item>
-</ripple>
\ No newline at end of file
diff --git a/res/layout/all_apps.xml b/res/layout/all_apps.xml
index b570464..9ac6ed0 100644
--- a/res/layout/all_apps.xml
+++ b/res/layout/all_apps.xml
@@ -36,6 +36,7 @@
         android:layout_below="@id/search_container_all_apps"
         android:clipToPadding="false"
         android:paddingTop="@dimen/all_apps_header_top_padding"
+        android:paddingBottom="@dimen/all_apps_header_bottom_padding"
         android:orientation="vertical" >
 
         <include layout="@layout/floating_header_content" />
diff --git a/res/layout/all_apps_personal_work_tabs.xml b/res/layout/all_apps_personal_work_tabs.xml
index ebb69f6..cfaa261 100644
--- a/res/layout/all_apps_personal_work_tabs.xml
+++ b/res/layout/all_apps_personal_work_tabs.xml
@@ -31,7 +31,7 @@
         android:background="@drawable/personal_work_tabs_ripple"
         android:text="@string/all_apps_personal_tab"
         android:textColor="@color/all_apps_tab_text"
-        android:textSize="16sp" />
+        android:textSize="14sp" />
 
     <Button
         android:id="@+id/tab_work"
@@ -41,5 +41,5 @@
         android:background="@drawable/personal_work_tabs_ripple"
         android:text="@string/all_apps_work_tab"
         android:textColor="@color/all_apps_tab_text"
-        android:textSize="16sp" />
+        android:textSize="14sp" />
 </com.android.launcher3.workprofile.PersonalWorkSlidingTabStrip>
\ No newline at end of file
diff --git a/res/layout/user_folder_icon_normalized.xml b/res/layout/user_folder_icon_normalized.xml
index 8b18857..15131f1 100644
--- a/res/layout/user_folder_icon_normalized.xml
+++ b/res/layout/user_folder_icon_normalized.xml
@@ -18,7 +18,6 @@
     xmlns:launcher="http://schemas.android.com/apk/res-auto"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
-    android:background="@drawable/round_rect_folder"
     android:orientation="vertical" >
 
     <com.android.launcher3.folder.FolderPagedView
diff --git a/res/layout/widgets_list_row_header.xml b/res/layout/widgets_list_row_header.xml
index 8ab086c..0bfa2b2 100644
--- a/res/layout/widgets_list_row_header.xml
+++ b/res/layout/widgets_list_row_header.xml
@@ -20,7 +20,6 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginHorizontal="16dp"
-    android:background="@drawable/widgets_list_middle_ripple"
     android:layout_marginBottom="@dimen/widget_list_entry_bottom_margin"
     android:paddingVertical="@dimen/widget_list_header_view_vertical_padding"
     android:orientation="horizontal"
diff --git a/res/layout/widgets_table_container.xml b/res/layout/widgets_table_container.xml
index e63483d..c6b70aa 100644
--- a/res/layout/widgets_table_container.xml
+++ b/res/layout/widgets_table_container.xml
@@ -19,5 +19,4 @@
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
     android:layout_marginHorizontal="16dp"
-    android:background="@drawable/widgets_list_middle_ripple"
     android:layout_marginBottom="@dimen/widget_list_entry_bottom_margin"/>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index c1ed288..558d22f 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -160,8 +160,8 @@
     <string name="all_apps_personal_tab" msgid="4190252696685155002">"Osobní"</string>
     <string name="all_apps_work_tab" msgid="4884822796154055118">"Pracovní"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"Pracovní profil"</string>
-    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Osobní údaje jsou oddělené a jsou před pracovními aplikacemi skryty"</string>
-    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"K datům pracovních aplikací má přístup váš administrátor IT"</string>
+    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Osobní údaje jsou oddělené a před pracovními aplikacemi jsou skryty"</string>
+    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"Pracovní aplikace a údaje může vidět váš administrátor IT"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"Další"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"Rozumím"</string>
     <string name="work_apps_paused_title" msgid="2389865654362803723">"Pracovní profil je pozastaven"</string>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 3a20d17..72929cf 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -154,7 +154,7 @@
     <string name="all_apps_personal_tab" msgid="4190252696685155002">"Privat"</string>
     <string name="all_apps_work_tab" msgid="4884822796154055118">"Geschäftlich"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"Arbeitsprofil"</string>
-    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Personenbezogene Daten sind für geschäftlichen Apps nicht sichtbar oder zugänglich"</string>
+    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Personenbezogene Daten sind für geschäftliche Apps nicht sichtbar oder zugänglich"</string>
     <string name="work_profile_edu_work_apps" msgid="237051938268703058">"Geschäftliche Apps und Daten können von deinem IT-Administrator eingesehen werden"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"Weiter"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"OK"</string>
diff --git a/res/values-eu/strings.xml b/res/values-eu/strings.xml
index 812f007..735f6e3 100644
--- a/res/values-eu/strings.xml
+++ b/res/values-eu/strings.xml
@@ -154,7 +154,7 @@
     <string name="all_apps_personal_tab" msgid="4190252696685155002">"Pertsonalak"</string>
     <string name="all_apps_work_tab" msgid="4884822796154055118">"Lanekoak"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"Laneko profila"</string>
-    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Datu pertsonalak bananduta daude eta ez daude laneko aplikazioen artean ikusgai"</string>
+    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Datu pertsonalak ez daude laneko aplikazioetan, eta ezin dira haien bidez ikusi"</string>
     <string name="work_profile_edu_work_apps" msgid="237051938268703058">"IKT saileko administratzaileak laneko aplikazioak eta datuak ikus ditzake"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"Hurrengoa"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"Ados"</string>
diff --git a/res/values-fr-rCA/strings.xml b/res/values-fr-rCA/strings.xml
index 9522a38..e7801c9 100644
--- a/res/values-fr-rCA/strings.xml
+++ b/res/values-fr-rCA/strings.xml
@@ -51,12 +51,9 @@
     <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"Personnels"</string>
     <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"Professionnels"</string>
     <string name="widget_category_conversations" msgid="8894438636213590446">"Conversations"</string>
-    <!-- no translation found for widget_education_header (4874760613775913787) -->
-    <skip />
-    <!-- no translation found for widget_education_content (745542879510751525) -->
-    <skip />
-    <!-- no translation found for widget_education_close_button (8676165703104836580) -->
-    <skip />
+    <string name="widget_education_header" msgid="4874760613775913787">"Renseignements utiles à portée de main"</string>
+    <string name="widget_education_content" msgid="745542879510751525">"Pour obtenir des renseignements sans ouvrir aucune application, vous pouvez ajouter des widgets à votre écran d\'accueil"</string>
+    <string name="widget_education_close_button" msgid="8676165703104836580">"OK"</string>
     <string name="all_apps_search_bar_hint" msgid="1390553134053255246">"Rechercher dans les applications"</string>
     <string name="all_apps_loading_message" msgid="5813968043155271636">"Chargement des applications en cours…"</string>
     <string name="all_apps_no_search_results" msgid="3200346862396363786">"Aucune application trouvée correspondant à « <xliff:g id="QUERY">%1$s</xliff:g> »"</string>
diff --git a/res/values-gu/strings.xml b/res/values-gu/strings.xml
index 9c909a0..d9ffa68 100644
--- a/res/values-gu/strings.xml
+++ b/res/values-gu/strings.xml
@@ -51,12 +51,9 @@
     <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"વ્યક્તિગત"</string>
     <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"ઑફિસ"</string>
     <string name="widget_category_conversations" msgid="8894438636213590446">"વાતચીતો"</string>
-    <!-- no translation found for widget_education_header (4874760613775913787) -->
-    <skip />
-    <!-- no translation found for widget_education_content (745542879510751525) -->
-    <skip />
-    <!-- no translation found for widget_education_close_button (8676165703104836580) -->
-    <skip />
+    <string name="widget_education_header" msgid="4874760613775913787">"ઉપયોગી માહિતી તમારી આંગળીના ટેરવે"</string>
+    <string name="widget_education_content" msgid="745542879510751525">"ઍપને ખોલ્યા વિના માહિતી મેળવવા માટે, તમે તમારી હોમ સ્ક્રીન પર વિજેટ ઉમેરી શકો છો"</string>
+    <string name="widget_education_close_button" msgid="8676165703104836580">"સમજાઈ ગયું"</string>
     <string name="all_apps_search_bar_hint" msgid="1390553134053255246">"શોધ ઍપ્લિકેશનો"</string>
     <string name="all_apps_loading_message" msgid="5813968043155271636">"ઍપ્લિકેશનો લોડ કરી રહ્યું છે…"</string>
     <string name="all_apps_no_search_results" msgid="3200346862396363786">"\"<xliff:g id="QUERY">%1$s</xliff:g>\"થી મેળ ખાતી કોઈ ઍપ્લિકેશનો મળી નથી"</string>
diff --git a/res/values-hy/strings.xml b/res/values-hy/strings.xml
index bc68e3e..f7d6b31 100644
--- a/res/values-hy/strings.xml
+++ b/res/values-hy/strings.xml
@@ -32,7 +32,7 @@
     <string name="long_accessible_way_to_add" msgid="2733588281439571974">"Կրկնակի հպեք և պահեք՝ վիջեթ տեղափոխելու համար, կամ օգտվեք հատուկ գործողություններից։"</string>
     <string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
     <string name="widget_accessible_dims_format" msgid="3640149169885301790">"Լայնությունը՝ %1$d, բարձրությունը՝ %2$d"</string>
-    <string name="add_item_request_drag_hint" msgid="5653291305078645405">"Հպեք վիջեթին և պահեք՝ հիմնական էկրանին տեղափոխելու համար"</string>
+    <string name="add_item_request_drag_hint" msgid="5653291305078645405">"Հպեք վիջեթին և պահեք տեղափոխելու համար"</string>
     <string name="add_to_home_screen" msgid="8631549138215492708">"Ավելացնել հիմնական էկրանին"</string>
     <plurals name="widgets_count" formatted="false" msgid="656794749266073027">
       <item quantity="one"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> վիջեթ</item>
@@ -154,13 +154,13 @@
     <string name="all_apps_personal_tab" msgid="4190252696685155002">"Անձնական"</string>
     <string name="all_apps_work_tab" msgid="4884822796154055118">"Աշխատանքային"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"Աշխատանքային պրոֆիլ"</string>
-    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Անձնական տվյալները թաքցված են և առանձնացված աշխատանքային հավելվածներից"</string>
+    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Անձնական տվյալները առանձին են և թաքցված են, երբ ցուցադրվում են աշխատանքայինները"</string>
     <string name="work_profile_edu_work_apps" msgid="237051938268703058">"Աշխատանքային հավելվածներն ու դրանց տվյալները տեսանելի են ձեր ադմինիստրատորին"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"Առաջ"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"Եղավ"</string>
     <string name="work_apps_paused_title" msgid="2389865654362803723">"Աշխատանքային պրոֆիլը դադարեցված է"</string>
-    <string name="work_apps_paused_body" msgid="4209084728264328628">"Աշխատանքային հավելվածները չեն կարող ձեզ ծանուցումներ ուղարկել, օգտագործել ձեր մարտկոցը և ձեր տեղադրության մասին տվյալներ ստանալ։"</string>
-    <string name="work_apps_paused_content_description" msgid="4473292417145736203">"Աշխատանքային պրոֆիլը դադարեցված է։ Աշխատանքային հավելվածները չեն կարող ձեզ ծանուցումներ ուղարկել, օգտագործել ձեր մարտկոցը և ձեր տեղադրության մասին տվյալներ ստանալ։"</string>
+    <string name="work_apps_paused_body" msgid="4209084728264328628">"Աշխատանքային հավելվածները չեն կարող ծանուցումներ ուղարկել ձեզ, օգտագործել ձեր մարտկոցը և ձեր տեղադրության մասին տվյալներ ստանալ։"</string>
+    <string name="work_apps_paused_content_description" msgid="4473292417145736203">"Աշխատանքային պրոֆիլը դադարեցված է։ Աշխատանքային հավելվածները չեն կարող ծանուցումներ ուղարկել ձեզ, օգտագործել ձեր մարտկոցը և ձեր տեղադրության մասին տվյալներ ստանալ։"</string>
     <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"Աշխատանքային հավելվածները նշանակներ ունեն և տեսանելի են ձեր ՏՏ ադմինիստրատորին"</string>
     <string name="work_apps_paused_edu_accept" msgid="6377476824357318532">"Եղավ"</string>
     <string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Դադարեցնել աշխատանքային հավելվածները"</string>
diff --git a/res/values-iw/strings.xml b/res/values-iw/strings.xml
index fb72d55..8ec7de3 100644
--- a/res/values-iw/strings.xml
+++ b/res/values-iw/strings.xml
@@ -161,7 +161,7 @@
     <string name="all_apps_work_tab" msgid="4884822796154055118">"עבודה"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"פרופיל עבודה"</string>
     <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"מידע אישי מאוחסן בנפרד ומוסתר מאפליקציות לעבודה"</string>
-    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"‏אפליקציות לעבודה ונתוני העבודה שלך גלויים למנהל ה-IT"</string>
+    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"‏אפליקציות לעבודה ונתוני פרופיל העבודה שלך גלויים למנהל ה-IT"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"הבא"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"הבנתי"</string>
     <string name="work_apps_paused_title" msgid="2389865654362803723">"פרופיל העבודה מושהה"</string>
@@ -172,6 +172,6 @@
     <string name="work_apps_pause_btn_text" msgid="4669288269140620646">"השהיית האפליקציות לעבודה"</string>
     <string name="work_apps_enable_btn_text" msgid="82111102541971856">"הפעלה"</string>
     <string name="developer_options_filter_hint" msgid="5896817443635989056">"סינון"</string>
-    <string name="work_switch_tip" msgid="808075064383839144">"השהיה של התראות ואפליקציות לעבודה"</string>
+    <string name="work_switch_tip" msgid="808075064383839144">"השהיה של ההתראות והאפליקציות בפרופיל העבודה"</string>
     <string name="remote_action_failed" msgid="1383965239183576790">"הפעולה נכשלה: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
 </resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
index 60fe453..d54f884 100644
--- a/res/values-ja/strings.xml
+++ b/res/values-ja/strings.xml
@@ -154,13 +154,13 @@
     <string name="all_apps_personal_tab" msgid="4190252696685155002">"個人用"</string>
     <string name="all_apps_work_tab" msgid="4884822796154055118">"仕事用"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"仕事用プロファイル"</string>
-    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"個人データは仕事用アプリとは別に保存され、一緒に表示されません"</string>
+    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"個人用と仕事用のデータは分離され、アプリは別々に表示されます"</string>
     <string name="work_profile_edu_work_apps" msgid="237051938268703058">"仕事用アプリと仕事用データは IT 管理者に公開されます"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"次へ"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"OK"</string>
     <string name="work_apps_paused_title" msgid="2389865654362803723">"仕事用プロファイルが一時停止しています"</string>
-    <string name="work_apps_paused_body" msgid="4209084728264328628">"仕事用アプリは、通知の送信、バッテリーの使用、位置情報へのアクセスを行えません"</string>
-    <string name="work_apps_paused_content_description" msgid="4473292417145736203">"仕事用プロファイルが一時停止しています。仕事用アプリは、通知の送信、バッテリーの使用、位置情報へのアクセスを行えません"</string>
+    <string name="work_apps_paused_body" msgid="4209084728264328628">"仕事用アプリは、通知の送信、バッテリーの使用、位置情報の取得を行えません"</string>
+    <string name="work_apps_paused_content_description" msgid="4473292417145736203">"仕事用プロファイルが一時停止しています。仕事用アプリは、通知の送信、バッテリーの使用、位置情報の取得を行えません"</string>
     <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"仕事用アプリはバッジが付き、IT 管理者に公開されます"</string>
     <string name="work_apps_paused_edu_accept" msgid="6377476824357318532">"OK"</string>
     <string name="work_apps_pause_btn_text" msgid="4669288269140620646">"仕事用アプリを一時停止"</string>
diff --git a/res/values-kk/strings.xml b/res/values-kk/strings.xml
index 2b1b89f..640ffca 100644
--- a/res/values-kk/strings.xml
+++ b/res/values-kk/strings.xml
@@ -51,12 +51,9 @@
     <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"Жеке виджеттер"</string>
     <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"Жұмыс виджеттері"</string>
     <string name="widget_category_conversations" msgid="8894438636213590446">"Әңгімелер"</string>
-    <!-- no translation found for widget_education_header (4874760613775913787) -->
-    <skip />
-    <!-- no translation found for widget_education_content (745542879510751525) -->
-    <skip />
-    <!-- no translation found for widget_education_close_button (8676165703104836580) -->
-    <skip />
+    <string name="widget_education_header" msgid="4874760613775913787">"Саусақпен түртсеңіз болғаны – пайдалы ақпарат көз алдыңызда"</string>
+    <string name="widget_education_content" msgid="745542879510751525">"Қолданбаларды ашпай-ақ ақпарат алу үшін негізгі экранға тиісті виджеттерді қосыңыз."</string>
+    <string name="widget_education_close_button" msgid="8676165703104836580">"Түсінікті"</string>
     <string name="all_apps_search_bar_hint" msgid="1390553134053255246">"Қолданбаларды іздеу"</string>
     <string name="all_apps_loading_message" msgid="5813968043155271636">"Қолданбалар жүктелуде…"</string>
     <string name="all_apps_no_search_results" msgid="3200346862396363786">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" сұрауына сәйкес келетін қолданбалар жоқ"</string>
@@ -158,7 +155,7 @@
     <string name="all_apps_work_tab" msgid="4884822796154055118">"Жұмыс"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"Жұмыс профилі"</string>
     <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Жеке деректер бөлек орналасқан және жұмыс қолданбаларынан жасырылған"</string>
-    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"Әкімшіңіз жұмыс қолданбалары мен деректерді көре алады"</string>
+    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"Әкімшіңіз жұмыс қолданбалары мен деректерін көре алады"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"Келесі"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"Түсінікті"</string>
     <string name="work_apps_paused_title" msgid="2389865654362803723">"Жұмыс профилі кідіртілді"</string>
@@ -169,6 +166,6 @@
     <string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Жұмыс қолданбаларын тоқтата тұру"</string>
     <string name="work_apps_enable_btn_text" msgid="82111102541971856">"Қосу"</string>
     <string name="developer_options_filter_hint" msgid="5896817443635989056">"Сүзгі"</string>
-    <string name="work_switch_tip" msgid="808075064383839144">"Жұмыс қолданбалары мен хабарландыруларды кідірту"</string>
+    <string name="work_switch_tip" msgid="808075064383839144">"Жұмыс қолданбалары мен хабарландыруларын кідірту"</string>
     <string name="remote_action_failed" msgid="1383965239183576790">"Қате шықты: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
 </resources>
diff --git a/res/values-lv/strings.xml b/res/values-lv/strings.xml
index 059620c..ad4082b 100644
--- a/res/values-lv/strings.xml
+++ b/res/values-lv/strings.xml
@@ -50,7 +50,7 @@
     <string name="widgets_full_sheet_cancel_button_description" msgid="5766167035728653605">"Notīrīt tekstu no meklēšanas lodziņa"</string>
     <string name="no_widgets_available" msgid="9140948620298620513">"Nav pieejams neviens logrīks"</string>
     <string name="no_search_results" msgid="6518732304311458580">"Nav meklēšanas rezultātu"</string>
-    <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"Personīgie"</string>
+    <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"Personīgs"</string>
     <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"Darba"</string>
     <string name="widget_category_conversations" msgid="8894438636213590446">"Sarunas"</string>
     <string name="widget_education_header" msgid="4874760613775913787">"Ērta piekļuve noderīgai informācijai"</string>
diff --git a/res/values-my/strings.xml b/res/values-my/strings.xml
index 1a8650c..c120c24 100644
--- a/res/values-my/strings.xml
+++ b/res/values-my/strings.xml
@@ -157,7 +157,7 @@
     <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"ကိုယ်ပိုင်ဒေတာများသည် သီးသန့်ဖြစ်ပြီး အလုပ်အက်ပ်များမှ ဖျောက်ထားသည်"</string>
     <string name="work_profile_edu_work_apps" msgid="237051938268703058">"အလုပ်သုံးအက်ပ်နှင့် ဒေတာများကို သင်၏ IT စီမံခန့်ခွဲသူက မြင်ရပါသည်"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"ရှေ့သို့"</string>
-    <string name="work_profile_edu_accept" msgid="6069788082535149071">"Ok"</string>
+    <string name="work_profile_edu_accept" msgid="6069788082535149071">"ရပါပြီ"</string>
     <string name="work_apps_paused_title" msgid="2389865654362803723">"အလုပ်ပရိုဖိုင် ခဏရပ်ထားသည်"</string>
     <string name="work_apps_paused_body" msgid="4209084728264328628">"အလုပ်သုံးအက်ပ်များက အကြောင်းကြားချက်များ ပို့ခြင်း၊ သင့်ဘက်ထရီ သုံးခြင်း (သို့) သင့်တည်နေရာ သုံးခြင်းတို့ မပြုလုပ်နိုင်ပါ"</string>
     <string name="work_apps_paused_content_description" msgid="4473292417145736203">"အလုပ်ပရိုဖိုင် ခဏရပ်ထားသည်။ အလုပ်သုံးအက်ပ်များက အကြောင်းကြားချက်များ ပို့ခြင်း၊ သင့်ဘက်ထရီ သုံးခြင်း (သို့) သင့်တည်နေရာ သုံးခြင်းတို့ မပြုလုပ်နိုင်ပါ"</string>
diff --git a/res/values-ne/strings.xml b/res/values-ne/strings.xml
index 474a452..929e302 100644
--- a/res/values-ne/strings.xml
+++ b/res/values-ne/strings.xml
@@ -161,9 +161,9 @@
     <string name="work_profile_edu_work_apps" msgid="237051938268703058">"तपाईंका IT एड्मिनले कामसम्पबन्धी एपहरू र डेटा हेर्न सक्छन्"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"अर्को"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"बुझेँ"</string>
-    <string name="work_apps_paused_title" msgid="2389865654362803723">"कार्यालयको प्रोफाइल अस्थायी रूपमा रोक्का गरिएको छ"</string>
-    <string name="work_apps_paused_body" msgid="4209084728264328628">"कामसम्बन्धी एपहरूले तपाईंलाई सूचना पठाउन, तपाईंको डिभाइसको ब्याट्री प्रयोग गर्न वा तपाईंको स्थान हेर्न सक्दैनन्"</string>
-    <string name="work_apps_paused_content_description" msgid="4473292417145736203">"कामसम्बन्धी प्रोफाइल अस्थायी रूपमा रोक्का गरिएको छ। कामसम्बन्धी एपहरूले तपाईंलाई सूचना पठाउन, तपाईंको डिभाइसको ब्याट्री प्रयोग गर्न वा तपाईंको स्थान हेर्न सक्दैनन्"</string>
+    <string name="work_apps_paused_title" msgid="2389865654362803723">"कार्यालयको प्रोफाइल पज गरिएको छ"</string>
+    <string name="work_apps_paused_body" msgid="4209084728264328628">"कामसम्बन्धी एपहरूले तपाईंलाई सूचना पठाउन, तपाईंको डिभाइसको ब्याट्री प्रयोग गर्न वा तपाईंको लोकेसन हेर्न सक्दैनन्"</string>
+    <string name="work_apps_paused_content_description" msgid="4473292417145736203">"कामसम्बन्धी प्रोफाइल पज गरिएको छ। कामसम्बन्धी एपहरूले तपाईंलाई सूचना पठाउन, तपाईंको डिभाइसको ब्याट्री प्रयोग गर्न वा तपाईंको लोकेसन हेर्न सक्दैनन्"</string>
     <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"कामसम्बन्धी एपमा ब्याज अङ्कित हुन्छ र तपाईंका IT एड्मिन ती एप हेर्न सक्नुहुन्छ"</string>
     <string name="work_apps_paused_edu_accept" msgid="6377476824357318532">"बुझेँ"</string>
     <string name="work_apps_pause_btn_text" msgid="4669288269140620646">"कामसम्बन्धी एपहरू अस्थायी रूपमा रोक्का गर्नुहोस्"</string>
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index f3c5538..7573102 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -111,7 +111,7 @@
     <string name="title_missing_notification_access" msgid="7503287056163941064">"Toegang tot meldingen vereist"</string>
     <string name="msg_missing_notification_access" msgid="281113995110910548">"Als je meldingsstipjes wilt tonen, zet je app-meldingen aan voor <xliff:g id="NAME">%1$s</xliff:g>"</string>
     <string name="title_change_settings" msgid="1376365968844349552">"Instellingen wijzigen"</string>
-    <string name="notification_dots_service_title" msgid="4284221181793592871">"Meldingsstipjes tonen"</string>
+    <string name="notification_dots_service_title" msgid="4284221181793592871">"Toon meldingsstipjes"</string>
     <string name="auto_add_shortcuts_label" msgid="3698776050751790653">"App-iconen toevoegen aan startscherm"</string>
     <string name="auto_add_shortcuts_description" msgid="7117251166066978730">"Voor nieuwe apps"</string>
     <string name="package_state_unknown" msgid="7592128424511031410">"Onbekend"</string>
@@ -159,8 +159,8 @@
     <string name="work_profile_edu_next" msgid="8783418929296503629">"Volgende"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"OK"</string>
     <string name="work_apps_paused_title" msgid="2389865654362803723">"Werkprofiel is onderbroken"</string>
-    <string name="work_apps_paused_body" msgid="4209084728264328628">"Werk-apps kunnen je geen meldingen sturen, niet je batterij gebruiken en geen toegang krijgen tot je locatie"</string>
-    <string name="work_apps_paused_content_description" msgid="4473292417145736203">"Werkprofiel is gepauzeerd. Werk-apps kunnen je geen meldingen sturen, niet je batterij gebruiken en geen toegang krijgen tot je locatie."</string>
+    <string name="work_apps_paused_body" msgid="4209084728264328628">"Werk-apps kunnen je geen meldingen sturen, je batterij niet gebruiken en geen toegang krijgen tot je locatie"</string>
+    <string name="work_apps_paused_content_description" msgid="4473292417145736203">"Werkprofiel is gepauzeerd. Werk-apps kunnen je geen meldingen sturen, je batterij niet gebruiken en geen toegang krijgen tot je locatie."</string>
     <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"Werk-apps hebben badges en zijn zichtbaar voor je IT-beheerder"</string>
     <string name="work_apps_paused_edu_accept" msgid="6377476824357318532">"OK"</string>
     <string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Werk-apps pauzeren"</string>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index 3517dab..5c1d498 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -51,12 +51,9 @@
     <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"ବ୍ୟକ୍ତିଗତ"</string>
     <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"ୱାର୍କ"</string>
     <string name="widget_category_conversations" msgid="8894438636213590446">"ବାର୍ତ୍ତାଳାପଗୁଡ଼ିକ"</string>
-    <!-- no translation found for widget_education_header (4874760613775913787) -->
-    <skip />
-    <!-- no translation found for widget_education_content (745542879510751525) -->
-    <skip />
-    <!-- no translation found for widget_education_close_button (8676165703104836580) -->
-    <skip />
+    <string name="widget_education_header" msgid="4874760613775913787">"ଉପଯୋଗୀ ସୂଚନା ଆପଣଙ୍କ ପାଖରେ ସହଜରେ ଉପଲବ୍ଧ"</string>
+    <string name="widget_education_content" msgid="745542879510751525">"ଆପଗୁଡ଼ିକୁ ନଖୋଲି ସୂଚନା ପାଇବା ପାଇଁ, ଆପଣ ଆପଣଙ୍କ ମୂଳସ୍କ୍ରିନରେ ୱିଜେଟଗୁଡ଼ିକୁ ଯୋଗ କରିପାରିବେ"</string>
+    <string name="widget_education_close_button" msgid="8676165703104836580">"ବୁଝିଗଲି"</string>
     <string name="all_apps_search_bar_hint" msgid="1390553134053255246">"ଆପ୍‌ ଖୋଜନ୍ତୁ"</string>
     <string name="all_apps_loading_message" msgid="5813968043155271636">"ଆପ୍‌ ଲୋଡ୍‌ ହେଉଛି..."</string>
     <string name="all_apps_no_search_results" msgid="3200346862396363786">"\"<xliff:g id="QUERY">%1$s</xliff:g>\" ସହିତ ମେଳ ହେଉଥିବା କୌଣସି ଆପ୍‌ ମିଳିଲା ନାହିଁ"</string>
diff --git a/res/values-pl/strings.xml b/res/values-pl/strings.xml
index 7b47cde..770f344 100644
--- a/res/values-pl/strings.xml
+++ b/res/values-pl/strings.xml
@@ -172,6 +172,6 @@
     <string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Wstrzymaj aplikacje służbowe"</string>
     <string name="work_apps_enable_btn_text" msgid="82111102541971856">"Włącz"</string>
     <string name="developer_options_filter_hint" msgid="5896817443635989056">"Filtruj"</string>
-    <string name="work_switch_tip" msgid="808075064383839144">"Wstrzymaj aplikacje służbowe i powiadomienia"</string>
+    <string name="work_switch_tip" msgid="808075064383839144">"Wstrzymaj służbowe aplikacje i powiadomienia"</string>
     <string name="remote_action_failed" msgid="1383965239183576790">"Niepowodzenie: <xliff:g id="WHAT">%1$s</xliff:g>"</string>
 </resources>
diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml
index 70606a9..6d2f9e5 100644
--- a/res/values-ru/strings.xml
+++ b/res/values-ru/strings.xml
@@ -161,10 +161,10 @@
     <string name="all_apps_work_tab" msgid="4884822796154055118">"Рабочие"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"Рабочий профиль"</string>
     <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Личные данные скрыты от рабочих приложений и недоступны им."</string>
-    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"Рабочие приложения и данные видны системному администратору."</string>
+    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"Рабочие приложения и их данные видны системному администратору."</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"Далее"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"ОК"</string>
-    <string name="work_apps_paused_title" msgid="2389865654362803723">"Действие рабочего профиля приостановлено."</string>
+    <string name="work_apps_paused_title" msgid="2389865654362803723">"Рабочий профиль приостановлен"</string>
     <string name="work_apps_paused_body" msgid="4209084728264328628">"Рабочие приложения не могут отправлять уведомления, расходовать заряд батареи и получать доступ к данным о вашем местоположении."</string>
     <string name="work_apps_paused_content_description" msgid="4473292417145736203">"Рабочий профиль приостановлен. Рабочие приложения не могут отправлять уведомления, расходовать заряд батареи и получать доступ к данным о вашем местоположении."</string>
     <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"У рабочих приложений есть специальная пометка. Они видны системному администратору."</string>
@@ -172,6 +172,6 @@
     <string name="work_apps_pause_btn_text" msgid="4669288269140620646">"Приостановить рабочие приложения"</string>
     <string name="work_apps_enable_btn_text" msgid="82111102541971856">"Включить"</string>
     <string name="developer_options_filter_hint" msgid="5896817443635989056">"Фильтр"</string>
-    <string name="work_switch_tip" msgid="808075064383839144">"Приостановить рабочие приложения и уведомления"</string>
+    <string name="work_switch_tip" msgid="808075064383839144">"Приостановить рабочие приложения и уведомления от них"</string>
     <string name="remote_action_failed" msgid="1383965239183576790">"Не удалось выполнить действие (<xliff:g id="WHAT">%1$s</xliff:g>)."</string>
 </resources>
diff --git a/res/values-sk/strings.xml b/res/values-sk/strings.xml
index 08e7bb6..cbb082a 100644
--- a/res/values-sk/strings.xml
+++ b/res/values-sk/strings.xml
@@ -165,7 +165,7 @@
     <string name="work_profile_edu_next" msgid="8783418929296503629">"Ďalej"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"Dobre"</string>
     <string name="work_apps_paused_title" msgid="2389865654362803723">"Pracovný profil je pozastavený"</string>
-    <string name="work_apps_paused_body" msgid="4209084728264328628">"Pracovné aplikácie nemôžu posielať upozornenia, používať batériu ani polohu"</string>
+    <string name="work_apps_paused_body" msgid="4209084728264328628">"Pracovné aplikácie vám nemôžu posielať upozornenia, používať vašu batériu ani vašu polohu"</string>
     <string name="work_apps_paused_content_description" msgid="4473292417145736203">"Pracovný profil je pozastavený. Pracovné aplikácie nemôžu posielať upozornenia, používať batériu ani polohu."</string>
     <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"Pracovné aplikácie majú odznak a zobrazujú sa správcovi IT"</string>
     <string name="work_apps_paused_edu_accept" msgid="6377476824357318532">"Dobre"</string>
diff --git a/res/values-sq/strings.xml b/res/values-sq/strings.xml
index 338aa8b..1054092 100644
--- a/res/values-sq/strings.xml
+++ b/res/values-sq/strings.xml
@@ -51,12 +51,9 @@
     <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"Personale"</string>
     <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"Puna"</string>
     <string name="widget_category_conversations" msgid="8894438636213590446">"Bisedat"</string>
-    <!-- no translation found for widget_education_header (4874760613775913787) -->
-    <skip />
-    <!-- no translation found for widget_education_content (745542879510751525) -->
-    <skip />
-    <!-- no translation found for widget_education_close_button (8676165703104836580) -->
-    <skip />
+    <string name="widget_education_header" msgid="4874760613775913787">"Informacione të dobishme në majë të gishtave të tu"</string>
+    <string name="widget_education_content" msgid="745542879510751525">"Për të marrë informacione pa i hapur aplikacionet, mund të shtosh miniaplikacione në ekranin bazë"</string>
+    <string name="widget_education_close_button" msgid="8676165703104836580">"E kuptova"</string>
     <string name="all_apps_search_bar_hint" msgid="1390553134053255246">"Kërko për aplikacione"</string>
     <string name="all_apps_loading_message" msgid="5813968043155271636">"Po ngarkon aplikacionet..."</string>
     <string name="all_apps_no_search_results" msgid="3200346862396363786">"Nuk u gjet asnjë aplikacion që përputhet me \"<xliff:g id="QUERY">%1$s</xliff:g>\""</string>
@@ -157,8 +154,8 @@
     <string name="all_apps_personal_tab" msgid="4190252696685155002">"Personale"</string>
     <string name="all_apps_work_tab" msgid="4884822796154055118">"Punë"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"Profili i punës"</string>
-    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Të dhënat personale janë të ndara dhe të fshehura nga aplikacionet e punës"</string>
-    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"Aplikacionet e punës dhe të dhënat janë të dukshme për administratorin e teknologjisë së informacionit."</string>
+    <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Të dhënat personale janë të veçuara dhe të fshehura nga aplikacionet e punës"</string>
+    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"Aplikacionet e punës dhe të dhënat janë të dukshme për administratorin e teknologjisë së informacionit"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"Para"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"E kuptova"</string>
     <string name="work_apps_paused_title" msgid="2389865654362803723">"Profili i punës është në pauzë"</string>
diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml
index a474661..7a85179 100644
--- a/res/values-te/strings.xml
+++ b/res/values-te/strings.xml
@@ -51,12 +51,9 @@
     <string name="widgets_full_sheet_personal_tab" msgid="2743540105607120182">"వ్యక్తిగతం"</string>
     <string name="widgets_full_sheet_work_tab" msgid="3767150027110633765">"ఆఫీస్"</string>
     <string name="widget_category_conversations" msgid="8894438636213590446">"సంభాషణలు"</string>
-    <!-- no translation found for widget_education_header (4874760613775913787) -->
-    <skip />
-    <!-- no translation found for widget_education_content (745542879510751525) -->
-    <skip />
-    <!-- no translation found for widget_education_close_button (8676165703104836580) -->
-    <skip />
+    <string name="widget_education_header" msgid="4874760613775913787">"మీ చేతివేళ్ల మీద ఉపయోగకరమైన సమాచారం"</string>
+    <string name="widget_education_content" msgid="745542879510751525">"యాప్‌లను తెరవకుండా సమాచారం పొందడానికి, మీరు మీ మొదటి స్క్రీన్‌కు విడ్జెట్‌లను జోడించవచ్చు"</string>
+    <string name="widget_education_close_button" msgid="8676165703104836580">"అర్థమైంది"</string>
     <string name="all_apps_search_bar_hint" msgid="1390553134053255246">"అప్లికేషన్‌లను శోధించండి"</string>
     <string name="all_apps_loading_message" msgid="5813968043155271636">"అప్లికేషన్‌లను లోడ్ చేస్తోంది…"</string>
     <string name="all_apps_no_search_results" msgid="3200346862396363786">"\"<xliff:g id="QUERY">%1$s</xliff:g>\"కి సరిపోలే అప్లికేషన్‌లేవీ కనుగొనబడలేదు"</string>
diff --git a/res/values-uz/strings.xml b/res/values-uz/strings.xml
index 3d5db54..99bdd4b 100644
--- a/res/values-uz/strings.xml
+++ b/res/values-uz/strings.xml
@@ -155,7 +155,7 @@
     <string name="all_apps_work_tab" msgid="4884822796154055118">"Ish"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"Ish profili"</string>
     <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"Shaxsiy maʼlumotlar ishga oid ilovalardan alohida va berkitilgan"</string>
-    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"Ishga oid ilovalar va maʼlumotlarni AT administratoringiz koʻra oladi"</string>
+    <string name="work_profile_edu_work_apps" msgid="237051938268703058">"Administratoringiz ishga oid ilovalar va maʼlumotlarni koʻra oladi"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"Keyingisi"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"OK"</string>
     <string name="work_apps_paused_title" msgid="2389865654362803723">"Ish profili pauzada"</string>
diff --git a/res/values-v31/colors.xml b/res/values-v31/colors.xml
index 7b37001..a9721a4 100644
--- a/res/values-v31/colors.xml
+++ b/res/values-v31/colors.xml
@@ -37,4 +37,6 @@
 
     <color name="wallpaper_popup_scrim">@android:color/system_neutral1_900</color>
 
+    <color name="folder_dot_color">@android:color/system_accent2_50</color>
+
 </resources>
diff --git a/res/values-zh-rHK/strings.xml b/res/values-zh-rHK/strings.xml
index c7d67af..c0bb552 100644
--- a/res/values-zh-rHK/strings.xml
+++ b/res/values-zh-rHK/strings.xml
@@ -32,7 +32,7 @@
     <string name="long_accessible_way_to_add" msgid="2733588281439571974">"㩒兩下之後㩒住,就可以郁小工具或者用自訂操作。"</string>
     <string name="widget_dims_format" msgid="2370757736025621599">"%1$d × %2$d"</string>
     <string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d 闊,%2$d 高"</string>
-    <string name="add_item_request_drag_hint" msgid="5653291305078645405">"按住小工具即可將其移至主畫面上任何位置"</string>
+    <string name="add_item_request_drag_hint" msgid="5653291305078645405">"按住小工具即可隨意在主畫面上移動"</string>
     <string name="add_to_home_screen" msgid="8631549138215492708">"新增至主畫面"</string>
     <plurals name="widgets_count" formatted="false" msgid="656794749266073027">
       <item quantity="other"><xliff:g id="WIDGETS_COUNT_1">%1$d</xliff:g> 個小工具</item>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
index 6941c2c..9685d89 100644
--- a/res/values-zh-rTW/strings.xml
+++ b/res/values-zh-rTW/strings.xml
@@ -152,15 +152,15 @@
     <string name="accessibility_close" msgid="2277148124685870734">"關閉"</string>
     <string name="notification_dismissed" msgid="6002233469409822874">"已關閉通知"</string>
     <string name="all_apps_personal_tab" msgid="4190252696685155002">"個人"</string>
-    <string name="all_apps_work_tab" msgid="4884822796154055118">"公司"</string>
+    <string name="all_apps_work_tab" msgid="4884822796154055118">"工作"</string>
     <string name="work_profile_toggle_label" msgid="3081029915775481146">"工作資料夾"</string>
     <string name="work_profile_edu_personal_apps" msgid="4155536355149317441">"系統會區隔個人資料與工作資料,因此兩者不會同時顯示"</string>
     <string name="work_profile_edu_work_apps" msgid="237051938268703058">"你的 IT 管理員可以查看工作應用程式和工作資料"</string>
     <string name="work_profile_edu_next" msgid="8783418929296503629">"繼續"</string>
     <string name="work_profile_edu_accept" msgid="6069788082535149071">"我知道了"</string>
     <string name="work_apps_paused_title" msgid="2389865654362803723">"工作資料夾已暫停"</string>
-    <string name="work_apps_paused_body" msgid="4209084728264328628">"工作應用程式將無法傳送通知,也無法存取你的位置資訊。你還可以省下這類應用程式消耗的電量"</string>
-    <string name="work_apps_paused_content_description" msgid="4473292417145736203">"工作資料夾已暫停。工作應用程式將無法傳送通知,也無法存取你的位置資訊。你還可以省下這類應用程式消耗的電量"</string>
+    <string name="work_apps_paused_body" msgid="4209084728264328628">"工作應用程式不會消耗電量、無法傳送通知,也無法存取你的位置資訊。"</string>
+    <string name="work_apps_paused_content_description" msgid="4473292417145736203">"系統已暫停使用工作資料夾。在這種情況下,工作應用程式不會消耗電量、無法傳送通知,也無法存取你的位置資訊。"</string>
     <string name="work_apps_paused_edu_banner" msgid="8872412121608402058">"你的 IT 管理員可以看見工作應用程式和相關標記"</string>
     <string name="work_apps_paused_edu_accept" msgid="6377476824357318532">"我知道了"</string>
     <string name="work_apps_pause_btn_text" msgid="4669288269140620646">"暫停工作應用程式"</string>
diff --git a/res/values/attrs.xml b/res/values/attrs.xml
index dc33ab8..92deb68 100644
--- a/res/values/attrs.xml
+++ b/res/values/attrs.xml
@@ -57,8 +57,9 @@
             <enum name="folder" value="2" />
             <enum name="widget_section" value="3" />
             <enum name="shortcut_popup" value="4" />
-            <enum name="hero_app" value="5" />
-            <enum name="taskbar" value="6" />
+            <enum name="taskbar" value="5" />
+            <enum name="search_result_tall" value="6" />
+            <enum name="search_result_small" value="7" />
         </attr>
         <attr name="centerVertically" format="boolean" />
     </declare-styleable>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index c2b07e0..7aab4fa 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -59,6 +59,8 @@
     <color name="folder_hint_text_color_light">#FFF</color>
     <color name="folder_hint_text_color_dark">#FF000000</color>
 
+    <color name="folder_dot_color">?attr/colorPrimary</color>
+
     <color name="text_color_primary_dark">#FFFFFFFF</color>
     <color name="text_color_secondary_dark">#FFFFFFFF</color>
     <color name="text_color_tertiary_dark">#CCFFFFFF</color>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 584ecb7..eccc600 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -97,6 +97,7 @@
     <dimen name="all_apps_header_tab_height">48dp</dimen>
     <dimen name="all_apps_tabs_indicator_height">2dp</dimen>
     <dimen name="all_apps_header_top_padding">36dp</dimen>
+    <dimen name="all_apps_header_bottom_padding">16dp</dimen>
     <dimen name="all_apps_work_profile_tab_footer_top_padding">16dp</dimen>
     <dimen name="all_apps_work_profile_tab_footer_bottom_padding">20dp</dimen>
     <dimen name="all_apps_tabs_vertical_padding">6dp</dimen>
@@ -131,6 +132,7 @@
 
     <dimen name="widget_list_top_bottom_corner_radius">28dp</dimen>
     <dimen name="widget_list_content_corner_radius">4dp</dimen>
+    <dimen name="widget_list_content_joined_corner_radius">0dp</dimen>
 
     <dimen name="widget_list_header_view_vertical_padding">20dp</dimen>
     <dimen name="widget_list_entry_bottom_margin">2dp</dimen>
@@ -314,4 +316,7 @@
     <dimen name="grid_visualization_rounding_radius">22dp</dimen>
     <dimen name="grid_visualization_cell_spacing">6dp</dimen>
 
+<!-- Search results related parameters -->
+    <dimen name="search_row_icon_size">48dp</dimen>
+    <dimen name="search_row_small_icon_size">32dp</dimen>
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 0c389aa..571377c 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -47,7 +47,7 @@
         <item name="workspaceKeyShadowColor">#89000000</item>
         <item name="workspaceStatusBarScrim">@drawable/workspace_bg</item>
         <item name="widgetsTheme">@style/WidgetContainerTheme</item>
-        <item name="folderDotColor">?android:attr/colorPrimary</item>
+        <item name="folderDotColor">@color/folder_dot_color</item>
         <item name="folderFillColor">?android:attr/colorBackgroundFloating</item>
         <item name="folderIconBorderColor">?android:attr/colorPrimary</item>
         <item name="folderTextColor">?android:attr/textColorPrimary</item>
@@ -86,7 +86,7 @@
         <item name="workspaceKeyShadowColor">@android:color/transparent</item>
         <item name="isWorkspaceDarkText">true</item>
         <item name="workspaceStatusBarScrim">@null</item>
-        <item name="folderDotColor">#FF464646</item>
+        <item name="folderDotColor">@color/folder_dot_color</item>
         <item name="folderFillColor">?android:attr/colorBackgroundFloating</item>
         <item name="folderIconBorderColor">#FF80868B</item>
         <item name="folderTextColor">?attr/workspaceTextColor</item>
@@ -108,7 +108,7 @@
         <item name="popupColorSecondary">@color/popup_color_secondary_dark</item>
         <item name="popupColorTertiary">@color/popup_color_tertiary_dark</item>
         <item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item>
-        <item name="folderDotColor">?android:attr/colorPrimary</item>
+        <item name="folderDotColor">@color/folder_dot_color</item>
         <item name="folderFillColor">?android:attr/colorBackgroundFloating</item>
         <item name="folderIconBorderColor">?android:attr/colorPrimary</item>
         <item name="folderTextColor">?android:attr/textColorPrimary</item>
@@ -315,5 +315,6 @@
 
     <style name="AddItemActivityTheme" parent="@android:style/Theme.Translucent.NoTitleBar">
         <item name="widgetsTheme">@style/WidgetContainerTheme</item>
+        <item name="android:windowLightStatusBar">true</item>
     </style>
 </resources>
diff --git a/robolectric_tests/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfoTest.java b/robolectric_tests/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfoTest.java
index d18138f..c7286e5 100644
--- a/robolectric_tests/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfoTest.java
+++ b/robolectric_tests/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfoTest.java
@@ -40,6 +40,8 @@
 public final class LauncherAppWidgetProviderInfoTest {
 
     private static final int CELL_SIZE = 50;
+    private static final int NUM_OF_COLS = 4;
+    private static final int NUM_OF_ROWS = 5;
 
     private Context mContext;
 
@@ -76,6 +78,33 @@
     }
 
     @Test
+    public void
+            initSpans_minWidthLargerThanGridColumns_shouldInitializeSpansToAtMostTheGridColumns() {
+        LauncherAppWidgetProviderInfo info = new LauncherAppWidgetProviderInfo();
+        info.minWidth = CELL_SIZE * (NUM_OF_COLS + 1);
+        info.minHeight = 20;
+        InvariantDeviceProfile idp = createIDP();
+
+        info.initSpans(mContext, idp);
+
+        assertThat(info.spanX).isEqualTo(NUM_OF_COLS);
+        assertThat(info.spanY).isEqualTo(1);
+    }
+
+    @Test
+    public void initSpans_minHeightLargerThanGridRows_shouldInitializeSpansToAtMostTheGridRows() {
+        LauncherAppWidgetProviderInfo info = new LauncherAppWidgetProviderInfo();
+        info.minWidth = 20;
+        info.minHeight = 50 * (NUM_OF_ROWS + 1);
+        InvariantDeviceProfile idp = createIDP();
+
+        info.initSpans(mContext, idp);
+
+        assertThat(info.spanX).isEqualTo(1);
+        assertThat(info.spanY).isEqualTo(NUM_OF_ROWS);
+    }
+
+    @Test
     public void initSpans_minResizeWidthUnspecified_shouldInitializeMinSpansToOne() {
         LauncherAppWidgetProviderInfo info = new LauncherAppWidgetProviderInfo();
         InvariantDeviceProfile idp = createIDP();
@@ -153,6 +182,49 @@
         assertThat(info.minSpanY).isEqualTo(3);
     }
 
+    @Test
+    public void isMinSizeFulfilled_minWidthAndHeightWithinGridSize_shouldReturnTrue() {
+        LauncherAppWidgetProviderInfo info = new LauncherAppWidgetProviderInfo();
+        info.minWidth = 80;
+        info.minHeight = 80;
+        info.minResizeWidth = 50;
+        info.minResizeHeight = 50;
+        InvariantDeviceProfile idp = createIDP();
+
+        info.initSpans(mContext, idp);
+
+        assertThat(info.isMinSizeFulfilled()).isTrue();
+    }
+
+    @Test
+    public void
+            isMinSizeFulfilled_minWidthAndMinResizeWidthExceededGridColumns_shouldReturnFalse() {
+        LauncherAppWidgetProviderInfo info = new LauncherAppWidgetProviderInfo();
+        info.minWidth = CELL_SIZE * (NUM_OF_COLS + 2);
+        info.minHeight = 80;
+        info.minResizeWidth = CELL_SIZE * (NUM_OF_COLS + 1);
+        info.minResizeHeight = 50;
+        InvariantDeviceProfile idp = createIDP();
+
+        info.initSpans(mContext, idp);
+
+        assertThat(info.isMinSizeFulfilled()).isFalse();
+    }
+
+    @Test
+    public void isMinSizeFulfilled_minHeightAndMinResizeHeightExceededGridRows_shouldReturnFalse() {
+        LauncherAppWidgetProviderInfo info = new LauncherAppWidgetProviderInfo();
+        info.minWidth = 80;
+        info.minHeight = CELL_SIZE * (NUM_OF_ROWS + 2);
+        info.minResizeWidth = 50;
+        info.minResizeHeight = CELL_SIZE * (NUM_OF_ROWS + 1);
+        InvariantDeviceProfile idp = createIDP();
+
+        info.initSpans(mContext, idp);
+
+        assertThat(info.isMinSizeFulfilled()).isFalse();
+    }
+
     private InvariantDeviceProfile createIDP() {
         DeviceProfile profile = Mockito.mock(DeviceProfile.class);
         doAnswer(i -> {
@@ -163,6 +235,8 @@
 
         InvariantDeviceProfile idp = new InvariantDeviceProfile();
         idp.supportedProfiles.add(profile);
+        idp.numColumns = NUM_OF_COLS;
+        idp.numRows = NUM_OF_ROWS;
         return idp;
     }
 
diff --git a/src/com/android/launcher3/AppWidgetResizeFrame.java b/src/com/android/launcher3/AppWidgetResizeFrame.java
index 5d9797f..74ac8c2 100644
--- a/src/com/android/launcher3/AppWidgetResizeFrame.java
+++ b/src/com/android/launcher3/AppWidgetResizeFrame.java
@@ -4,7 +4,6 @@
 
 import static com.android.launcher3.LauncherAnimUtils.LAYOUT_HEIGHT;
 import static com.android.launcher3.LauncherAnimUtils.LAYOUT_WIDTH;
-import static com.android.launcher3.Utilities.ATLEAST_S;
 import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_WIDGET_RESIZE_COMPLETED;
 import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_WIDGET_RESIZE_STARTED;
 import static com.android.launcher3.views.BaseDragLayer.LAYOUT_X;
@@ -13,18 +12,12 @@
 import android.animation.AnimatorSet;
 import android.animation.ObjectAnimator;
 import android.animation.PropertyValuesHolder;
-import android.appwidget.AppWidgetHostView;
-import android.appwidget.AppWidgetManager;
 import android.appwidget.AppWidgetProviderInfo;
-import android.content.ComponentName;
 import android.content.Context;
-import android.graphics.Point;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.GradientDrawable;
-import android.os.Bundle;
 import android.util.AttributeSet;
-import android.util.SizeF;
 import android.view.KeyEvent;
 import android.view.MotionEvent;
 import android.view.View;
@@ -39,10 +32,10 @@
 import com.android.launcher3.util.PendingRequestArgs;
 import com.android.launcher3.widget.LauncherAppWidgetHostView;
 import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
+import com.android.launcher3.widget.util.WidgetSizes;
 
 import java.util.ArrayList;
 import java.util.List;
-import java.util.stream.Collectors;
 
 public class AppWidgetResizeFrame extends AbstractFloatingView implements View.OnKeyListener {
     private static final int SNAP_DURATION = 150;
@@ -415,90 +408,12 @@
             mRunningHInc += hSpanDelta;
 
             if (!onDismiss) {
-                updateWidgetSizeRanges(mWidgetView, mLauncher, spanX, spanY);
+                WidgetSizes.updateWidgetSizeRanges(mWidgetView, mLauncher, spanX, spanY);
             }
         }
         mWidgetView.requestLayout();
     }
 
-    public static void updateWidgetSizeRanges(
-            AppWidgetHostView widgetView, Context context, int spanX, int spanY) {
-        List<SizeF> sizes = getWidgetSizes(context, spanX, spanY);
-        if (ATLEAST_S) {
-            widgetView.updateAppWidgetSize(new Bundle(), sizes);
-        } else {
-            Rect bounds = getMinMaxSizes(sizes);
-            widgetView.updateAppWidgetSize(new Bundle(), bounds.left, bounds.top, bounds.right,
-                    bounds.bottom);
-        }
-    }
-
-    /** Returns the list of sizes for a widget of given span, in dp. */
-    public static ArrayList<SizeF> getWidgetSizes(Context context, int spanX, int spanY) {
-        ArrayList<SizeF> sizes = new ArrayList<>(2);
-        final float density = context.getResources().getDisplayMetrics().density;
-        Point cellSize = new Point();
-
-        for (DeviceProfile profile : LauncherAppState.getIDP(context).supportedProfiles) {
-            final float hBorderSpacing = (spanX - 1) * profile.cellLayoutBorderSpacingPx;
-            final float vBorderSpacing = (spanY - 1) * profile.cellLayoutBorderSpacingPx;
-            profile.getCellSize(cellSize);
-            sizes.add(new SizeF(
-                    ((spanX * cellSize.x) + hBorderSpacing) / density,
-                    ((spanY * cellSize.y) + vBorderSpacing) / density));
-        }
-        return sizes;
-    }
-
-    /**
-     * Returns the bundle to be used as the default options for a widget with provided size
-     */
-    public static Bundle getWidgetSizeOptions(
-            Context context, ComponentName provider, int spanX, int spanY) {
-        ArrayList<SizeF> sizes = getWidgetSizes(context, spanX, spanY);
-        Rect padding = getDefaultPaddingForWidget(context, provider, null);
-        float density = context.getResources().getDisplayMetrics().density;
-        float xPaddingDips = (padding.left + padding.right) / density;
-        float yPaddingDips = (padding.top + padding.bottom) / density;
-
-        ArrayList<SizeF> paddedSizes = sizes.stream()
-                .map(size -> new SizeF(
-                        Math.max(0.f, size.getWidth() - xPaddingDips),
-                        Math.max(0.f, size.getHeight() - yPaddingDips)))
-                .collect(Collectors.toCollection(ArrayList::new));
-
-        Rect rect = AppWidgetResizeFrame.getMinMaxSizes(paddedSizes);
-        Bundle options = new Bundle();
-        options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, rect.left);
-        options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT, rect.top);
-        options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH, rect.right);
-        options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT, rect.bottom);
-        options.putParcelableArrayList(AppWidgetManager.OPTION_APPWIDGET_SIZES, paddedSizes);
-        return options;
-    }
-
-    /**
-     * Returns the min and max widths and heights given a list of sizes, in dp.
-     *
-     * @param sizes List of sizes to get the min/max from.
-     * @return A rectangle with the left (resp. top) is used for the min width (resp. height) and
-     * the right (resp. bottom) for the max. The returned rectangle is set with 0s if the list is
-     * empty.
-     */
-    private static Rect getMinMaxSizes(List<SizeF> sizes) {
-        if (sizes.isEmpty()) {
-            return new Rect();
-        } else {
-            SizeF first = sizes.get(0);
-            Rect result = new Rect((int) first.getWidth(), (int) first.getHeight(),
-                    (int) first.getWidth(), (int) first.getHeight());
-            for (int i = 1; i < sizes.size(); i++) {
-                result.union((int) sizes.get(i).getWidth(), (int) sizes.get(i).getHeight());
-            }
-            return result;
-        }
-    }
-
     @Override
     protected void onDetachedFromWindow() {
         super.onDetachedFromWindow();
diff --git a/src/com/android/launcher3/BubbleTextView.java b/src/com/android/launcher3/BubbleTextView.java
index d49dd73..f800cf6 100644
--- a/src/com/android/launcher3/BubbleTextView.java
+++ b/src/com/android/launcher3/BubbleTextView.java
@@ -80,8 +80,9 @@
     private static final int DISPLAY_WORKSPACE = 0;
     private static final int DISPLAY_ALL_APPS = 1;
     private static final int DISPLAY_FOLDER = 2;
-    private static final int DISPLAY_HERO_APP = 5;
-    protected static final int DISPLAY_TASKBAR = 6;
+    protected static final int DISPLAY_TASKBAR = 5;
+    private static final int DISPLAY_SEARCH_RESULT = 6;
+    private static final int DISPLAY_SEARCH_RESULT_SMALL = 7;
 
     private static final int[] STATE_PRESSED = new int[]{android.R.attr.state_pressed};
     private static final float HIGHLIGHT_SCALE = 1.16f;
@@ -187,8 +188,11 @@
             setTextSize(TypedValue.COMPLEX_UNIT_PX, grid.folderChildTextSizePx);
             setCompoundDrawablePadding(grid.folderChildDrawablePaddingPx);
             defaultIconSize = grid.folderChildIconSizePx;
-        } else if (mDisplay == DISPLAY_HERO_APP) {
-            defaultIconSize = grid.allAppsIconSizePx;
+        } else if (mDisplay == DISPLAY_SEARCH_RESULT) {
+            defaultIconSize = getResources().getDimensionPixelSize(R.dimen.search_row_icon_size);
+        } else if (mDisplay == DISPLAY_SEARCH_RESULT_SMALL) {
+            defaultIconSize = getResources().getDimensionPixelSize(
+                    R.dimen.search_row_small_icon_size);
         } else if (mDisplay == DISPLAY_TASKBAR) {
             defaultIconSize = grid.iconSizePx;
         } else {
diff --git a/src/com/android/launcher3/WidgetPreviewLoader.java b/src/com/android/launcher3/WidgetPreviewLoader.java
index c7323d0..ff3584a 100644
--- a/src/com/android/launcher3/WidgetPreviewLoader.java
+++ b/src/com/android/launcher3/WidgetPreviewLoader.java
@@ -27,10 +27,10 @@
 import android.os.CancellationSignal;
 import android.os.Process;
 import android.os.UserHandle;
-import android.util.ArrayMap;
 import android.util.Log;
 import android.util.LongSparseArray;
 import android.util.Pair;
+import android.util.Size;
 
 import androidx.annotation.Nullable;
 
@@ -50,6 +50,7 @@
 import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
 import com.android.launcher3.widget.WidgetCell;
 import com.android.launcher3.widget.WidgetManagerHelper;
+import com.android.launcher3.widget.util.WidgetSizes;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -79,9 +80,6 @@
     private final UserCache mUserCache;
     private final CacheDb mDb;
 
-    private final UserHandle mMyUser = Process.myUserHandle();
-    private final ArrayMap<UserHandle, Bitmap> mUserBadges = new ArrayMap<>();
-
     public WidgetPreviewLoader(Context context, IconCache iconCache) {
         mContext = context;
         mIconCache = iconCache;
@@ -366,9 +364,9 @@
             previewHeight = drawable.getIntrinsicHeight();
         } else {
             DeviceProfile dp = launcher.getDeviceProfile();
-            int tileSize = Math.min(dp.cellWidthPx, dp.cellHeightPx);
-            previewWidth = tileSize * spanX;
-            previewHeight = tileSize * spanY;
+            Size widgetSize = WidgetSizes.getWidgetSizePx(dp, spanX, spanY);
+            previewWidth = widgetSize.getWidth();
+            previewHeight = widgetSize.getHeight();
         }
 
         // Scale to fit width only - let the widget preview be clipped in the
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index 9a8f3dd..fdc69a7 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -117,6 +117,7 @@
 import com.android.launcher3.widget.PendingAppWidgetHostView;
 import com.android.launcher3.widget.WidgetManagerHelper;
 import com.android.launcher3.widget.dragndrop.AppWidgetHostViewDragListener;
+import com.android.launcher3.widget.util.WidgetSizes;
 import com.android.systemui.plugins.shared.LauncherOverlayManager.LauncherOverlay;
 
 import java.util.ArrayList;
@@ -1858,7 +1859,7 @@
                     item.spanX = resultSpan[0];
                     item.spanY = resultSpan[1];
                     AppWidgetHostView awhv = (AppWidgetHostView) cell;
-                    AppWidgetResizeFrame.updateWidgetSizeRanges(awhv, mLauncher, resultSpan[0],
+                    WidgetSizes.updateWidgetSizeRanges(awhv, mLauncher, resultSpan[0],
                             resultSpan[1]);
                 }
 
@@ -2532,8 +2533,7 @@
                     ((PendingAddWidgetInfo) pendingInfo).boundWidget : null;
 
             if (finalView != null && updateWidgetSize) {
-                AppWidgetResizeFrame.updateWidgetSizeRanges(finalView, mLauncher, item.spanX,
-                        item.spanY);
+                WidgetSizes.updateWidgetSizeRanges(finalView, mLauncher, item.spanX, item.spanY);
             }
 
             int animationStyle = ANIMATE_INTO_POSITION_AND_DISAPPEAR;
diff --git a/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java b/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
index 2b36f19..9faac5b 100644
--- a/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
+++ b/src/com/android/launcher3/accessibility/LauncherAccessibilityDelegate.java
@@ -21,7 +21,6 @@
 import android.view.accessibility.AccessibilityNodeInfo;
 import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
 
-import com.android.launcher3.AppWidgetResizeFrame;
 import com.android.launcher3.BubbleTextView;
 import com.android.launcher3.ButtonDropTarget;
 import com.android.launcher3.CellLayout;
@@ -51,6 +50,7 @@
 import com.android.launcher3.views.OptionsPopupView;
 import com.android.launcher3.views.OptionsPopupView.OptionItem;
 import com.android.launcher3.widget.LauncherAppWidgetHostView;
+import com.android.launcher3.widget.util.WidgetSizes;
 
 import java.util.ArrayList;
 import java.util.Collections;
@@ -367,7 +367,7 @@
         }
 
         layout.markCellsAsOccupiedForView(host);
-        AppWidgetResizeFrame.updateWidgetSizeRanges(((LauncherAppWidgetHostView) host), mLauncher,
+        WidgetSizes.updateWidgetSizeRanges(((LauncherAppWidgetHostView) host), mLauncher,
                 info.spanX, info.spanY);
         host.requestLayout();
         mLauncher.getModelWriter().updateItemInDatabase(info);
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
index c6c9c9b..d536c3a 100644
--- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
@@ -21,6 +21,7 @@
 
 import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_VERTICAL_SWIPE_BEGIN;
 import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_VERTICAL_SWIPE_END;
+import static com.android.launcher3.util.UiThreadHelper.hideKeyboardAsync;
 
 import android.content.Context;
 import android.content.res.Resources;
@@ -31,7 +32,6 @@
 import android.util.SparseIntArray;
 import android.view.MotionEvent;
 import android.view.View;
-import android.view.WindowInsets;
 
 import androidx.recyclerview.widget.RecyclerView;
 
@@ -41,6 +41,7 @@
 import com.android.launcher3.LauncherAppState;
 import com.android.launcher3.R;
 import com.android.launcher3.logging.StatsLogManager;
+import com.android.launcher3.views.ActivityContext;
 import com.android.launcher3.views.RecyclerViewFastScroller;
 
 import java.util.ArrayList;
@@ -189,8 +190,8 @@
             case SCROLL_STATE_DRAGGING:
                 mgr.logger().sendToInteractionJankMonitor(
                         LAUNCHER_ALLAPPS_VERTICAL_SWIPE_BEGIN, this);
-                requestFocus();
-                getWindowInsetsController().hide(WindowInsets.Type.ime());
+                hideKeyboardAsync(ActivityContext.lookupContext(getContext()),
+                        getApplicationWindowToken());
                 break;
             case SCROLL_STATE_IDLE:
                 mgr.logger().sendToInteractionJankMonitor(
diff --git a/src/com/android/launcher3/anim/AlphaUpdateListener.java b/src/com/android/launcher3/anim/AlphaUpdateListener.java
index eabd283..8dad1b4 100644
--- a/src/com/android/launcher3/anim/AlphaUpdateListener.java
+++ b/src/com/android/launcher3/anim/AlphaUpdateListener.java
@@ -17,6 +17,7 @@
 package com.android.launcher3.anim;
 
 import android.animation.Animator;
+import android.animation.AnimatorListenerAdapter;
 import android.animation.ValueAnimator;
 import android.animation.ValueAnimator.AnimatorUpdateListener;
 import android.view.View;
@@ -25,7 +26,7 @@
 /**
  * A convenience class to update a view's visibility state after an alpha animation.
  */
-public class AlphaUpdateListener extends AnimationSuccessListener
+public class AlphaUpdateListener extends AnimatorListenerAdapter
         implements AnimatorUpdateListener {
     public static final float ALPHA_CUTOFF_THRESHOLD = 0.01f;
 
@@ -41,7 +42,7 @@
     }
 
     @Override
-    public void onAnimationSuccess(Animator animator) {
+    public void onAnimationEnd(Animator animator) {
         updateVisibility(mView);
     }
 
diff --git a/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java b/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java
index c67efef..68bed44 100644
--- a/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java
+++ b/src/com/android/launcher3/folder/ClippedFolderIconLayoutRule.java
@@ -5,10 +5,10 @@
     public static final int MAX_NUM_ITEMS_IN_PREVIEW = 4;
     private static final int MIN_NUM_ITEMS_IN_PREVIEW = 2;
 
-    private static final float MIN_SCALE = 0.48f;
-    private static final float MAX_SCALE = 0.58f;
-    private static final float MAX_RADIUS_DILATION = 0.15f;
-    private static final float ITEM_RADIUS_SCALE_FACTOR = 1.33f;
+    private static final float MIN_SCALE = 0.44f;
+    private static final float MAX_SCALE = 0.54f;
+    private static final float MAX_RADIUS_DILATION = 0.10f;
+    private static final float ITEM_RADIUS_SCALE_FACTOR = 1.2f;
 
     public static final int EXIT_INDEX = -2;
     public static final int ENTER_INDEX = -3;
@@ -130,10 +130,8 @@
     public float scaleForItem(int numItems) {
         // Scale is determined by the number of items in the preview.
         final float scale;
-        if (numItems <= 2) {
+        if (numItems <= 3) {
             scale = MAX_SCALE;
-        } else if (numItems == 3) {
-            scale = (MAX_SCALE + MIN_SCALE) / 2;
         } else {
             scale = MIN_SCALE;
         }
diff --git a/src/com/android/launcher3/folder/Folder.java b/src/com/android/launcher3/folder/Folder.java
index e387627..17c1329 100644
--- a/src/com/android/launcher3/folder/Folder.java
+++ b/src/com/android/launcher3/folder/Folder.java
@@ -41,6 +41,7 @@
 import android.graphics.Path;
 import android.graphics.Rect;
 import android.graphics.RectF;
+import android.graphics.drawable.Drawable;
 import android.graphics.drawable.GradientDrawable;
 import android.os.Build;
 import android.text.InputType;
@@ -67,6 +68,7 @@
 import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.annotation.RequiresApi;
+import androidx.core.content.res.ResourcesCompat;
 import androidx.core.graphics.ColorUtils;
 
 import com.android.launcher3.AbstractFloatingView;
@@ -250,6 +252,8 @@
     // so that we can cancel it when starting mColorChangeAnimator.
     private ObjectAnimator mOpenAnimationColorChangeAnimator;
 
+    private GradientDrawable mBackground;
+
     /**
      * Used to inflate the Workspace from XML.
      *
@@ -268,6 +272,12 @@
         // name is complete, we have something to focus on, thus hiding the cursor and giving
         // reliable behavior when clicking the text field (since it will always gain focus on click).
         setFocusableInTouchMode(true);
+
+    }
+
+    @Override
+    public Drawable getBackground() {
+        return mBackground;
     }
 
     @Override
@@ -276,6 +286,9 @@
         final DeviceProfile dp = mActivityContext.getDeviceProfile();
         final int paddingLeftRight = dp.folderContentPaddingLeftRight;
 
+        mBackground = (GradientDrawable) ResourcesCompat.getDrawable(getResources(),
+                R.drawable.round_rect_folder, getContext().getTheme());
+
         mContent = findViewById(R.id.folder_content);
         mContent.setPadding(paddingLeftRight, dp.folderContentPaddingTop, paddingLeftRight, 0);
         mContent.setFolder(this);
@@ -1213,6 +1226,8 @@
         lp.x = left;
         lp.y = top;
 
+        mBackground.setBounds(0, 0, width, height);
+
         if (mColorExtractor != null) {
             mColorExtractor.removeLocations();
             mColorExtractor.setListener(mColorListener);
@@ -1714,14 +1729,16 @@
     }
 
     @Override
-    public void draw(Canvas canvas) {
+    protected void dispatchDraw(Canvas canvas) {
         if (mClipPath != null) {
             int count = canvas.save();
             canvas.clipPath(mClipPath);
-            super.draw(canvas);
+            mBackground.draw(canvas);
             canvas.restoreToCount(count);
+            super.dispatchDraw(canvas);
         } else {
-            super.draw(canvas);
+            mBackground.draw(canvas);
+            super.dispatchDraw(canvas);
         }
     }
 
diff --git a/src/com/android/launcher3/folder/FolderAnimationManager.java b/src/com/android/launcher3/folder/FolderAnimationManager.java
index 7fbfb89..bd0dbfd 100644
--- a/src/com/android/launcher3/folder/FolderAnimationManager.java
+++ b/src/com/android/launcher3/folder/FolderAnimationManager.java
@@ -37,6 +37,7 @@
 
 import com.android.launcher3.BubbleTextView;
 import com.android.launcher3.CellLayout;
+import com.android.launcher3.DeviceProfile;
 import com.android.launcher3.R;
 import com.android.launcher3.ShortcutAndWidgetContainer;
 import com.android.launcher3.Utilities;
@@ -80,6 +81,8 @@
 
     private ObjectAnimator mBgColorAnimator;
 
+    private DeviceProfile mDeviceProfile;
+
     public FolderAnimationManager(Folder folder, boolean isOpening) {
         mFolder = folder;
         mContent = folder.mContent;
@@ -89,7 +92,8 @@
         mPreviewBackground = mFolderIcon.mBackground;
 
         mContext = folder.getContext();
-        mPreviewVerifier = new FolderGridOrganizer(folder.mActivityContext.getDeviceProfile().inv);
+        mDeviceProfile = folder.mActivityContext.getDeviceProfile();
+        mPreviewVerifier = new FolderGridOrganizer(mDeviceProfile.inv);
 
         mIsOpening = isOpening;
 
@@ -211,8 +215,21 @@
         play(a, getAnimator(mFolder.mContent, SCALE_PROPERTY, initialScale, finalScale));
         play(a, getAnimator(mFolder.mFooter, SCALE_PROPERTY, initialScale, finalScale));
         play(a, mFolderIcon.mFolderName.createTextAlphaAnimator(!mIsOpening));
+
+        // Create reveal animator for the folder background
         play(a, getShape().createRevealAnimator(
                 mFolder, startRect, endRect, finalRadius, !mIsOpening));
+
+        // Create reveal animator for the folder content (capture the top 4 icons 2x2)
+        int width = mContent.getPaddingLeft() + mDeviceProfile.folderCellLayoutBorderSpacingPx
+                + mDeviceProfile.folderCellWidthPx * 2;
+        int height = mContent.getPaddingTop() + mDeviceProfile.folderCellLayoutBorderSpacingPx
+                + mDeviceProfile.folderCellHeightPx * 2;
+        Rect startRect2 = new Rect(0, 0, width, height);
+        play(a, getShape().createRevealAnimator(
+                mFolder.getContent(), startRect2, endRect, finalRadius, !mIsOpening));
+
+
         // Fade in the folder name, as the text can overlap the icons when grid size is small.
         mFolder.mFolderName.setAlpha(mIsOpening ? 0f : 1f);
         play(a, getAnimator(mFolder.mFolderName, View.ALPHA, 0, 1),
diff --git a/src/com/android/launcher3/folder/FolderIcon.java b/src/com/android/launcher3/folder/FolderIcon.java
index 279c445..6b12d86 100644
--- a/src/com/android/launcher3/folder/FolderIcon.java
+++ b/src/com/android/launcher3/folder/FolderIcon.java
@@ -614,10 +614,7 @@
 
         if (mCurrentPreviewItems.isEmpty() && !mAnimating) return;
 
-        final int saveCount = canvas.save();
-        canvas.clipPath(mBackground.getClipPath());
         mPreviewItemManager.draw(canvas);
-        canvas.restoreToCount(saveCount);
 
         if (!mBackground.drawingDelegated()) {
             mBackground.drawBackgroundStroke(canvas);
diff --git a/src/com/android/launcher3/folder/FolderPagedView.java b/src/com/android/launcher3/folder/FolderPagedView.java
index 7fc3740..3d2884a 100644
--- a/src/com/android/launcher3/folder/FolderPagedView.java
+++ b/src/com/android/launcher3/folder/FolderPagedView.java
@@ -22,6 +22,7 @@
 import android.annotation.SuppressLint;
 import android.content.Context;
 import android.graphics.Canvas;
+import android.graphics.Path;
 import android.graphics.drawable.Drawable;
 import android.util.ArrayMap;
 import android.util.AttributeSet;
@@ -49,6 +50,7 @@
 import com.android.launcher3.util.Thunk;
 import com.android.launcher3.util.ViewCache;
 import com.android.launcher3.views.ActivityContext;
+import com.android.launcher3.views.ClipPathView;
 
 import java.util.ArrayList;
 import java.util.Iterator;
@@ -57,7 +59,7 @@
 import java.util.function.ToIntFunction;
 import java.util.stream.Collectors;
 
-public class FolderPagedView extends PagedView<PageIndicatorDots> {
+public class FolderPagedView extends PagedView<PageIndicatorDots> implements ClipPathView {
 
     private static final String TAG = "FolderPagedView";
 
@@ -89,6 +91,8 @@
 
     private Folder mFolder;
 
+    private Path mClipPath;
+
     // If the views are attached to the folder or not. A folder should be bound when its
     // animating or is open.
     private boolean mViewsBound = false;
@@ -128,8 +132,16 @@
 
     @Override
     protected void dispatchDraw(Canvas canvas) {
-        mFocusIndicatorHelper.draw(canvas);
-        super.dispatchDraw(canvas);
+        if (mClipPath != null) {
+            int count = canvas.save();
+            canvas.clipPath(mClipPath);
+            mFocusIndicatorHelper.draw(canvas);
+            super.dispatchDraw(canvas);
+            canvas.restoreToCount(count);
+        } else {
+            mFocusIndicatorHelper.draw(canvas);
+            super.dispatchDraw(canvas);
+        }
     }
 
     /**
@@ -628,4 +640,10 @@
     public int itemsPerPage() {
         return mOrganizer.getMaxItemsPerPage();
     }
+
+    @Override
+    public void setClipPath(Path clipPath) {
+        mClipPath = clipPath;
+        invalidate();
+    }
 }
diff --git a/src/com/android/launcher3/folder/PreviewBackground.java b/src/com/android/launcher3/folder/PreviewBackground.java
index 4eab63e..204decb 100644
--- a/src/com/android/launcher3/folder/PreviewBackground.java
+++ b/src/com/android/launcher3/folder/PreviewBackground.java
@@ -51,6 +51,7 @@
 public class PreviewBackground extends CellLayout.DelegatedCellDrawing {
 
     private static final boolean DRAW_SHADOW = false;
+    private static final boolean DRAW_STROKE = false;
 
     private static final int CONSUMPTION_ANIMATION_DURATION = 100;
 
@@ -303,6 +304,10 @@
     }
 
     public void animateBackgroundStroke() {
+        if (!DRAW_STROKE) {
+            return;
+        }
+
         if (mStrokeAlphaAnimator != null) {
             mStrokeAlphaAnimator.cancel();
         }
@@ -319,6 +324,9 @@
     }
 
     public void drawBackgroundStroke(Canvas canvas) {
+        if (!DRAW_STROKE) {
+            return;
+        }
         mPaint.setColor(setColorAlphaBound(mStrokeColor, mStrokeAlpha));
         mPaint.setStyle(Paint.Style.STROKE);
         mPaint.setStrokeWidth(mStrokeWidth);
@@ -363,7 +371,7 @@
         }
 
         mDrawingDelegate = null;
-        isClipping = true;
+        isClipping = false;
         invalidate();
     }
 
diff --git a/src/com/android/launcher3/graphics/IconShape.java b/src/com/android/launcher3/graphics/IconShape.java
index 2da679c..f82b07e 100644
--- a/src/com/android/launcher3/graphics/IconShape.java
+++ b/src/com/android/launcher3/graphics/IconShape.java
@@ -156,19 +156,43 @@
         }
     }
 
-    public static final class Circle extends SimpleRectShape {
+    public static final class Circle extends PathShape {
 
-        @Override
-        public void drawShape(Canvas canvas, float offsetX, float offsetY, float radius, Paint p) {
-            canvas.drawCircle(radius + offsetX, radius + offsetY, radius, p);
+        private final float[] mTempRadii = new float[8];
+
+        protected AnimatorUpdateListener newUpdateListener(Rect startRect, Rect endRect,
+                float endRadius, Path outPath) {
+            float r1 = getStartRadius(startRect);
+
+            float[] startValues = new float[] {
+                    startRect.left, startRect.top, startRect.right, startRect.bottom, r1, r1};
+            float[] endValues = new float[] {
+                    endRect.left, endRect.top, endRect.right, endRect.bottom, endRadius, endRadius};
+
+            FloatArrayEvaluator evaluator = new FloatArrayEvaluator(new float[6]);
+
+            return (anim) -> {
+                float progress = (Float) anim.getAnimatedValue();
+                float[] values = evaluator.evaluate(progress, startValues, endValues);
+                outPath.addRoundRect(
+                        values[0], values[1], values[2], values[3],
+                        getRadiiArray(values[4], values[5]), Path.Direction.CW);
+            };
         }
 
+        private float[] getRadiiArray(float r1, float r2) {
+            mTempRadii[0] = mTempRadii [1] = mTempRadii[2] = mTempRadii[3] =
+                    mTempRadii[6] = mTempRadii[7] = r1;
+            mTempRadii[4] = mTempRadii[5] = r2;
+            return mTempRadii;
+        }
+
+
         @Override
         public void addToPath(Path path, float offsetX, float offsetY, float radius) {
             path.addCircle(radius + offsetX, radius + offsetY, radius, Path.Direction.CW);
         }
 
-        @Override
         protected float getStartRadius(Rect startRect) {
             return startRect.width() / 2f;
         }
diff --git a/src/com/android/launcher3/model/data/LauncherAppWidgetInfo.java b/src/com/android/launcher3/model/data/LauncherAppWidgetInfo.java
index 003b3bd..658c6e1 100644
--- a/src/com/android/launcher3/model/data/LauncherAppWidgetInfo.java
+++ b/src/com/android/launcher3/model/data/LauncherAppWidgetInfo.java
@@ -26,13 +26,13 @@
 
 import androidx.annotation.Nullable;
 
-import com.android.launcher3.AppWidgetResizeFrame;
 import com.android.launcher3.Launcher;
 import com.android.launcher3.LauncherSettings;
 import com.android.launcher3.logger.LauncherAtom;
 import com.android.launcher3.util.ContentWriter;
 import com.android.launcher3.widget.LauncherAppWidgetHostView;
 import com.android.launcher3.widget.LauncherAppWidgetProviderInfo;
+import com.android.launcher3.widget.util.WidgetSizes;
 
 /**
  * Represents a widget (either instantiated or about to be) in the Launcher.
@@ -196,7 +196,7 @@
      */
     public void onBindAppWidget(Launcher launcher, AppWidgetHostView hostView) {
         if (!mHasNotifiedInitialWidgetSizeChanged) {
-            AppWidgetResizeFrame.updateWidgetSizeRanges(hostView, launcher, spanX, spanY);
+            WidgetSizes.updateWidgetSizeRanges(hostView, launcher, spanX, spanY);
             mHasNotifiedInitialWidgetSizeChanged = true;
         }
     }
diff --git a/src/com/android/launcher3/qsb/QsbContainerView.java b/src/com/android/launcher3/qsb/QsbContainerView.java
index 22c3f58..23ee251 100644
--- a/src/com/android/launcher3/qsb/QsbContainerView.java
+++ b/src/com/android/launcher3/qsb/QsbContainerView.java
@@ -20,8 +20,6 @@
 import static android.appwidget.AppWidgetManager.EXTRA_APPWIDGET_ID;
 import static android.appwidget.AppWidgetManager.EXTRA_APPWIDGET_PROVIDER;
 
-import static com.android.launcher3.AppWidgetResizeFrame.getWidgetSizeOptions;
-
 import android.app.Activity;
 import android.app.Fragment;
 import android.app.SearchManager;
@@ -49,6 +47,7 @@
 import com.android.launcher3.Utilities;
 import com.android.launcher3.config.FeatureFlags;
 import com.android.launcher3.graphics.FragmentWithPreview;
+import com.android.launcher3.widget.util.WidgetSizes;
 
 /**
  * A frame layout which contains a QSB. This internally uses fragment to bind the view, which
@@ -292,7 +291,8 @@
 
         protected Bundle createBindOptions() {
             InvariantDeviceProfile idp = LauncherAppState.getIDP(getContext());
-            return getWidgetSizeOptions(getContext(), mWidgetInfo.provider, idp.numColumns, 1);
+            return WidgetSizes.getWidgetSizeOptions(getContext(), mWidgetInfo.provider,
+                    idp.numColumns, 1);
         }
 
         protected View getDefaultView(ViewGroup container, boolean showSetupIcon) {
diff --git a/src/com/android/launcher3/util/UiThreadHelper.java b/src/com/android/launcher3/util/UiThreadHelper.java
index 947f96f..b9387a8 100644
--- a/src/com/android/launcher3/util/UiThreadHelper.java
+++ b/src/com/android/launcher3/util/UiThreadHelper.java
@@ -15,6 +15,7 @@
  */
 package com.android.launcher3.util;
 
+import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_ALLAPPS_KEYBOARD_CLOSED;
 import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
 
 import android.annotation.SuppressLint;
@@ -27,6 +28,7 @@
 import android.view.WindowInsets;
 import android.view.inputmethod.InputMethodManager;
 
+import com.android.launcher3.Launcher;
 import com.android.launcher3.Utilities;
 import com.android.launcher3.views.ActivityContext;
 
@@ -57,6 +59,8 @@
 
         Message.obtain(HANDLER.get(root.getContext()),
                 MSG_HIDE_KEYBOARD, token).sendToTarget();
+        Launcher.cast(activityContext).getStatsLogManager().logger().log(
+                LAUNCHER_ALLAPPS_KEYBOARD_CLOSED);
     }
 
     public static void setOrientationAsync(Activity activity, int orientation) {
diff --git a/src/com/android/launcher3/views/WidgetsEduView.java b/src/com/android/launcher3/views/WidgetsEduView.java
index c6fa98a..c2947c7 100644
--- a/src/com/android/launcher3/views/WidgetsEduView.java
+++ b/src/com/android/launcher3/views/WidgetsEduView.java
@@ -22,8 +22,8 @@
 import android.graphics.Rect;
 import android.util.AttributeSet;
 import android.view.LayoutInflater;
-import android.view.View;
 
+import com.android.launcher3.DeviceProfile;
 import com.android.launcher3.Insettable;
 import com.android.launcher3.Launcher;
 import com.android.launcher3.R;
@@ -36,8 +36,6 @@
     private static final int DEFAULT_CLOSE_DURATION = 200;
 
     private Rect mInsets = new Rect();
-    private View mEduView;
-
 
     public WidgetsEduView(Context context, AttributeSet attr) {
         this(context, attr, 0);
@@ -46,7 +44,6 @@
     public WidgetsEduView(Context context, AttributeSet attrs,
             int defStyleAttr) {
         super(context, attrs, defStyleAttr);
-        mContent = this;
     }
 
     @Override
@@ -62,20 +59,16 @@
     @Override
     protected void onFinishInflate() {
         super.onFinishInflate();
-        mEduView = findViewById(R.id.edu_view);
+        mContent = findViewById(R.id.edu_view);
         findViewById(R.id.edu_close_button)
                 .setOnClickListener(v -> close(/* animate= */ true));
     }
 
     @Override
     public void setInsets(Rect insets) {
-        int leftInset = insets.left - mInsets.left;
-        int rightInset = insets.right - mInsets.right;
-        int bottomInset = insets.bottom - mInsets.bottom;
         mInsets.set(insets);
-        setPadding(leftInset, getPaddingTop(), rightInset, 0);
-        mEduView.setPaddingRelative(mEduView.getPaddingStart(),
-                mEduView.getPaddingTop(), mEduView.getPaddingEnd(), bottomInset);
+        mContent.setPadding(mContent.getPaddingStart(),
+                mContent.getPaddingTop(), mContent.getPaddingEnd(), insets.bottom);
     }
 
     private void show() {
@@ -90,10 +83,41 @@
 
     @Override
     protected void onLayout(boolean changed, int l, int t, int r, int b) {
-        super.onLayout(changed, l, t, r, b);
+        int width = r - l;
+        int height = b - t;
+
+        // Lay out the content as center bottom aligned.
+        int contentWidth = mContent.getMeasuredWidth();
+        int contentLeft = (width - contentWidth - mInsets.left - mInsets.right) / 2 + mInsets.left;
+        mContent.layout(contentLeft, height - mContent.getMeasuredHeight(),
+                contentLeft + contentWidth, height);
+
         setTranslationShift(mTranslationShift);
     }
 
+    @Override
+    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
+        DeviceProfile deviceProfile = mActivityContext.getDeviceProfile();
+        int widthUsed;
+        if (mInsets.bottom > 0) {
+            // Extra space between this view and mContent horizontally when the sheet is shown in
+            // portrait mode.
+            widthUsed = mInsets.left + mInsets.right;
+        } else {
+            // Extra space between this view and mContent horizontally when the sheet is shown in
+            // landscape mode.
+            Rect padding = deviceProfile.workspacePadding;
+            widthUsed = Math.max(padding.left + padding.right,
+                    2 * (mInsets.left + mInsets.right));
+        }
+
+        int heightUsed = mInsets.top + deviceProfile.edgeMarginPx;
+        measureChildWithMargins(mContent, widthMeasureSpec,
+                widthUsed, heightMeasureSpec, heightUsed);
+        setMeasuredDimension(MeasureSpec.getSize(widthMeasureSpec),
+                MeasureSpec.getSize(heightMeasureSpec));
+    }
+
     private void animateOpen() {
         if (mIsOpen || mOpenCloseAnimator.isRunning()) {
             return;
diff --git a/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java b/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java
index 8685aae..50ab422 100644
--- a/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java
+++ b/src/com/android/launcher3/widget/LauncherAppWidgetHostView.java
@@ -41,6 +41,7 @@
 import android.widget.Advanceable;
 import android.widget.RemoteViews;
 
+import androidx.annotation.NonNull;
 import androidx.annotation.Nullable;
 import androidx.annotation.UiThread;
 
@@ -262,6 +263,10 @@
 
         mIsAttachedToWindow = true;
         checkIfAutoAdvance();
+
+        if (mLastLocationRegistered != null) {
+            mColorExtractor.addLocation(List.of(mLastLocationRegistered));
+        }
     }
 
     @Override
@@ -366,7 +371,7 @@
         if (mTempRectF.isEmpty()) {
             return;
         }
-        if (!mTempRectF.equals(mLastLocationRegistered)) {
+        if (!isSameLocation(mTempRectF, mLastLocationRegistered, /* epsilon= */ 1e-6f)) {
             if (mLastLocationRegistered != null) {
                 mColorExtractor.removeLocations();
             }
@@ -375,6 +380,20 @@
         }
     }
 
+    // Compare two location rectangles. Locations are always in the [0;1] range.
+    private static boolean isSameLocation(@NonNull RectF rect1, @Nullable RectF rect2,
+            float epsilon) {
+        if (rect2 == null) return false;
+        return isSameCoordinate(rect1.left, rect2.left, epsilon)
+                && isSameCoordinate(rect1.right, rect2.right, epsilon)
+                && isSameCoordinate(rect1.top, rect2.top, epsilon)
+                && isSameCoordinate(rect1.bottom, rect2.bottom, epsilon);
+    }
+
+    private static boolean isSameCoordinate(float c1, float c2, float epsilon) {
+        return Math.abs(c1 - c2) < epsilon;
+    }
+
     @Override
     public void onColorsChanged(RectF rectF, SparseIntArray colors) {
         // setColorResources will reapply the view, which must happen in the UI thread.
@@ -391,14 +410,6 @@
     protected void onWindowVisibilityChanged(int visibility) {
         super.onWindowVisibilityChanged(visibility);
         maybeRegisterAutoAdvance();
-
-        if (visibility == View.VISIBLE) {
-            if (mLastLocationRegistered != null) {
-                mColorExtractor.addLocation(List.of(mLastLocationRegistered));
-            }
-        } else {
-            mColorExtractor.removeLocations();
-        }
     }
 
     private void checkIfAutoAdvance() {
@@ -481,6 +492,10 @@
             return;
         }
         LauncherAppWidgetInfo info = (LauncherAppWidgetInfo) getTag();
+        if (info == null) {
+            // This occurs when LauncherAppWidgetHostView is used to render a preview layout.
+            return;
+        }
         // Remove and rebind the current widget (which was inflated in the wrong
         // orientation), but don't delete it from the database
         mLauncher.removeItem(this, info, false  /* deleteFromDb */);
diff --git a/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java b/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java
index 14108f6..5a29171 100644
--- a/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java
+++ b/src/com/android/launcher3/widget/LauncherAppWidgetProviderInfo.java
@@ -32,13 +32,44 @@
 
     public static final String CLS_CUSTOM_WIDGET_PREFIX = "#custom-widget-";
 
+    /**
+     * The desired number of cells that this widget occupies horizontally in
+     * {@link com.android.launcher3.CellLayout}.
+     */
     public int spanX;
+
+    /**
+     * The desired number of cells that this widget occupies vertically in
+     * {@link com.android.launcher3.CellLayout}.
+     */
     public int spanY;
+
+    /**
+     * The minimum number of cells that this widget can occupy horizontally in
+     * {@link com.android.launcher3.CellLayout}.
+     */
     public int minSpanX;
+
+    /**
+     * The minimum number of cells that this widget can occupy vertically in
+     * {@link com.android.launcher3.CellLayout}.
+     */
     public int minSpanY;
+
+    /**
+     * The maximum number of cells that this widget can occupy horizontally in
+     * {@link com.android.launcher3.CellLayout}.
+     */
     public int maxSpanX;
+
+    /**
+     * The maximum number of cells that this widget can occupy vertically in
+     * {@link com.android.launcher3.CellLayout}.
+     */
     public int maxSpanY;
 
+    private boolean mIsMinSizeFulfilled;
+
     public static LauncherAppWidgetProviderInfo fromProviderInfo(Context context,
             AppWidgetProviderInfo info) {
         final LauncherAppWidgetProviderInfo launcherInfo;
@@ -133,8 +164,20 @@
         this.minSpanY = minSpanY;
         this.maxSpanX = maxSpanX;
         this.maxSpanY = maxSpanY;
-        this.spanX = spanX;
-        this.spanY = spanY;
+        this.mIsMinSizeFulfilled = Math.min(spanX, minSpanX) <= idp.numColumns
+            && Math.min(spanY, minSpanY) <= idp.numRows;
+        // Ensures the default span X and span Y will not exceed the current grid size.
+        this.spanX = Math.min(spanX, idp.numColumns);
+        this.spanY = Math.min(spanY, idp.numRows);
+    }
+
+    /**
+     * Returns {@code true} if the widget's minimum size requirement can be fulfilled in the device
+     * grid setting, {@link InvariantDeviceProfile}, that was passed in
+     * {@link #initSpans(Context, InvariantDeviceProfile)}.
+     */
+    public boolean isMinSizeFulfilled() {
+        return mIsMinSizeFulfilled;
     }
 
     private int getSpanX(Rect widgetPadding, int widgetWidth, int cellSpacing, float cellWidth) {
diff --git a/src/com/android/launcher3/widget/PendingAddWidgetInfo.java b/src/com/android/launcher3/widget/PendingAddWidgetInfo.java
index 3377abb..c04c8dc 100644
--- a/src/com/android/launcher3/widget/PendingAddWidgetInfo.java
+++ b/src/com/android/launcher3/widget/PendingAddWidgetInfo.java
@@ -15,7 +15,6 @@
  */
 package com.android.launcher3.widget;
 
-import static com.android.launcher3.AppWidgetResizeFrame.getWidgetSizeOptions;
 import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_WIDGETS_TRAY;
 
 import android.appwidget.AppWidgetHostView;
@@ -24,6 +23,7 @@
 
 import com.android.launcher3.LauncherSettings;
 import com.android.launcher3.PendingAddItemInfo;
+import com.android.launcher3.widget.util.WidgetSizes;
 
 /**
  * Meta data used for late binding of {@link LauncherAppWidgetProviderInfo}.
@@ -61,6 +61,6 @@
     }
 
     public Bundle getDefaultSizeOptions(Context context) {
-        return getWidgetSizeOptions(context, componentName, spanX, spanY);
+        return WidgetSizes.getWidgetSizeOptions(context, componentName, spanX, spanY);
     }
 }
diff --git a/src/com/android/launcher3/widget/WidgetCell.java b/src/com/android/launcher3/widget/WidgetCell.java
index e1999c9..b1ccfd9 100644
--- a/src/com/android/launcher3/widget/WidgetCell.java
+++ b/src/com/android/launcher3/widget/WidgetCell.java
@@ -21,12 +21,12 @@
 import android.content.Context;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
-import android.graphics.Point;
 import android.graphics.Rect;
 import android.graphics.drawable.Drawable;
 import android.os.CancellationSignal;
 import android.util.AttributeSet;
 import android.util.Log;
+import android.util.Size;
 import android.view.Gravity;
 import android.view.MotionEvent;
 import android.view.View;
@@ -48,6 +48,7 @@
 import com.android.launcher3.icons.FastBitmapDrawable;
 import com.android.launcher3.icons.RoundDrawableWrapper;
 import com.android.launcher3.model.WidgetItem;
+import com.android.launcher3.widget.util.WidgetSizes;
 
 /**
  * Represents the individual cell of the widget inside the widget tray. The preview is drawn
@@ -96,7 +97,7 @@
     protected final BaseActivity mActivity;
     private final CheckLongPressHelper mLongPressHelper;
     private final float mEnforcedCornerRadius;
-    private final int mPreviewPadding;
+    private final int mShortcutPreviewPadding;
 
     private RemoteViews mRemoteViewsPreview;
     private NavigableAppWidgetHostView mAppWidgetHostViewPreview;
@@ -114,14 +115,14 @@
 
         mActivity = BaseActivity.fromContext(context);
         mLongPressHelper = new CheckLongPressHelper(this);
-
         mLongPressHelper.setLongPressTimeoutFactor(1);
+
         setContainerWidth();
         setWillNotDraw(false);
         setClipToPadding(false);
         setAccessibilityDelegate(mActivity.getAccessibilityDelegate());
         mEnforcedCornerRadius = RoundedCornerEnforcement.computeEnforcedRadius(context);
-        mPreviewPadding =
+        mShortcutPreviewPadding =
                 2 * getResources().getDimensionPixelSize(R.dimen.widget_preview_shortcut_padding);
     }
 
@@ -200,6 +201,8 @@
         mWidgetPreviewLoader = loader;
         if (item.activityInfo != null) {
             setTag(new PendingAddShortcutInfo(item.activityInfo));
+            mPreviewWidth += mShortcutPreviewPadding;
+            mPreviewHeight += mShortcutPreviewPadding;
         } else {
             setTag(new PendingAddWidgetInfo(item.widgetInfo));
         }
@@ -251,8 +254,6 @@
         }
         appWidgetHostViewPreview.setPadding(padding.left, padding.top, padding.right,
                 padding.bottom);
-        mPreviewWidth += padding.left + padding.right;
-        mPreviewHeight += padding.top + padding.bottom;
         appWidgetHostViewPreview.updateAppWidget(remoteViews);
     }
 
@@ -299,7 +300,7 @@
             float scale = 1f;
             if (getWidth() > 0 && getHeight() > 0) {
                 // Scale down the preview size if it's wider than the cell.
-                float maxWidth = getWidth() - mPreviewPadding;
+                float maxWidth = getWidth();
                 float previewWidth = drawable.getIntrinsicWidth() * mPreviewScale;
                 scale = Math.min(maxWidth / previewWidth, 1);
             }
@@ -355,11 +356,9 @@
     /** Sets the widget preview image size, in number of cells, and preview scale. */
     public void setPreviewSize(int spanX, int spanY, float previewScale) {
         DeviceProfile deviceProfile = mActivity.getDeviceProfile();
-        Point cellSize = deviceProfile.getCellSize();
-        mPreviewWidth = cellSize.x * spanX + mPreviewPadding
-                + deviceProfile.cellLayoutBorderSpacingPx * (spanX - 1);
-        mPreviewHeight = cellSize.y * spanY + mPreviewPadding
-                + deviceProfile.cellLayoutBorderSpacingPx * (spanY - 1);
+        Size widgetSize = WidgetSizes.getWidgetSizePx(deviceProfile, spanX, spanY);
+        mPreviewWidth = widgetSize.getWidth();
+        mPreviewHeight = widgetSize.getHeight();
         mPreviewScale = previewScale;
     }
 
diff --git a/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java b/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java
index 826c244..150bd99 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsListAdapter.java
@@ -202,11 +202,16 @@
         mDiffReporter.process(mVisibleEntries, newVisibleEntries, mRowComparator);
     }
 
+    /** Returns whether {@code entry} matches {@link #mWidgetsContentVisiblePackageUserKey}. */
     private boolean isHeaderForVisibleContent(WidgetsListBaseEntry entry) {
+        return isHeaderForPackageUserKey(entry, mWidgetsContentVisiblePackageUserKey);
+    }
+
+    /** Returns whether {@code entry} matches {@code key}. */
+    private boolean isHeaderForPackageUserKey(WidgetsListBaseEntry entry, PackageUserKey key) {
         return (entry instanceof WidgetsListHeaderEntry
                 || entry instanceof WidgetsListSearchHeaderEntry)
-                && new PackageUserKey(entry.mPkgItem.packageName, entry.mPkgItem.user)
-                .equals(mWidgetsContentVisiblePackageUserKey);
+                && new PackageUserKey(entry.mPkgItem.packageName, entry.mPkgItem.user).equals(key);
     }
 
     /**
@@ -270,36 +275,68 @@
 
     @Override
     public void onHeaderClicked(boolean showWidgets, PackageUserKey packageUserKey) {
+        // Ignore invalid clicks, such as collapsing a package that isn't currently expanded.
+        if (!showWidgets && !packageUserKey.equals(mWidgetsContentVisiblePackageUserKey)) return;
+
         if (showWidgets) {
             mWidgetsContentVisiblePackageUserKey = packageUserKey;
-            updateVisibleEntries();
-            // Scroll the layout manager to the header position to keep it anchored to the same
-            // position.
-            scrollToPositionAndMaintainOffset(getSelectedHeaderPosition());
             mLauncher.getStatsLogManager().logger().log(LAUNCHER_WIDGETSTRAY_APP_EXPANDED);
-        } else if (packageUserKey.equals(mWidgetsContentVisiblePackageUserKey)) {
-            OptionalInt previouslySelectedPosition = getSelectedHeaderPosition();
-
+        } else {
             mWidgetsContentVisiblePackageUserKey = null;
-            updateVisibleEntries();
-
-            // Scroll to the header that was just collapsed so it maintains its scroll offset.
-            scrollToPositionAndMaintainOffset(previouslySelectedPosition);
         }
+
+        // Get the current top of the header with the matching key before adjusting the visible
+        // entries.
+        OptionalInt topForPackageUserKey =
+                getOffsetForPosition(getPositionForPackageUserKey(packageUserKey));
+
+        updateVisibleEntries();
+
+        // Get the position for the clicked header after adjusting the visible entries. The
+        // position may have changed if another header had previously been expanded.
+        OptionalInt positionForPackageUserKey = getPositionForPackageUserKey(packageUserKey);
+        scrollToPositionAndMaintainOffset(positionForPackageUserKey, topForPackageUserKey);
     }
 
-    private OptionalInt getSelectedHeaderPosition() {
+    /**
+     * Returns the position of {@code key} in {@link #mVisibleEntries}, or  empty if it's not
+     * present.
+     */
+    private OptionalInt getPositionForPackageUserKey(PackageUserKey key) {
         return IntStream.range(0, mVisibleEntries.size())
-                .filter(index -> isHeaderForVisibleContent(mVisibleEntries.get(index)))
+                .filter(index -> isHeaderForPackageUserKey(mVisibleEntries.get(index), key))
                 .findFirst();
     }
 
     /**
-     * Scrolls to the selected header position. LinearLayoutManager scrolls the minimum distance
-     * necessary, so this will keep the selected header in place during clicks, without interrupting
-     * the animation.
+     * Returns the top of {@code positionOptional} in the recycler view, or empty if its view
+     * can't be found for any reason, including the position not being currently visible. The
+     * returned value does not include the top padding of the recycler view.
      */
-    private void scrollToPositionAndMaintainOffset(OptionalInt positionOptional) {
+    private OptionalInt getOffsetForPosition(OptionalInt positionOptional) {
+        if (!positionOptional.isPresent() || mRecyclerView == null) return OptionalInt.empty();
+
+        RecyclerView.LayoutManager layoutManager = mRecyclerView.getLayoutManager();
+        if (layoutManager == null) return OptionalInt.empty();
+
+        View view = layoutManager.findViewByPosition(positionOptional.getAsInt());
+        if (view == null) return OptionalInt.empty();
+
+        return OptionalInt.of(layoutManager.getDecoratedTop(view));
+    }
+
+    /**
+     * Scrolls to the selected header position with the provided offset. LinearLayoutManager
+     * scrolls the minimum distance necessary, so this will keep the selected header in place during
+     * clicks, without interrupting the animation.
+     *
+     * @param positionOptional The position too scroll to. No scrolling will be done if empty.
+     * @param offsetOptional The offset from the top to maintain. If empty, then the list will
+     *                       scroll to the top of the position.
+     */
+    private void scrollToPositionAndMaintainOffset(
+            OptionalInt positionOptional,
+            OptionalInt offsetOptional) {
         if (!positionOptional.isPresent() || mRecyclerView == null) return;
         int position = positionOptional.getAsInt();
 
@@ -317,12 +354,9 @@
 
         // Scroll to the header view's current offset, accounting for the recycler view's padding.
         // If the header view couldn't be found, then it will appear at the top of the list.
-        View headerView = layoutManager.findViewByPosition(position);
-        int targetHeaderViewTop =
-                headerView == null ? 0 : layoutManager.getDecoratedTop(headerView);
         layoutManager.scrollToPositionWithOffset(
                 position,
-                targetHeaderViewTop - mRecyclerView.getPaddingTop());
+                offsetOptional.orElse(0) - mRecyclerView.getPaddingTop());
     }
 
     /**
diff --git a/src/com/android/launcher3/widget/picker/WidgetsListDrawables.java b/src/com/android/launcher3/widget/picker/WidgetsListDrawables.java
new file mode 100644
index 0000000..b3bb544
--- /dev/null
+++ b/src/com/android/launcher3/widget/picker/WidgetsListDrawables.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.launcher3.widget.picker;
+
+import android.content.Context;
+import android.content.res.ColorStateList;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.GradientDrawable;
+import android.graphics.drawable.RippleDrawable;
+
+import com.android.launcher3.R;
+import com.android.launcher3.util.Themes;
+
+/** Helper class for creating drawables to use as background for list elements. */
+final class WidgetsListDrawables {
+
+    private WidgetsListDrawables() {}
+
+    /** Creates a list background drawable with the specified radii. */
+    static Drawable createListBackgroundDrawable(
+            Context context,
+            float topRadius,
+            float bottomRadius) {
+        GradientDrawable backgroundMask = new GradientDrawable();
+        backgroundMask.setColor(context.getColorStateList(R.color.surface));
+        backgroundMask.setShape(GradientDrawable.RECTANGLE);
+
+        backgroundMask.setCornerRadii(
+                new float[]{
+                        topRadius,
+                        topRadius,
+                        topRadius,
+                        topRadius,
+                        bottomRadius,
+                        bottomRadius,
+                        bottomRadius,
+                        bottomRadius
+                });
+
+        return new RippleDrawable(
+                /* color= */ ColorStateList.valueOf(
+                        Themes.getAttrColor(context, android.R.attr.colorControlHighlight)),
+                /* content= */ backgroundMask,
+                /* mask= */ backgroundMask);
+    }
+
+}
diff --git a/src/com/android/launcher3/widget/picker/WidgetsListHeader.java b/src/com/android/launcher3/widget/picker/WidgetsListHeader.java
index 41aa437..fece359 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsListHeader.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsListHeader.java
@@ -60,6 +60,9 @@
     @Nullable private Drawable mIconDrawable;
     private final int mIconSize;
     private final int mBottomMarginSize;
+    private final float mTopBottomCornerRadius;
+    private final float mMiddleCornerRadius;
+    private final float mJoinedCornerRadius;
 
     private ImageView mAppIcon;
     private TextView mTitle;
@@ -87,6 +90,12 @@
                 grid.iconSizePx);
         mBottomMarginSize =
                 getResources().getDimensionPixelSize(R.dimen.widget_list_entry_bottom_margin);
+        mTopBottomCornerRadius =
+                getResources().getDimension(R.dimen.widget_list_top_bottom_corner_radius);
+        mMiddleCornerRadius =
+                getResources().getDimension(R.dimen.widget_list_content_corner_radius);
+        mJoinedCornerRadius =
+                getResources().getDimension(R.dimen.widget_list_content_joined_corner_radius);
     }
 
     @Override
@@ -254,6 +263,20 @@
         verifyHighRes();
     }
 
+    /** Updates the list to have a background drawable with the appropriate corner radii. */
+    @UiThread
+    public void updateListBackground(boolean isFirst, boolean isLast, boolean isExpanded) {
+        float topRadius = isFirst ? mTopBottomCornerRadius : mMiddleCornerRadius;
+        float bottomRadius = isLast
+                ? mTopBottomCornerRadius
+                : isExpanded
+                        ? mJoinedCornerRadius
+                        : mMiddleCornerRadius;
+        setBackground(
+                WidgetsListDrawables.createListBackgroundDrawable(
+                        getContext(), topRadius, bottomRadius));
+    }
+
     private void setTitles(WidgetsListSearchHeaderEntry entry) {
         mTitle.setText(entry.mPkgItem.title);
 
diff --git a/src/com/android/launcher3/widget/picker/WidgetsListHeaderViewHolderBinder.java b/src/com/android/launcher3/widget/picker/WidgetsListHeaderViewHolderBinder.java
index e57f4d8..22d6d22 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsListHeaderViewHolderBinder.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsListHeaderViewHolderBinder.java
@@ -52,15 +52,10 @@
     public void bindViewHolder(WidgetsListHeaderHolder viewHolder, WidgetsListHeaderEntry data,
             int position) {
         WidgetsListHeader widgetsListHeader = viewHolder.mWidgetsListHeader;
-        if (mWidgetsListAdapter.getItemCount() == 1) {
-            widgetsListHeader.setBackgroundResource(R.drawable.widgets_list_single_item_ripple);
-        } else if (position == 0) {
-            widgetsListHeader.setBackgroundResource(R.drawable.widgets_list_top_ripple);
-        } else if (position == mWidgetsListAdapter.getItemCount() - 1) {
-            widgetsListHeader.setBackgroundResource(R.drawable.widgets_list_bottom_ripple);
-        } else {
-            widgetsListHeader.setBackgroundResource(R.drawable.widgets_list_middle_ripple);
-        }
+        widgetsListHeader.updateListBackground(
+                /* isFirst= */ position == 0,
+                /* isLast= */ position == mWidgetsListAdapter.getItemCount() - 1,
+                /* isExpanded= */ data.isWidgetListShown());
         widgetsListHeader.applyFromItemInfoWithIcon(data);
         widgetsListHeader.setExpanded(data.isWidgetListShown());
         widgetsListHeader.setOnExpandChangeListener(isExpanded ->
diff --git a/src/com/android/launcher3/widget/picker/WidgetsListSearchHeaderViewHolderBinder.java b/src/com/android/launcher3/widget/picker/WidgetsListSearchHeaderViewHolderBinder.java
index b98f5e1..d5e03a4 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsListSearchHeaderViewHolderBinder.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsListSearchHeaderViewHolderBinder.java
@@ -53,15 +53,10 @@
     public void bindViewHolder(WidgetsListSearchHeaderHolder viewHolder,
             WidgetsListSearchHeaderEntry data, int position) {
         WidgetsListHeader widgetsListHeader = viewHolder.mWidgetsListHeader;
-        if (mWidgetsListAdapter.getItemCount() == 1) {
-            widgetsListHeader.setBackgroundResource(R.drawable.widgets_list_single_item_ripple);
-        } else if (position == 0) {
-            widgetsListHeader.setBackgroundResource(R.drawable.widgets_list_top_ripple);
-        } else if (position == mWidgetsListAdapter.getItemCount() - 1) {
-            widgetsListHeader.setBackgroundResource(R.drawable.widgets_list_bottom_ripple);
-        } else {
-            widgetsListHeader.setBackgroundResource(R.drawable.widgets_list_middle_ripple);
-        }
+        widgetsListHeader.updateListBackground(
+                /* isFirst= */ position == 0,
+                /* isLast= */ position == mWidgetsListAdapter.getItemCount() - 1,
+                /* isExpanded= */ data.isWidgetListShown());
         widgetsListHeader.applyFromItemInfoWithIcon(data);
         widgetsListHeader.setExpanded(data.isWidgetListShown());
         widgetsListHeader.setOnExpandChangeListener(isExpanded ->
diff --git a/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java b/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java
index c3eda13..8e310c5 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsListTableViewHolderBinder.java
@@ -16,6 +16,7 @@
 package com.android.launcher3.widget.picker;
 
 import android.content.Context;
+import android.content.res.Resources;
 import android.util.Log;
 import android.view.Gravity;
 import android.view.LayoutInflater;
@@ -51,6 +52,9 @@
     private final OnLongClickListener mIconLongClickListener;
     private final WidgetPreviewLoader mWidgetPreviewLoader;
     private final WidgetsListAdapter mWidgetsListAdapter;
+    private final float mTopBottomCornerRadius;
+    private final float mMiddleCornerRadius;
+    private final float mJoinedCornerRadius;
     private boolean mApplyBitmapDeferred = false;
 
     public WidgetsListTableViewHolderBinder(
@@ -65,6 +69,13 @@
         mIconLongClickListener = iconLongClickListener;
         mWidgetPreviewLoader = widgetPreviewLoader;
         mWidgetsListAdapter = listAdapter;
+        Resources resources = context.getResources();
+        mTopBottomCornerRadius =
+                resources.getDimension(R.dimen.widget_list_top_bottom_corner_radius);
+        mMiddleCornerRadius =
+                resources.getDimension(R.dimen.widget_list_content_corner_radius);
+        mJoinedCornerRadius =
+                resources.getDimension(R.dimen.widget_list_content_joined_corner_radius);
     }
 
     /**
@@ -100,13 +111,14 @@
                     entry.mWidgets.size(), table.getChildCount()));
         }
 
-        if (position == mWidgetsListAdapter.getItemCount() - 1) {
-            table.setBackgroundResource(R.drawable.widgets_list_bottom_ripple);
-        } else {
-            // WidgetsListContentEntry is never shown in position 0. There must be a header above
-            // it.
-            table.setBackgroundResource(R.drawable.widgets_list_middle_ripple);
-        }
+        // The content is always joined to an expanded header above.
+        float topRadius = mJoinedCornerRadius;
+        float bottomRadius = position == mWidgetsListAdapter.getItemCount() - 1
+                ? mTopBottomCornerRadius
+                : mMiddleCornerRadius;
+        table.setBackgroundDrawable(
+                WidgetsListDrawables.createListBackgroundDrawable(
+                        holder.itemView.getContext(), topRadius, bottomRadius));
 
         List<ArrayList<WidgetItem>> widgetItemsTable =
                 WidgetsTableUtils.groupWidgetItemsIntoTable(entry.mWidgets, mMaxSpansPerRow);
diff --git a/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java b/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
index 62ef4ff..9167d87 100644
--- a/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
+++ b/src/com/android/launcher3/widget/picker/WidgetsRecommendationTableLayout.java
@@ -18,6 +18,7 @@
 import android.content.Context;
 import android.util.AttributeSet;
 import android.util.Log;
+import android.util.Size;
 import android.view.Gravity;
 import android.view.LayoutInflater;
 import android.view.View;
@@ -33,6 +34,7 @@
 import com.android.launcher3.R;
 import com.android.launcher3.model.WidgetItem;
 import com.android.launcher3.widget.WidgetCell;
+import com.android.launcher3.widget.util.WidgetSizes;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -44,7 +46,6 @@
     private static final float MAX_DOWN_SCALE_RATIO = 0.5f;
     private final float mWidgetsRecommendationTableVerticalPadding;
     private final float mWidgetCellTextViewsHeight;
-    private final float mWidgetPreviewPadding;
 
     private float mRecommendationTableMaxHeight = Float.MAX_VALUE;
     @Nullable private OnLongClickListener mWidgetCellOnLongClickListener;
@@ -61,8 +62,6 @@
         mWidgetsRecommendationTableVerticalPadding = 2 * getResources()
                 .getDimensionPixelSize(R.dimen.widget_cell_vertical_padding);
         mWidgetCellTextViewsHeight = 4 * getResources().getDimension(R.dimen.widget_cell_font_size);
-        mWidgetPreviewPadding = 2 * getResources()
-                .getDimensionPixelSize(R.dimen.widget_preview_shortcut_padding);
     }
 
     /** Sets a {@link android.view.View.OnLongClickListener} for all widget cells in this table. */
@@ -149,8 +148,10 @@
             List<WidgetItem> widgetItems = recommendedWidgetsInTable.get(i);
             float rowHeight = 0;
             for (int j = 0; j < widgetItems.size(); j++) {
-                float previewHeight = widgetItems.get(j).spanY * deviceProfile.cellHeightPx
-                        * previewScale + mWidgetPreviewPadding;
+                WidgetItem widgetItem = widgetItems.get(j);
+                Size widgetSize = WidgetSizes.getWidgetSizePx(
+                        deviceProfile, widgetItem.spanX, widgetItem.spanY);
+                float previewHeight = widgetSize.getHeight() * previewScale;
                 rowHeight = Math.max(rowHeight, previewHeight + mWidgetCellTextViewsHeight);
             }
             totalHeight += rowHeight;
diff --git a/src/com/android/launcher3/widget/util/WidgetSizes.java b/src/com/android/launcher3/widget/util/WidgetSizes.java
new file mode 100644
index 0000000..5c8ea72
--- /dev/null
+++ b/src/com/android/launcher3/widget/util/WidgetSizes.java
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2021 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.android.launcher3.widget.util;
+
+import static android.appwidget.AppWidgetHostView.getDefaultPaddingForWidget;
+
+import static com.android.launcher3.Utilities.ATLEAST_S;
+
+import android.annotation.SuppressLint;
+import android.appwidget.AppWidgetHostView;
+import android.appwidget.AppWidgetManager;
+import android.content.ComponentName;
+import android.content.Context;
+import android.graphics.Point;
+import android.graphics.Rect;
+import android.os.Bundle;
+import android.util.Size;
+import android.util.SizeF;
+
+import androidx.annotation.Nullable;
+
+import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.LauncherAppState;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/** A utility class for widget sizes related calculations. */
+public final class WidgetSizes {
+
+    /**
+     * Returns the list of all possible sizes, in dp, for a widget of given spans on this device.
+     */
+    public static ArrayList<SizeF> getWidgetSizes(Context context, int spanX, int spanY) {
+        ArrayList<SizeF> sizes = new ArrayList<>(2);
+        final float density = context.getResources().getDisplayMetrics().density;
+        final Point cellSize = new Point();
+
+        for (DeviceProfile profile : LauncherAppState.getIDP(context).supportedProfiles) {
+            Size widgetSizePx = getWidgetSizePx(profile, spanX, spanY, cellSize);
+            sizes.add(new SizeF(widgetSizePx.getWidth() / density,
+                    widgetSizePx.getHeight() / density));
+        }
+        return sizes;
+    }
+
+    /** Returns the size, in pixels, a widget of given spans & {@code profile}. */
+    public static Size getWidgetSizePx(DeviceProfile profile, int spanX, int spanY) {
+        return getWidgetSizePx(profile, spanX, spanY, /* recycledCellSize= */ null);
+    }
+
+    private static Size getWidgetSizePx(DeviceProfile profile, int spanX, int spanY,
+            @Nullable Point recycledCellSize) {
+        final int hBorderSpacing = (spanX - 1) * profile.cellLayoutBorderSpacingPx;
+        final int vBorderSpacing = (spanY - 1) * profile.cellLayoutBorderSpacingPx;
+        if (recycledCellSize == null) {
+            recycledCellSize = new Point();
+        }
+        profile.getCellSize(recycledCellSize);
+        return new Size(((spanX * recycledCellSize.x) + hBorderSpacing),
+                ((spanY * recycledCellSize.y) + vBorderSpacing));
+    }
+
+    /**
+     * Updates a given {@code widgetView} with size, {@code spanX}, {@code spanY}.
+     *
+     * <p>On Android S+, it also updates the given {@code widgetView} with a list of sizes derived
+     * from {@code spanX}, {@code spanY} in all supported device profiles.
+     */
+    @SuppressLint("NewApi") // Already added API check.
+    public static void updateWidgetSizeRanges(AppWidgetHostView widgetView, Context context,
+            int spanX, int spanY) {
+        List<SizeF> sizes = getWidgetSizes(context, spanX, spanY);
+        if (ATLEAST_S) {
+            widgetView.updateAppWidgetSize(new Bundle(), sizes);
+        } else {
+            Rect bounds = getMinMaxSizes(sizes);
+            widgetView.updateAppWidgetSize(new Bundle(), bounds.left, bounds.top, bounds.right,
+                    bounds.bottom);
+        }
+    }
+
+    /**
+     * Returns the bundle to be used as the default options for a widget with provided size.
+     */
+    public static Bundle getWidgetSizeOptions(Context context, ComponentName provider, int spanX,
+            int spanY) {
+        ArrayList<SizeF> sizes = getWidgetSizes(context, spanX, spanY);
+        Rect padding = getDefaultPaddingForWidget(context, provider, null);
+        float density = context.getResources().getDisplayMetrics().density;
+        float xPaddingDips = (padding.left + padding.right) / density;
+        float yPaddingDips = (padding.top + padding.bottom) / density;
+
+        ArrayList<SizeF> paddedSizes = sizes.stream()
+                .map(size -> new SizeF(
+                        Math.max(0.f, size.getWidth() - xPaddingDips),
+                        Math.max(0.f, size.getHeight() - yPaddingDips)))
+                .collect(Collectors.toCollection(ArrayList::new));
+
+        Rect rect = getMinMaxSizes(paddedSizes);
+        Bundle options = new Bundle();
+        options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_WIDTH, rect.left);
+        options.putInt(AppWidgetManager.OPTION_APPWIDGET_MIN_HEIGHT, rect.top);
+        options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_WIDTH, rect.right);
+        options.putInt(AppWidgetManager.OPTION_APPWIDGET_MAX_HEIGHT, rect.bottom);
+        options.putParcelableArrayList(AppWidgetManager.OPTION_APPWIDGET_SIZES, paddedSizes);
+        return options;
+    }
+
+    /**
+     * Returns the min and max widths and heights given a list of sizes, in dp.
+     *
+     * @param sizes List of sizes to get the min/max from.
+     * @return A rectangle with the left (resp. top) is used for the min width (resp. height) and
+     * the right (resp. bottom) for the max. The returned rectangle is set with 0s if the list is
+     * empty.
+     */
+    private static Rect getMinMaxSizes(List<SizeF> sizes) {
+        if (sizes.isEmpty()) {
+            return new Rect();
+        } else {
+            SizeF first = sizes.get(0);
+            Rect result = new Rect((int) first.getWidth(), (int) first.getHeight(),
+                    (int) first.getWidth(), (int) first.getHeight());
+            for (int i = 1; i < sizes.size(); i++) {
+                result.union((int) sizes.get(i).getWidth(), (int) sizes.get(i).getHeight());
+            }
+            return result;
+        }
+    }
+}
diff --git a/src_shortcuts_overrides/com/android/launcher3/model/WidgetsModel.java b/src_shortcuts_overrides/com/android/launcher3/model/WidgetsModel.java
index be18e54..51c5b12 100644
--- a/src_shortcuts_overrides/com/android/launcher3/model/WidgetsModel.java
+++ b/src_shortcuts_overrides/com/android/launcher3/model/WidgetsModel.java
@@ -254,13 +254,11 @@
                 }
 
                 // Ensure that all widgets we show can be added on a workspace of this size
-                int minSpanX = Math.min(item.widgetInfo.spanX, item.widgetInfo.minSpanX);
-                int minSpanY = Math.min(item.widgetInfo.spanY, item.widgetInfo.minSpanY);
-                if (minSpanX > mIdp.numColumns || minSpanY > mIdp.numRows) {
+                if (!item.widgetInfo.isMinSizeFulfilled()) {
                     if (DEBUG) {
                         Log.d(TAG, String.format(
-                                "Widget %s : (%d X %d) can't fit on this device",
-                                item.componentName, minSpanX, minSpanY));
+                                "Widget %s : can't fit on this device with a grid size: %dx%d",
+                                item.componentName, mIdp.numColumns, mIdp.numRows));
                     }
                     return false;
                 }
diff --git a/tests/src/com/android/launcher3/util/TestUtil.java b/tests/src/com/android/launcher3/util/TestUtil.java
index 55e5744..67f3902 100644
--- a/tests/src/com/android/launcher3/util/TestUtil.java
+++ b/tests/src/com/android/launcher3/util/TestUtil.java
@@ -22,6 +22,8 @@
 
 import androidx.test.uiautomator.UiDevice;
 
+import org.junit.Assert;
+
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -48,7 +50,10 @@
         in.close();
         out.close();
 
-        UiDevice.getInstance(getInstrumentation()).executeShellCommand("pm install " + apkFilename);
+        final String result = UiDevice.getInstance(getInstrumentation())
+                .executeShellCommand("pm install " + apkFilename);
+        Assert.assertTrue("Failed to install wellbeing test apk; make sure the device is rooted",
+                "Success".equals(result.replaceAll("\\s+", "")));
     }
 
     public static void uninstallDummyApp() throws IOException {