Merge "Update Lottie files in gesture nav education" into udc-dev
diff --git a/quickstep/res/color/taskbar_nav_icon_dark_color.xml b/quickstep/res/color/taskbar_nav_icon_dark_color.xml
new file mode 100644
index 0000000..7951e12
--- /dev/null
+++ b/quickstep/res/color/taskbar_nav_icon_dark_color.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@android:color/system_neutral2_700"/>
+</selector>
diff --git a/quickstep/res/color/taskbar_nav_icon_light_color.xml b/quickstep/res/color/taskbar_nav_icon_light_color.xml
new file mode 100644
index 0000000..cc8e3b3
--- /dev/null
+++ b/quickstep/res/color/taskbar_nav_icon_light_color.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="@android:color/system_neutral2_200"/>
+</selector>
diff --git a/quickstep/res/drawable/bg_taskbar_edu_tooltip.xml b/quickstep/res/drawable/bg_taskbar_edu_tooltip.xml
index a20f7da..20c524d 100644
--- a/quickstep/res/drawable/bg_taskbar_edu_tooltip.xml
+++ b/quickstep/res/drawable/bg_taskbar_edu_tooltip.xml
@@ -18,5 +18,5 @@
     android:shape="rectangle">
 
     <corners android:radius="@dimen/dialogCornerRadius" />
-    <solid android:color="?androidprv:attr/colorSurface" />
+    <solid android:color="?androidprv:attr/materialColorSurfaceBright"/>
 </shape>
\ No newline at end of file
diff --git a/quickstep/res/drawable/button_taskbar_edu_colored.xml b/quickstep/res/drawable/button_taskbar_edu_colored.xml
index 70bfc9f..a94a996 100644
--- a/quickstep/res/drawable/button_taskbar_edu_colored.xml
+++ b/quickstep/res/drawable/button_taskbar_edu_colored.xml
@@ -15,14 +15,13 @@
 -->
 
 <inset
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
+    xmlns:android="http://schemas.android.com/apk/res/android">
     <ripple
         android:color="?android:attr/colorControlHighlight">
         <item>
             <shape android:shape="rectangle">
                 <corners android:radius="16dp"/>
-                <solid android:color="?androidprv:attr/colorAccentPrimary"/>
+                <solid android:color="@color/taskbar_edu_button_color"/>
             </shape>
         </item>
     </ripple>
diff --git a/quickstep/res/values-night/colors.xml b/quickstep/res/values-night/colors.xml
index 6474c48..8d03ce6 100644
--- a/quickstep/res/values-night/colors.xml
+++ b/quickstep/res/values-night/colors.xml
@@ -26,4 +26,6 @@
 
     <!-- Turn on work apps button -->
     <color name="work_turn_on_stroke">?androidprv:attr/colorAccentSecondaryVariant</color>
+    <color name="work_fab_bg_color">?androidprv:attr/materialColorPrimaryFixedDim</color>
+    <color name="work_fab_icon_color">?androidprv:attr/materialColorOnPrimaryFixed</color>
 </resources>
\ No newline at end of file
diff --git a/quickstep/res/values-pt/strings.xml b/quickstep/res/values-pt/strings.xml
index 8cf6837..c2b4d92 100644
--- a/quickstep/res/values-pt/strings.xml
+++ b/quickstep/res/values-pt/strings.xml
@@ -23,7 +23,7 @@
     <string name="recent_task_option_freeform" msgid="48863056265284071">"Forma livre"</string>
     <string name="recents_empty_message" msgid="7040467240571714191">"Nenhum item recente"</string>
     <string name="accessibility_app_usage_settings" msgid="6312864233673544149">"Configurações de uso do app"</string>
-    <string name="recents_clear_all" msgid="5328176793634888831">"Limpar tudo"</string>
+    <string name="recents_clear_all" msgid="5328176793634888831">"Remover tudo"</string>
     <string name="accessibility_recent_apps" msgid="4058661986695117371">"Apps recentes"</string>
     <string name="task_view_closed" msgid="9170038230110856166">"Tarefa encerrada"</string>
     <string name="task_contents_description_with_remaining_time" msgid="4479688746574672685">"<xliff:g id="TASK_DESCRIPTION">%1$s</xliff:g>, <xliff:g id="REMAINING_TIME">%2$s</xliff:g>"</string>
diff --git a/quickstep/res/values/colors.xml b/quickstep/res/values/colors.xml
index c84c518..63f192c 100644
--- a/quickstep/res/values/colors.xml
+++ b/quickstep/res/values/colors.xml
@@ -25,10 +25,6 @@
 
     <!-- Taskbar -->
     <color name="taskbar_nav_icon_selection_ripple">#E0E0E0</color>
-    <color name="taskbar_nav_icon_light_color">#ffffff</color>
-    <!-- The dark navigation button color is only used in the rare cases that taskbar isn't drawing
-    its background and the underlying app has requested dark buttons. -->
-    <color name="taskbar_nav_icon_dark_color">#99000000</color>
     <color name="taskbar_stashed_handle_light_color">#EBffffff</color>
     <color name="taskbar_stashed_handle_dark_color">#99000000</color>
 
@@ -90,4 +86,6 @@
 
     <!-- Turn on work apps button -->
     <color name="work_turn_on_stroke">?androidprv:attr/colorAccentPrimaryVariant</color>
+    <color name="work_fab_bg_color">?androidprv:attr/materialColorPrimaryFixedDim</color>
+    <color name="work_fab_icon_color">?androidprv:attr/materialColorOnPrimaryFixed</color>
 </resources>
\ No newline at end of file
diff --git a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
index 3ec82ce..114965f 100644
--- a/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
+++ b/quickstep/src/com/android/launcher3/QuickstepTransitionManager.java
@@ -1065,6 +1065,9 @@
                     new SurfaceControl.Transaction().remove(dimLayer).apply()));
         }
 
+        backgroundRadiusAnim.addListener(
+                AnimatorListeners.forEndCallback(depthController::dispose));
+
         return backgroundRadiusAnim;
     }
 
@@ -1786,7 +1789,8 @@
                 viewToUse = v;
             }
 
-            // TODO(b/265134143): create a CUJ type for interaction jank monitoring.
+            // The CUJ is logged by the click handler, so we don't log it inside the animation
+            // library.
             ActivityLaunchAnimator.Controller controllerDelegate =
                     ActivityLaunchAnimator.Controller.fromView(viewToUse, null /* cujType */);
 
diff --git a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
index d8458c9..7c62763 100644
--- a/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
+++ b/quickstep/src/com/android/launcher3/statehandlers/DepthController.java
@@ -84,8 +84,7 @@
 
                 @Override
                 public void onViewDetachedFromWindow(View view) {
-                    CrossWindowBlurListeners.getInstance().removeListener(mCrossWindowBlurListener);
-                    mLauncher.getScrimView().removeOpaquenessListener(mOpaquenessListener);
+                    removeSecondaryListeners();
                 }
             };
             rootView.addOnAttachStateChangeListener(mOnAttachListener);
@@ -96,6 +95,27 @@
     }
 
     /**
+     * Cleans up after this controller so it can be garbage collected without leaving traces.
+     */
+    public void dispose() {
+        removeSecondaryListeners();
+
+        if (mLauncher.getRootView() != null && mOnAttachListener != null) {
+            mLauncher.getRootView().removeOnAttachStateChangeListener(mOnAttachListener);
+            mOnAttachListener = null;
+        }
+    }
+
+    private void removeSecondaryListeners() {
+        if (mCrossWindowBlurListener != null) {
+            CrossWindowBlurListeners.getInstance().removeListener(mCrossWindowBlurListener);
+        }
+        if (mOpaquenessListener != null) {
+            mLauncher.getScrimView().removeOpaquenessListener(mOpaquenessListener);
+        }
+    }
+
+    /**
      * Sets if the underlying activity is started or not
      */
     public void setActivityStarted(boolean isStarted) {
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarDividerPopupView.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarDividerPopupView.kt
index e07f0c0..a347908 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarDividerPopupView.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarDividerPopupView.kt
@@ -19,6 +19,7 @@
 import android.content.Context
 import android.content.Intent
 import android.graphics.Rect
+import android.graphics.drawable.GradientDrawable
 import android.util.AttributeSet
 import android.view.Gravity
 import android.view.MotionEvent
@@ -138,9 +139,29 @@
 
     private fun populateForView(view: View): TaskbarDividerPopupView<*> {
         dividerView = view
+        tryUpdateBackground()
         return this
     }
 
+    /** Updates the text background to match the shape of this background (when applicable). */
+    private fun tryUpdateBackground() {
+        if (background !is GradientDrawable) {
+            return
+        }
+        val background = background as GradientDrawable
+        val color = context.getColor(R.color.popup_shade_first)
+        val backgroundMask = GradientDrawable()
+        backgroundMask.setColor(color)
+        backgroundMask.shape = GradientDrawable.RECTANGLE
+        if (background.cornerRadii != null) {
+            backgroundMask.cornerRadii = background.cornerRadii
+        } else {
+            backgroundMask.cornerRadius = background.cornerRadius
+        }
+
+        setBackground(backgroundMask)
+    }
+
     override fun addArrow() {
         super.addArrow()
         // Change arrow location to the middle of popup.
@@ -161,7 +182,7 @@
                     0f, // arrowOffsetY
                     false, // isPointingUp
                     true, // leftAligned
-                    Themes.getAttrColor(context, R.attr.popupColorPrimary),
+                    context.getColor(R.color.popup_shade_first),
                 )
             elevation = mElevation
             mArrow.elevation = mElevation
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarEduTooltip.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarEduTooltip.kt
index bcae06c..9b50c5d 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarEduTooltip.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarEduTooltip.kt
@@ -53,7 +53,7 @@
     private val activityContext: ActivityContext = ActivityContext.lookupContext(context)
 
     private val backgroundColor =
-        Themes.getAttrColor(context, com.android.internal.R.attr.colorSurface)
+        Themes.getAttrColor(context, com.android.internal.R.attr.materialColorSurfaceBright)
 
     private val tooltipCornerRadius = Themes.getDialogCornerRadius(context)
     private val arrowWidth = resources.getDimension(R.dimen.popup_arrow_width)
diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
index 88cac97..7b90ecb 100644
--- a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
+++ b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java
@@ -26,6 +26,7 @@
 import static org.junit.Assume.assumeTrue;
 
 import android.content.Intent;
+import android.platform.test.annotations.PlatinumTest;
 
 import androidx.test.filters.LargeTest;
 import androidx.test.platform.app.InstrumentationRegistry;
@@ -99,6 +100,7 @@
     @Test
     @NavigationModeSwitch
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testWorkspaceSwitchToAllApps() {
         assertNotNull("switchToAllApps() returned null",
                 mLauncher.getWorkspace().switchToAllApps());
@@ -108,6 +110,7 @@
 
     @Test
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testOverview() throws Exception {
         startTestAppsWithCheck();
         // mLauncher.pressHome() also tests an important case of pressing home while in background.
@@ -175,6 +178,7 @@
     @NavigationModeSwitch
     @PortraitLandscape
     @ScreenRecord // b/195673272
+    @PlatinumTest(focusArea = "launcher")
     public void testOverviewActions() throws Exception {
         // Experimenting for b/165029151:
         final Overview overview = mLauncher.goHome().switchToOverview();
@@ -209,6 +213,7 @@
     @NavigationModeSwitch
     @PortraitLandscape
     @ScreenRecord // b/238461765
+    @PlatinumTest(focusArea = "launcher")
     public void testSwitchToOverview() throws Exception {
         startTestAppsWithCheck();
         assertNotNull("Workspace.switchToOverview() returned null",
@@ -221,6 +226,7 @@
     @Test
     @NavigationModeSwitch
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testBackground() throws Exception {
         startAppFast(CALCULATOR_APP_PACKAGE);
         final LaunchedAppState launchedAppState = getAndAssertLaunchedApp();
@@ -275,6 +281,7 @@
     @Test
     @NavigationModeSwitch
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testQuickSwitchFromApp() throws Exception {
         startTestActivity(2);
         startTestActivity(3);
@@ -304,6 +311,7 @@
 
     @Test
     @ScreenRecord // b/242163205
+    @PlatinumTest(focusArea = "launcher")
     public void testQuickSwitchToPreviousAppForTablet() throws Exception {
         assumeTrue(mLauncher.isTablet());
         startTestActivity(2);
@@ -335,6 +343,7 @@
     @Test
     @NavigationModeSwitch
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testQuickSwitchFromHome() throws Exception {
         startTestActivity(2);
         mLauncher.goHome().quickSwitchToPreviousApp();
@@ -346,6 +355,7 @@
     @Test
     @PortraitLandscape
     @NavigationModeSwitch
+    @PlatinumTest(focusArea = "launcher")
     public void testPressBack() throws Exception {
         InstrumentationRegistry.getInstrumentation().getUiAutomation().adoptShellPermissionIdentity(
                 READ_DEVICE_CONFIG_PERMISSION);
@@ -364,6 +374,7 @@
     @Test
     @PortraitLandscape
     @TaskbarModeSwitch(mode = PERSISTENT)
+    @PlatinumTest(focusArea = "launcher")
     public void testOverviewForTablet() throws Exception {
         assumeTrue(mLauncher.isTablet());
 
diff --git a/res/color-night-v31/all_apps_button_color.xml b/res/color-night-v31/all_apps_button_color.xml
new file mode 100644
index 0000000..a1d1b67
--- /dev/null
+++ b/res/color-night-v31/all_apps_button_color.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+  <item android:color="@android:color/system_neutral2_500" android:lStar="80" />
+</selector>
diff --git a/res/color-night-v31/all_apps_tab_background_selected.xml b/res/color-night-v31/all_apps_tab_background_selected.xml
index b7c9ff6..b35a4b7 100644
--- a/res/color-night-v31/all_apps_tab_background_selected.xml
+++ b/res/color-night-v31/all_apps_tab_background_selected.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="@android:color/system_accent2_100"/>
+    <item android:color="@android:color/system_accent1_200"/>
 </selector>
\ No newline at end of file
diff --git a/res/color-night-v31/all_apps_tab_text.xml b/res/color-night-v31/all_apps_tab_text.xml
index 54b95ae..ae46169 100644
--- a/res/color-night-v31/all_apps_tab_text.xml
+++ b/res/color-night-v31/all_apps_tab_text.xml
@@ -14,6 +14,6 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="@android:color/system_neutral2_700" android:state_selected="true"/>
-    <item android:color="@android:color/system_accent2_100"/>
+    <item android:color="@android:color/system_accent1_800" android:state_selected="true"/>
+    <item android:color="@android:color/system_neutral1_100"/>
 </selector>
\ No newline at end of file
diff --git a/res/color-night-v31/all_apps_tabs_background.xml b/res/color-night-v31/all_apps_tabs_background.xml
index 9213274..671500f 100644
--- a/res/color-night-v31/all_apps_tabs_background.xml
+++ b/res/color-night-v31/all_apps_tabs_background.xml
@@ -14,5 +14,7 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="@android:color/system_neutral1_800"/>
+    <item
+        android:color="@android:color/system_neutral1_800"
+        android:lStar="22"/>
 </selector>
\ No newline at end of file
diff --git a/res/color-night-v31/popup_shade_first.xml b/res/color-night-v31/popup_shade_first.xml
index ba74128..83822a6 100644
--- a/res/color-night-v31/popup_shade_first.xml
+++ b/res/color-night-v31/popup_shade_first.xml
@@ -1,5 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2021 The Android Open Source Project
+<?xml version="1.0" encoding="utf-8"?><!-- 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.
@@ -13,8 +12,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android" >
-    <item
-        android:color="?attr/popupColorPrimary"
-        android:lStar="20" />
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
+    <item android:color="?androidprv:attr/materialColorSurfaceContainer"/>
 </selector>
diff --git a/res/color-night-v31/taskbar_background.xml b/res/color-night-v31/taskbar_background.xml
index 3409d52..074db20 100644
--- a/res/color-night-v31/taskbar_background.xml
+++ b/res/color-night-v31/taskbar_background.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-  <item android:color="@android:color/system_neutral1_500" android:lStar="20" />
+  <item android:color="@android:color/system_neutral1_500" android:lStar="6" />
 </selector>
diff --git a/res/color-night-v31/taskbar_divider_background.xml b/res/color-night-v31/taskbar_divider_background.xml
index 1981eec..5dabf577 100644
--- a/res/color-night-v31/taskbar_divider_background.xml
+++ b/res/color-night-v31/taskbar_divider_background.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-  <item android:color="#797869" android:lStar="60" />
+  <item android:color="@android:color/system_neutral1_500" android:lStar="60" />
 </selector>
diff --git a/res/color-night/all_apps_tab_background_selected.xml b/res/color-night/all_apps_tab_background_selected.xml
index b22bc8b..d1bc5f7 100644
--- a/res/color-night/all_apps_tab_background_selected.xml
+++ b/res/color-night/all_apps_tab_background_selected.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="#BFEBE3"/>
+    <item android:color="#A8C7FA"/>
 </selector>
\ No newline at end of file
diff --git a/res/color-night/all_apps_tab_text.xml b/res/color-night/all_apps_tab_text.xml
index 183af01..6a591b0 100644
--- a/res/color-night/all_apps_tab_text.xml
+++ b/res/color-night/all_apps_tab_text.xml
@@ -14,6 +14,6 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="#F0F0F0" android:state_selected="true"/>
-    <item android:color="#464646"/>
+    <item android:color="#062E6F" android:state_selected="true"/>
+    <item android:color="#E3E3E3"/>
 </selector>
\ No newline at end of file
diff --git a/res/color-night/all_apps_tabs_background.xml b/res/color-night/all_apps_tabs_background.xml
new file mode 100644
index 0000000..3f7d535
--- /dev/null
+++ b/res/color-night/all_apps_tabs_background.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:color="#343535"/>
+</selector>
\ No newline at end of file
diff --git a/res/color-v31/all_apps_button_color.xml b/res/color-v31/all_apps_button_color.xml
new file mode 100644
index 0000000..a4603f9
--- /dev/null
+++ b/res/color-v31/all_apps_button_color.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+  <item android:color="@android:color/system_neutral2_500" android:lStar="30" />
+</selector>
diff --git a/res/color-v31/all_apps_tab_background_selected.xml b/res/color-v31/all_apps_tab_background_selected.xml
index dac8fa2..4160ac8 100644
--- a/res/color-v31/all_apps_tab_background_selected.xml
+++ b/res/color-v31/all_apps_tab_background_selected.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="@android:color/system_accent1_100"/>
+    <item android:color="@android:color/system_accent1_600"/>
 </selector>
\ No newline at end of file
diff --git a/res/color-v31/all_apps_tab_text.xml b/res/color-v31/all_apps_tab_text.xml
index c3520a7..d254ee1 100644
--- a/res/color-v31/all_apps_tab_text.xml
+++ b/res/color-v31/all_apps_tab_text.xml
@@ -14,6 +14,6 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="@android:color/system_neutral1_900" android:state_selected="true"/>
-    <item android:color="@android:color/system_neutral2_700"/>
+    <item android:color="@android:color/system_accent1_200" android:state_selected="true"/>
+    <item android:color="@android:color/system_neutral1_900"/>
 </selector>
\ No newline at end of file
diff --git a/res/color-v31/all_apps_tabs_background.xml b/res/color-v31/all_apps_tabs_background.xml
index 30757b0..6c777cd 100644
--- a/res/color-v31/all_apps_tabs_background.xml
+++ b/res/color-v31/all_apps_tabs_background.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="@android:color/system_neutral1_500" android:lStar="97" />
+    <item android:color="@android:color/system_neutral1_100"/>
 </selector>
\ No newline at end of file
diff --git a/res/color-v31/popup_shade_first.xml b/res/color-v31/popup_shade_first.xml
index 28d9155..1278bb4 100644
--- a/res/color-v31/popup_shade_first.xml
+++ b/res/color-v31/popup_shade_first.xml
@@ -13,8 +13,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android" >
-    <item
-        android:color="?attr/popupColorPrimary"
-        android:lStar="98" />
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
+    <item android:color="?androidprv:attr/materialColorSurfaceContainer"/>
 </selector>
diff --git a/res/color-v31/taskbar_divider_background.xml b/res/color-v31/taskbar_divider_background.xml
index 487e791..60417a8 100644
--- a/res/color-v31/taskbar_divider_background.xml
+++ b/res/color-v31/taskbar_divider_background.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-  <item android:color="#797869" android:lStar="50" />
+  <item android:color="@android:color/system_neutral2_500" android:lStar="50" />
 </selector>
diff --git a/res/color-v31/taskbar_edu_button_color.xml b/res/color-v31/taskbar_edu_button_color.xml
new file mode 100644
index 0000000..f53e53a
--- /dev/null
+++ b/res/color-v31/taskbar_edu_button_color.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+  <item android:color="@android:color/system_accent1_100"/>
+</selector>
diff --git a/res/color/all_apps_tab_background_selected.xml b/res/color/all_apps_tab_background_selected.xml
index 5cb9bd8..0fc821f 100644
--- a/res/color/all_apps_tab_background_selected.xml
+++ b/res/color/all_apps_tab_background_selected.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="#8DF5E3"/>
+    <item android:color="#0B57D0"/>
 </selector>
\ No newline at end of file
diff --git a/res/color/all_apps_tab_text.xml b/res/color/all_apps_tab_text.xml
index dace380..12137fd 100644
--- a/res/color/all_apps_tab_text.xml
+++ b/res/color/all_apps_tab_text.xml
@@ -14,6 +14,6 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="#1B1B1B" android:state_selected="true"/>
-    <item android:color="#464646"/>
+    <item android:color="#FFFFFF" android:state_selected="true"/>
+    <item android:color="#1F1F1F"/>
 </selector>
\ No newline at end of file
diff --git a/res/color/all_apps_tabs_background.xml b/res/color/all_apps_tabs_background.xml
index a4b7d1f..9083aea 100644
--- a/res/color/all_apps_tabs_background.xml
+++ b/res/color/all_apps_tabs_background.xml
@@ -14,5 +14,5 @@
      limitations under the License.
 -->
 <selector xmlns:android="http://schemas.android.com/apk/res/android">
-    <item android:color="#F6F6F6"/>
+    <item android:color="#E3E3E3"/>
 </selector>
\ No newline at end of file
diff --git a/res/color/popup_shade_first.xml b/res/color/popup_shade_first.xml
index 151190b..1278bb4 100644
--- a/res/color/popup_shade_first.xml
+++ b/res/color/popup_shade_first.xml
@@ -13,6 +13,7 @@
      See the License for the specific language governing permissions and
      limitations under the License.
 -->
-<selector xmlns:android="http://schemas.android.com/apk/res/android" >
-    <item android:color="?attr/popupShadeFirst" />
+<selector xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:androidprv="http://schemas.android.com/apk/prv/res/android">
+    <item android:color="?androidprv:attr/materialColorSurfaceContainer"/>
 </selector>
diff --git a/res/drawable/work_mode_fab_background.xml b/res/drawable/work_mode_fab_background.xml
new file mode 100644
index 0000000..478b887
--- /dev/null
+++ b/res/drawable/work_mode_fab_background.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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="@color/accent_ripple_color">
+    <item>
+        <shape android:shape="rectangle">
+            <corners android:radius="@dimen/work_fab_radius" />
+            <solid android:color="@color/work_fab_bg_color" />
+            <padding
+                android:left="@dimen/work_profile_footer_padding"
+                android:right="@dimen/work_profile_footer_padding" />
+        </shape>
+    </item>
+</ripple>
diff --git a/res/layout/work_mode_fab.xml b/res/layout/work_mode_fab.xml
index c116c12..32e3b77 100644
--- a/res/layout/work_mode_fab.xml
+++ b/res/layout/work_mode_fab.xml
@@ -21,7 +21,7 @@
     android:layout_width="wrap_content"
     android:minHeight="@dimen/work_fab_height"
     android:gravity="center_vertical"
-    android:background="@drawable/work_apps_toggle_background"
+    android:background="@drawable/work_mode_fab_background"
     android:forceHasOverlappingRendering="false"
     android:contentDescription="@string/work_apps_pause_btn_text"
     android:animateLayoutChanges="true">
@@ -31,12 +31,13 @@
         android:layout_height="@dimen/work_fab_icon_size"
         android:importantForAccessibility="no"
         android:src="@drawable/ic_corp_off"
+        android:tint="@color/work_fab_icon_color"
         android:scaleType="center"/>
     <TextView
         android:id="@+id/pause_text"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:textColor="@color/all_apps_tab_text"
+        android:textColor="@color/work_fab_icon_color"
         android:textSize="14sp"
         android:includeFontPadding="false"
         android:textDirection="locale"
diff --git a/res/values-night-v31/colors.xml b/res/values-night-v31/colors.xml
index 4dd3849..3453668 100644
--- a/res/values-night-v31/colors.xml
+++ b/res/values-night-v31/colors.xml
@@ -25,8 +25,6 @@
     <color name="home_settings_track_on_color">@android:color/system_accent2_700</color>
     <color name="home_settings_track_off_color">@android:color/system_neutral1_700</color>
 
-    <color name="all_apps_button_color">@android:color/system_neutral2_200</color>
-
     <color name="widget_picker_title_color_dark">@android:color/system_neutral1_100</color>
     <color name="widget_picker_header_app_title_color_dark">
         @android:color/system_neutral1_100</color>
@@ -49,4 +47,8 @@
     <color name="widget_picker_collapse_handle_color_dark">
         @android:color/system_neutral2_700</color>
 
+    <color name="work_fab_bg_color">
+        @android:color/system_accent1_200</color>
+    <color name="work_fab_icon_color">
+        @android:color/system_accent1_900</color>
 </resources>
\ No newline at end of file
diff --git a/res/values-night/colors.xml b/res/values-night/colors.xml
deleted file mode 100644
index 17fe419..0000000
--- a/res/values-night/colors.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!--
-/*
-* Copyright (C) 2022 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.
-*/
--->
-
-<resources>
-    <color name="all_apps_button_color">#BFC8CC</color>
-</resources>
\ No newline at end of file
diff --git a/res/values-v31/colors.xml b/res/values-v31/colors.xml
index 83c03ba..4ffff57 100644
--- a/res/values-v31/colors.xml
+++ b/res/values-v31/colors.xml
@@ -73,8 +73,6 @@
     <color name="preload_icon_accent_color_dark">@android:color/system_accent1_300</color>
     <color name="preload_icon_background_color_dark">@android:color/system_neutral2_700</color>
 
-    <color name="all_apps_button_color">@android:color/system_neutral2_700</color>
-
     <color name="widget_picker_title_color_light">
         @android:color/system_neutral1_900</color>
     <color name="widget_picker_header_app_title_color_light">
@@ -99,4 +97,9 @@
         @android:color/system_neutral2_700</color>
     <color name="widget_picker_collapse_handle_color_light">
         @android:color/system_neutral2_200</color>
+
+    <color name="work_fab_bg_color">
+        @android:color/system_accent1_200</color>
+    <color name="work_fab_icon_color">
+        @android:color/system_accent1_900</color>
 </resources>
diff --git a/res/values/colors.xml b/res/values/colors.xml
index 2bed486..ad7a10b 100644
--- a/res/values/colors.xml
+++ b/res/values/colors.xml
@@ -90,14 +90,14 @@
     <color name="drop_target_hover_button_color_light">#D3E3FD</color>
     <color name="drop_target_hover_button_color_dark">#0842A0</color>
 
-    <color name="all_apps_button_color">#40484B</color>
-
     <color name="preload_icon_accent_color_light">#00668B</color>
     <color name="preload_icon_background_color_light">#B5CAD7</color>
     <color name="preload_icon_accent_color_dark">#4BB6E8</color>
     <color name="preload_icon_background_color_dark">#40484D</color>
 
     <color name="work_turn_on_stroke">?android:attr/colorAccent</color>
+    <color name="work_fab_bg_color">#A8C7FA</color>
+    <color name="work_fab_icon_color">#041E49</color>
 
     <color name="widget_picker_primary_surface_color_light">#EFEDED</color>
     <color name="widget_picker_secondary_surface_color_light">#FAF9F8</color>
diff --git a/src/com/android/launcher3/AppWidgetsRestoredReceiver.java b/src/com/android/launcher3/AppWidgetsRestoredReceiver.java
index 3dd8627..ec874b9 100644
--- a/src/com/android/launcher3/AppWidgetsRestoredReceiver.java
+++ b/src/com/android/launcher3/AppWidgetsRestoredReceiver.java
@@ -20,7 +20,6 @@
 import com.android.launcher3.model.WidgetsModel;
 import com.android.launcher3.model.data.LauncherAppWidgetInfo;
 import com.android.launcher3.pm.UserCache;
-import com.android.launcher3.provider.LauncherDbUtils;
 import com.android.launcher3.provider.RestoreDbTask;
 import com.android.launcher3.util.ContentWriter;
 import com.android.launcher3.util.IntArray;
@@ -77,16 +76,8 @@
                 + "oldWidgetIds=" + IntArray.wrap(oldWidgetIds).toConcatString()
                 + ", newWidgetIds=" + IntArray.wrap(newWidgetIds).toConcatString());
 
-        try {
-            IntArray result = LauncherDbUtils.queryIntArray(false, controller.getDb(),
-                    Favorites.TABLE_NAME, Favorites.APPWIDGET_ID,
-                    Favorites.APPWIDGET_ID + "!=" + LauncherAppWidgetInfo.NO_ID, null, null);
-            // TODO(b/234700507): Remove the logs after the bug is fixed
-            Log.d(TAG, "restoreAppWidgetIds: all widget ids in database: "
-                    + result.toConcatString());
-        } catch (Exception ex) {
-            Log.e(TAG, "Getting widget ids from the database failed", ex);
-        }
+        // TODO(b/234700507): Remove the logs after the bug is fixed
+        logDatabaseWidgetInfo(controller);
 
         for (int i = 0; i < oldWidgetIds.length; i++) {
             Log.i(TAG, "Widget state restore id " + oldWidgetIds[i] + " => " + newWidgetIds[i]);
@@ -104,9 +95,13 @@
             // recreate the widget during loading with the correct host provider.
             long mainProfileId = UserCache.INSTANCE.get(context)
                     .getSerialNumberForUser(myUserHandle());
+            long controllerProfileId = controller.getSerialNumberForUser(myUserHandle());
             String oldWidgetId = Integer.toString(oldWidgetIds[i]);
             final String where = "appWidgetId=? and (restored & 1) = 1 and profileId=?";
-            final String[] args = new String[] { oldWidgetId, Long.toString(mainProfileId) };
+            String profileId = Long.toString(mainProfileId);
+            final String[] args = new String[] { oldWidgetId, profileId };
+            Log.d(TAG, "restoreAppWidgetIds: querying profile id=" + profileId
+                    + " with controller profile ID=" + controllerProfileId);
             int result = new ContentWriter(context,
                             new ContentWriter.CommitParams(controller, where, args))
                     .put(LauncherSettings.Favorites.APPWIDGET_ID, newWidgetIds[i])
@@ -135,4 +130,48 @@
             app.getModel().forceReload();
         }
     }
+
+    private static void logDatabaseWidgetInfo(ModelDbController controller) {
+        try (Cursor cursor = controller.getDb().query(Favorites.TABLE_NAME,
+                new String[]{Favorites.APPWIDGET_ID, Favorites.RESTORED, Favorites.PROFILE_ID},
+                Favorites.APPWIDGET_ID + "!=" + LauncherAppWidgetInfo.NO_ID, null,
+                null, null, null)) {
+            IntArray widgetIdList = new IntArray();
+            IntArray widgetRestoreList = new IntArray();
+            IntArray widgetProfileIdList = new IntArray();
+
+            if (cursor.moveToFirst()) {
+                final int widgetIdColumnIndex = cursor.getColumnIndex(Favorites.APPWIDGET_ID);
+                final int widgetRestoredColumnIndex = cursor.getColumnIndex(Favorites.RESTORED);
+                final int widgetProfileIdIndex = cursor.getColumnIndex(Favorites.PROFILE_ID);
+                while (!cursor.isAfterLast()) {
+                    int widgetId = cursor.getInt(widgetIdColumnIndex);
+                    int widgetRestoredFlag = cursor.getInt(widgetRestoredColumnIndex);
+                    int widgetProfileId = cursor.getInt(widgetProfileIdIndex);
+
+                    widgetIdList.add(widgetId);
+                    widgetRestoreList.add(widgetRestoredFlag);
+                    widgetProfileIdList.add(widgetProfileId);
+                    cursor.moveToNext();
+                }
+            }
+
+            StringBuilder builder = new StringBuilder();
+            builder.append("[");
+            for (int i = 0; i < widgetIdList.size(); i++) {
+                builder.append("[")
+                        .append(widgetIdList.get(i))
+                        .append(", ")
+                        .append(widgetRestoreList.get(i))
+                        .append(", ")
+                        .append(widgetProfileIdList.get(i))
+                        .append("]");
+            }
+            builder.append("]");
+            Log.d(TAG, "restoreAppWidgetIds: all widget ids in database: "
+                    + builder.toString());
+        } catch (Exception ex) {
+            Log.e(TAG, "Getting widget ids from the database failed", ex);
+        }
+    }
 }
diff --git a/src/com/android/launcher3/allapps/WorkModeSwitch.java b/src/com/android/launcher3/allapps/WorkModeSwitch.java
index ca16b24..663fdb9 100644
--- a/src/com/android/launcher3/allapps/WorkModeSwitch.java
+++ b/src/com/android/launcher3/allapps/WorkModeSwitch.java
@@ -97,7 +97,6 @@
             mTextView.setText(cache.workProfilePauseButton);
         }
 
-        mIcon.setColorFilter(mTextView.getCurrentTextColor());
         getLayoutTransition().enableTransitionType(LayoutTransition.CHANGING);
     }
 
diff --git a/src/com/android/launcher3/logging/FileLog.java b/src/com/android/launcher3/logging/FileLog.java
index cdd0bda..924a440 100644
--- a/src/com/android/launcher3/logging/FileLog.java
+++ b/src/com/android/launcher3/logging/FileLog.java
@@ -67,6 +67,26 @@
         print(tag, msg);
     }
 
+    public static void i(String tag, String msg, Exception e) {
+        Log.i(tag, msg, e);
+        print(tag, msg, e);
+    }
+
+    public static void i(String tag, String msg) {
+        Log.i(tag, msg);
+        print(tag, msg);
+    }
+
+    public static void w(String tag, String msg, Exception e) {
+        Log.w(tag, msg, e);
+        print(tag, msg, e);
+    }
+
+    public static void w(String tag, String msg) {
+        Log.w(tag, msg);
+        print(tag, msg);
+    }
+
     public static void e(String tag, String msg, Exception e) {
         Log.e(tag, msg, e);
         print(tag, msg, e);
diff --git a/src/com/android/launcher3/provider/RestoreDbTask.java b/src/com/android/launcher3/provider/RestoreDbTask.java
index a6e064a..c554def 100644
--- a/src/com/android/launcher3/provider/RestoreDbTask.java
+++ b/src/com/android/launcher3/provider/RestoreDbTask.java
@@ -136,6 +136,7 @@
         // Primary user ids
         long myProfileId = controller.getSerialNumberForUser(myUserHandle());
         long oldProfileId = getDefaultProfileId(db);
+        Log.d(TAG, "sanitizeDB: myProfileId=" + myProfileId + " oldProfileId=" + oldProfileId);
         LongSparseArray<Long> oldManagedProfileIds = getManagedProfileIds(db, oldProfileId);
         LongSparseArray<Long> profileMapping = new LongSparseArray<>(oldManagedProfileIds.size()
                 + 1);
@@ -148,6 +149,8 @@
             if (user != null) {
                 long newManagedProfileId = controller.getSerialNumberForUser(user);
                 profileMapping.put(oldManagedProfileId, newManagedProfileId);
+                Log.d(TAG, "sanitizeDB: managed profile id=" + oldManagedProfileId
+                        + " should be mapped to new id=" + newManagedProfileId);
             }
         }
 
diff --git a/src/com/android/launcher3/util/DisplayController.java b/src/com/android/launcher3/util/DisplayController.java
index 776fe40..6647d0d 100644
--- a/src/com/android/launcher3/util/DisplayController.java
+++ b/src/com/android/launcher3/util/DisplayController.java
@@ -48,6 +48,7 @@
 
 import com.android.launcher3.LauncherPrefs;
 import com.android.launcher3.Utilities;
+import com.android.launcher3.logging.FileLog;
 import com.android.launcher3.util.window.CachedDisplayInfo;
 import com.android.launcher3.util.window.WindowManagerProxy;
 
@@ -126,6 +127,8 @@
         Context displayInfoContext = getDisplayInfoContext(display);
         mInfo = new Info(displayInfoContext, wmProxy,
                 wmProxy.estimateInternalDisplayBounds(displayInfoContext));
+        mInfo.mPerDisplayBounds.forEach((key, value) -> FileLog.i(TAG,
+                "(CTOR) perDisplayBounds - " + key + ": " + Arrays.deepToString(value)));
     }
 
     /**
@@ -283,6 +286,9 @@
         if (!newInfo.supportedBounds.equals(oldInfo.supportedBounds)
                 || !newInfo.mPerDisplayBounds.equals(oldInfo.mPerDisplayBounds)) {
             change |= CHANGE_SUPPORTED_BOUNDS;
+            newInfo.mPerDisplayBounds.forEach((key, value) -> FileLog.w(TAG,
+                    "(CHANGE_SUPPORTED_BOUNDS) perDisplayBounds - " + key + ": "
+                            + Arrays.deepToString(value)));
         }
         if (DEBUG) {
             Log.d(TAG, "handleInfoChange - change: " + getChangeFlagsString(change));
@@ -353,12 +359,16 @@
             realBounds = wmProxy.getRealBounds(displayInfoContext, displayInfo);
             if (cachedValue == null) {
                 // Unexpected normalizedDisplayInfo is found, recreate the cache
-                Log.e(TAG, "Unexpected normalizedDisplayInfo found, invalidating cache");
+                FileLog.e(TAG, "Unexpected normalizedDisplayInfo found, invalidating cache: "
+                        + normalizedDisplayInfo);
+                mPerDisplayBounds.forEach((key, value) -> FileLog.e(TAG,
+                        "(Invalid Cache) perDisplayBounds - " + key + ": " + Arrays.deepToString(
+                                value)));
                 mPerDisplayBounds.clear();
                 mPerDisplayBounds.putAll(wmProxy.estimateInternalDisplayBounds(displayInfoContext));
                 cachedValue = mPerDisplayBounds.get(normalizedDisplayInfo);
                 if (cachedValue == null) {
-                    Log.e(TAG, "normalizedDisplayInfo not found in estimation: "
+                    FileLog.e(TAG, "normalizedDisplayInfo not found in estimation: "
                             + normalizedDisplayInfo);
                     supportedBounds.add(realBounds);
                 }
diff --git a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
index 9d9fdc9..9676cb3 100644
--- a/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
+++ b/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
@@ -32,6 +32,7 @@
 import android.graphics.Point;
 import android.os.SystemClock;
 import android.platform.test.annotations.IwTest;
+import android.platform.test.annotations.PlatinumTest;
 import android.util.Log;
 
 import androidx.test.filters.FlakyTest;
@@ -237,6 +238,7 @@
                 false /* tapRight */);
     }
 
+    @PlatinumTest(focusArea = "launcher")
     @IwTest(focusArea = "launcher")
     @Test
     @ScreenRecord // b/202433017
@@ -350,6 +352,7 @@
 
     @Test
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testLaunchMenuItem() throws Exception {
         final AllApps allApps = mLauncher.getWorkspace().switchToAllApps();
         allApps.freeze();
@@ -370,6 +373,7 @@
         }
     }
 
+    @PlatinumTest(focusArea = "launcher")
     @IwTest(focusArea = "launcher")
     @Test
     @PortraitLandscape
@@ -394,6 +398,7 @@
 
     @Test
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testDragShortcut() throws Throwable {
         // 1. Open all apps and wait for load complete.
         // 2. Find the app and long press it to show shortcuts.
@@ -423,6 +428,7 @@
     @PortraitLandscape
     @ScreenRecord
     @Ignore // b/233075289
+    @PlatinumTest(focusArea = "launcher")
     public void testDragToFolder() {
         // TODO: add the use case to drag an icon to an existing folder. Currently it either fails
         // on tablets or phones due to difference in resolution.
@@ -469,6 +475,7 @@
 
     @Test
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testDragAndCancelAppIcon() {
         final HomeAppIcon homeAppIcon = createShortcutInCenterIfNotExist(GMAIL_APP_NAME);
         Point positionBeforeDrag =
@@ -511,6 +518,7 @@
     @Ignore("b/256615483")
     @Test
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testUninstallFromWorkspace() throws Exception {
         installDummyAppAndWaitForUIUpdate();
         try {
@@ -524,6 +532,7 @@
     @Test
     @ScreenRecord // b/258071914
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testUninstallFromAllApps() throws Exception {
         installDummyAppAndWaitForUIUpdate();
         try {
@@ -539,6 +548,7 @@
 
     @Test
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testDragAppIconToWorkspaceCell() throws Exception {
         long startTime, endTime, elapsedTime;
         Point[] targets = getCornersAndCenterPositions();
@@ -574,6 +584,7 @@
 
     @Test
     @ScreenRecord // b/241821721
+    @PlatinumTest(focusArea = "launcher")
     public void getIconsPosition_afterIconRemoved_notContained() throws IOException {
         Point[] gridPositions = getCornersAndCenterPositions();
         createShortcutIfNotExist(STORE_APP_NAME, gridPositions[0]);
@@ -600,6 +611,7 @@
 
     @Test
     @PortraitLandscape
+    @PlatinumTest(focusArea = "launcher")
     public void testDragShortcutToWorkspaceCell() throws Exception {
         Point[] targets = getCornersAndCenterPositions();
 
diff --git a/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java b/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java
index 78a006e..6d858e0 100644
--- a/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java
+++ b/tests/src/com/android/launcher3/ui/widget/AddWidgetTest.java
@@ -21,6 +21,7 @@
 import static org.junit.Assert.assertTrue;
 
 import android.platform.test.annotations.IwTest;
+import android.platform.test.annotations.PlatinumTest;
 
 import androidx.test.filters.LargeTest;
 import androidx.test.runner.AndroidJUnit4;
@@ -48,6 +49,7 @@
     @Rule
     public ShellCommandRule mGrantWidgetRule = ShellCommandRule.grantWidgetBind();
 
+    @PlatinumTest(focusArea = "launcher")
     @IwTest(focusArea="launcher")
     @Test
     @PortraitLandscape