Highlight the tab for the first time

FIXES: 71748023

Change-Id: I051789172a1869ceb950eb5dbbf15e3eeb60ed64
diff --git a/src/com/android/launcher3/allapps/AllAppsContainerView.java b/src/com/android/launcher3/allapps/AllAppsContainerView.java
index af7ca51..60b3f83 100644
--- a/src/com/android/launcher3/allapps/AllAppsContainerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsContainerView.java
@@ -591,7 +591,7 @@
 
     public void onScrollUpEnd() {
         if (mUsingTabs) {
-            ((PersonalWorkSlidingTabStrip) findViewById(R.id.tabs)).peekWorkTabIfNecessary();
+            ((PersonalWorkSlidingTabStrip) findViewById(R.id.tabs)).highlightWorkTabIfNecessary();
         }
     }
 
diff --git a/src/com/android/launcher3/allapps/PersonalWorkSlidingTabStrip.java b/src/com/android/launcher3/allapps/PersonalWorkSlidingTabStrip.java
index 393884e..d63f61d 100644
--- a/src/com/android/launcher3/allapps/PersonalWorkSlidingTabStrip.java
+++ b/src/com/android/launcher3/allapps/PersonalWorkSlidingTabStrip.java
@@ -15,7 +15,6 @@
  */
 package com.android.launcher3.allapps;
 
-import android.animation.ValueAnimator;
 import android.content.Context;
 import android.content.SharedPreferences;
 import android.graphics.Canvas;
@@ -30,7 +29,6 @@
 import com.android.launcher3.Launcher;
 import com.android.launcher3.R;
 import com.android.launcher3.Utilities;
-import com.android.launcher3.anim.Interpolators;
 import com.android.launcher3.util.Themes;
 
 /**
@@ -39,8 +37,6 @@
 public class PersonalWorkSlidingTabStrip extends LinearLayout {
     private static final int POSITION_PERSONAL = 0;
     private static final int POSITION_WORK = 1;
-    private static final int PEEK_DURATION = 1000;
-    private static final float PEAK_OFFSET = 0.4f;
 
     private static final String KEY_SHOWED_PEEK_WORK_TAB = "showed_peek_work_tab";
 
@@ -157,25 +153,22 @@
         return isPersonal ? mPersonalTabIndicatorPaint : mWorkTabIndicatorPaint;
     }
 
-    public void peekWorkTabIfNecessary() {
+    public void highlightWorkTabIfNecessary() {
         if (mSharedPreferences.getBoolean(KEY_SHOWED_PEEK_WORK_TAB, false)) {
             return;
         }
         if (mIndicatorPosition != POSITION_PERSONAL) {
             return;
         }
-        peekWorkTab();
+        highlightWorkTab();
         mSharedPreferences.edit().putBoolean(KEY_SHOWED_PEEK_WORK_TAB, true).apply();
     }
 
-    private void peekWorkTab() {
-        final boolean isRtl = Utilities.isRtl(getResources());
-        ValueAnimator animator = ValueAnimator.ofFloat(0, isRtl ? 1 - PEAK_OFFSET : PEAK_OFFSET, 0);
-        animator.setDuration(PEEK_DURATION);
-        animator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
-        animator.addUpdateListener(
-                animation -> updateIndicatorPosition(mIndicatorPosition,
-                        (float) animation.getAnimatedValue()));
-        animator.start();
+    private void highlightWorkTab() {
+        View v = getChildAt(POSITION_WORK);
+        v.post(() -> {
+            v.setPressed(true);
+            v.setPressed(false);
+        });
     }
 }