Fix flicker when opening transient taskbar

When transient taskbar is opened, launcher state updates to background
and then quickswitch. Quickswitch launches the last task which is the
DesktopTaskView when desktop tasks are visible.
DesktopTaskView launchTasks is called which ensures that desktop tasks
are visible on top again and launcher state updates to normal.
If launcher state moves to normal with animation, the task views for any
visible desktop task flicker on screen. To remove this flicker, stop
animating state transitions when moving from DesktopTaskView back to
home screen.
This can be readdressed when implement a proper recents animation.

Bug: 263264985
Test: enable transient taskbar, put some tasks on desktop,
  swipe up to show transient taskbar, observe no flicker
Test: have some tasks on desktop, swipe up to overview, click on desktop
  tile, observe they are brought to front
Change-Id: I6ee5c55d9b805d6ef6d58ea137e697ccd40cda29
diff --git a/quickstep/src/com/android/quickstep/views/DesktopTaskView.java b/quickstep/src/com/android/quickstep/views/DesktopTaskView.java
index 858f6ab..44aa41a 100644
--- a/quickstep/src/com/android/quickstep/views/DesktopTaskView.java
+++ b/quickstep/src/com/android/quickstep/views/DesktopTaskView.java
@@ -18,6 +18,7 @@
 
 import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
 
+import static com.android.launcher3.LauncherState.NORMAL;
 import static com.android.launcher3.util.SplitConfigurationOptions.STAGE_POSITION_UNDEFINED;
 
 import android.content.Context;
@@ -35,6 +36,7 @@
 import androidx.annotation.Nullable;
 
 import com.android.launcher3.DeviceProfile;
+import com.android.launcher3.Launcher;
 import com.android.launcher3.Utilities;
 import com.android.launcher3.touch.PagedOrientationHandler;
 import com.android.launcher3.util.RunnableList;
@@ -295,7 +297,7 @@
     @Override
     public RunnableList launchTasks() {
         SystemUiProxy.INSTANCE.get(getContext()).showDesktopApps();
-        getRecentsView().startHome();
+        Launcher.getLauncher(mActivity).getStateManager().goToState(NORMAL, false /* animated */);
         return null;
     }