[automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 1fe3df2f33 -s ours

am skip reason: subject contains skip directive

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19550646

Change-Id: Idf59710124730649efc0401035a652109f7e4c9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/go/quickstep/res/values-or/strings.xml b/go/quickstep/res/values-or/strings.xml
index 36de437..6a3c5dc 100644
--- a/go/quickstep/res/values-or/strings.xml
+++ b/go/quickstep/res/values-or/strings.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <resources xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-    <string name="app_share_drop_target_label" msgid="5804774105974539508">"ଆପ୍ ସେୟାର୍ କରନ୍ତୁ"</string>
+    <string name="app_share_drop_target_label" msgid="5804774105974539508">"ଆପ ସେୟାର କରନ୍ତୁ"</string>
     <string name="action_listen" msgid="2370304050784689486">"ଶୁଣନ୍ତୁ"</string>
     <string name="action_translate" msgid="8028378961867277746">"ଅନୁବାଦ କରନ୍ତୁ"</string>
     <string name="action_search" msgid="6269564710943755464">"Lens"</string>
diff --git a/quickstep/res/layout/activity_allset.xml b/quickstep/res/layout/activity_allset.xml
index 0cae733..56e1d16 100644
--- a/quickstep/res/layout/activity_allset.xml
+++ b/quickstep/res/layout/activity_allset.xml
@@ -26,7 +26,7 @@
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:id="@+id/content_view"
-        android:fitsSystemWindows="true">
+        android:fitsSystemWindows="false">
 
         <com.airbnb.lottie.LottieAnimationView
             android:id="@+id/animated_background"
diff --git a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
index 5680170..47bb3cf 100644
--- a/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
+++ b/quickstep/src/com/android/quickstep/interaction/AllSetActivity.java
@@ -82,6 +82,8 @@
 
     private static final int MAX_SWIPE_DURATION = 350;
 
+    private static final float ANIMATION_PAUSE_ALPHA_THRESHOLD = 0.1f;
+
     private TISBindHelper mTISBindHelper;
     private TISBinder mBinder;
 
@@ -144,6 +146,10 @@
     }
 
     private void runOnUiHelperThread(Runnable runnable) {
+        if (!isResumed()
+                || getContentViewAlphaForSwipeProgress() <= ANIMATION_PAUSE_ALPHA_THRESHOLD) {
+            return;
+        }
         Executors.UI_HELPER_EXECUTOR.execute(runnable);
     }
 
@@ -192,6 +198,7 @@
     @Override
     protected void onResume() {
         super.onResume();
+        maybeResumeOrPauseBackgroundAnimation();
         if (mBinder != null) {
             mBinder.getTaskbarManager().setSetupUIVisible(true);
             mBinder.setSwipeUpProxy(this::createSwipeUpProxy);
@@ -210,6 +217,7 @@
     protected void onPause() {
         super.onPause();
         clearBinderOverride();
+        maybeResumeOrPauseBackgroundAnimation();
         if (mSwipeProgress.value >= 1) {
             finishAndRemoveTask();
         }
@@ -244,10 +252,25 @@
         return mSwipeProgress;
     }
 
+    private float getContentViewAlphaForSwipeProgress() {
+        return Utilities.mapBoundToRange(
+                mSwipeProgress.value, 0, HINT_BOTTOM_FACTOR, 1, 0, LINEAR);
+    }
+
+    private void maybeResumeOrPauseBackgroundAnimation() {
+        boolean shouldPlayAnimation =
+                getContentViewAlphaForSwipeProgress() > ANIMATION_PAUSE_ALPHA_THRESHOLD
+                        && isResumed();
+        if (mAnimatedBackground.isAnimating() && !shouldPlayAnimation) {
+            mAnimatedBackground.pauseAnimation();
+        } else if (!mAnimatedBackground.isAnimating() && shouldPlayAnimation) {
+            mAnimatedBackground.resumeAnimation();
+        }
+    }
+
     private void onSwipeProgressUpdate() {
         mBackground.setProgress(mSwipeProgress.value);
-        float alpha = Utilities.mapBoundToRange(
-                mSwipeProgress.value, 0, HINT_BOTTOM_FACTOR, 1, 0, LINEAR);
+        float alpha = getContentViewAlphaForSwipeProgress();
         mContentView.setAlpha(alpha);
         mContentView.setTranslationY((alpha - 1) * mSwipeUpShift);
 
@@ -259,12 +282,7 @@
             mLauncherStartAnim.setPlayFraction(Utilities.mapBoundToRange(
                     mSwipeProgress.value, 0, 1, 0, 1, FAST_OUT_SLOW_IN));
         }
-
-        if (alpha == 0f) {
-            mAnimatedBackground.pauseAnimation();
-        } else if (!mAnimatedBackground.isAnimating()) {
-            mAnimatedBackground.resumeAnimation();
-        }
+        maybeResumeOrPauseBackgroundAnimation();
     }
 
     /**
diff --git a/src/com/android/launcher3/model/LoaderCursor.java b/src/com/android/launcher3/model/LoaderCursor.java
index ae5b66a..87e8ebf 100644
--- a/src/com/android/launcher3/model/LoaderCursor.java
+++ b/src/com/android/launcher3/model/LoaderCursor.java
@@ -291,12 +291,16 @@
 
         // from the db
         if (TextUtils.isEmpty(info.title)) {
-            info.title = getTitle();
-        }
+            if (loadIcon) {
+                info.title = getTitle();
 
-        // fall back to the class name of the activity
-        if (info.title == null) {
-            info.title = componentName.getClassName();
+                // fall back to the class name of the activity
+                if (info.title == null) {
+                    info.title = componentName.getClassName();
+                }
+            } else {
+                info.title = "";
+            }
         }
 
         info.contentDescription = mPM.getUserBadgedLabel(info.title, info.user);