Merging  ub-launcher3-qt-dev, build 5656472

Test: Manual
Bug:125844074 P2 Final UX and animations for Launcher DWB integration
Bug:129985827 P1 [Fully Gestural Navigation] Delay Recents animation when swiping up
Bug:131360075 P1 [Gesture Nav] Polish/finish landscape
Bug:132900132 P1 Apparently, tests start running while provisioning is still in progress
Bug:133009122 P2 Rare flake: dragged launchable to workspace, but the current state is not WORKSPACE; Can't find a launcher object; selector: BySelector [RES='\Qcom.google.android.apps.nexuslauncher:id/apps_view\E']
Bug:133443741 P2 Provide a ImageApi.cropBitmap API between Launcher/UI library
Bug:133765434 P1 [Flaky test] Launching task didn't open a new window
Bug:133867119 P2 Lab-only flake: want to switch from workspace to all apps; Swipe failed to receive an event for the swipe end
Bug:134091263 P1 Can't swipe up
Bug:134164918 P1 STOPSHIP: Disable chips hard-coded value in qt_dev Launcher
Bug:134309036 P1 Immediately dragging up after opening recents causes a flicker with fully gestural navigation enabled
Bug:134309189 P1 Immediately dragging up from recents doesn't open all apps with fully gestural navigation enabled
Bug:134406364 P2 [Multiuser] Pixel launcher crashed after switching to secondary user.
Bug:134559760 P2 Launcher crashed when keeping phone in face enroll page for 2~3 minutes. (fail rate: 3 of 10 trials)
Bug:134707989 P1 List widgets are reinitialized on rotation
Bug:134725160 P2 Swiping up on two-button nav does not hide icons with 3p launcher
Bug:134919468 P2 [Q-Preview4] Quickstep crash on app remaining time tap on Essential phone
Bug:134963243 P4 In multiwindow mode, seeing a shade on scrolling all apps screen.
Bug:134964922 P1 Wrap createLegacyIconExtras in a target sdk check
Bug:134969824 P4 Pixel launcher crashed while resuming chrome video in PIP mode
Bug:134971634 P1 onSystemUiStateChanged and some other binder calls can crash Launcher
Bug:135008910 P1 Launcher with black status bar/nav bar icons
Bug:135038270 P1 Apps getting stuck while switching in the overiew screen.
Bug:135050372 P1 Regression: Can no longer double swipe nav bar from an app to go to all apps in 2-button mode
Bug:135114549 P1 TaskView becomes visible at the end to swipe-down
Bug:issue priority summary

Change-Id: Ief4ecb36f17e168cdeb7aef930bcb051e29dbc02
diff --git a/CleanSpec.mk b/CleanSpec.mk
index b2c5266..f58158f 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -52,6 +52,7 @@
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Launcher2.apk)
 $(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/Launcher2_intermediates)
 $(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/app/Launcher2.apk)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/Launcher3QuickStep)
 
 # ************************************************
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
diff --git a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
index db5515b..60320d6 100644
--- a/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
+++ b/iconloaderlib/src/com/android/launcher3/icons/BaseIconFactory.java
@@ -167,22 +167,19 @@
             mCanvas.setBitmap(null);
         }
 
-        final Bitmap result;
-        if (user != null && !Process.myUserHandle().equals(user)) {
+        if (isInstantApp) {
+            badgeWithDrawable(bitmap, mContext.getDrawable(R.drawable.ic_instant_app_badge));
+        }
+        if (user != null) {
             BitmapDrawable drawable = new FixedSizeBitmapDrawable(bitmap);
             Drawable badged = mPm.getUserBadgedIcon(drawable, user);
             if (badged instanceof BitmapDrawable) {
-                result = ((BitmapDrawable) badged).getBitmap();
+                bitmap = ((BitmapDrawable) badged).getBitmap();
             } else {
-                result = createIconBitmap(badged, 1f);
+                bitmap = createIconBitmap(badged, 1f);
             }
-        } else if (isInstantApp) {
-            badgeWithDrawable(bitmap, mContext.getDrawable(R.drawable.ic_instant_app_badge));
-            result = bitmap;
-        } else {
-            result = bitmap;
         }
-        return BitmapInfo.fromBitmap(result, mDisableColorExtractor ? null : mColorExtractor);
+        return BitmapInfo.fromBitmap(bitmap, mDisableColorExtractor ? null : mColorExtractor);
     }
 
     public Bitmap createScaledBitmapWithoutShadow(Drawable icon, boolean shrinkNonAdaptiveIcons) {
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewInputConsumer.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewInputConsumer.java
index 56db209..b021df8 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewInputConsumer.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/inputconsumers/OverviewInputConsumer.java
@@ -113,4 +113,5 @@
             mActivity.dispatchKeyEvent(ev);
         }
     }
-}
\ No newline at end of file
+}
+
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
index de671e0..6dc672e 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/util/ClipAnimationHelper.java
@@ -417,3 +417,4 @@
         }
     }
 }
+