[automerger skipped] Import translations. DO NOT MERGE ANYWHERE am: 486c139776 -s ours
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/19550645
Change-Id: I6fd5a953edd3510107060e38db478364125a105a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
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/res/values-as/strings.xml b/res/values-as/strings.xml
index 5fc8ca6..b625aab 100644
--- a/res/values-as/strings.xml
+++ b/res/values-as/strings.xml
@@ -73,7 +73,7 @@
<string name="all_apps_button_work_label" msgid="7270707118948892488">"কৰ্মস্থানৰ এপৰ তালিকা"</string>
<string name="remove_drop_target_label" msgid="7812859488053230776">"আঁতৰাওক"</string>
<string name="uninstall_drop_target_label" msgid="4722034217958379417">"আনইনষ্টল কৰক"</string>
- <string name="app_info_drop_target_label" msgid="692894985365717661">"এপ সম্পৰ্কীয় তথ্য"</string>
+ <string name="app_info_drop_target_label" msgid="692894985365717661">"এপ্ সম্পৰ্কীয় তথ্য"</string>
<string name="install_drop_target_label" msgid="2539096853673231757">"ইনষ্টল কৰক"</string>
<string name="dismiss_prediction_label" msgid="3357562989568808658">"এপৰ পৰামৰ্শ নিদিব"</string>
<string name="pin_prediction" msgid="4196423321649756498">"পূৰ্বানুমান কৰা এপ্টো পিন কৰক"</string>
diff --git a/res/values-or/strings.xml b/res/values-or/strings.xml
index 111b9b2..1181de9 100644
--- a/res/values-or/strings.xml
+++ b/res/values-or/strings.xml
@@ -38,7 +38,7 @@
<string name="widget_accessible_dims_format" msgid="3640149169885301790">"%1$d ଓସାର ଓ %2$d ଉଚ୍ଚ"</string>
<string name="widget_preview_context_description" msgid="9045841361655787574">"<xliff:g id="WIDGET_NAME">%1$s</xliff:g> ୱିଜେଟ୍"</string>
<string name="add_item_request_drag_hint" msgid="8730547755622776606">"ମୂଳସ୍କ୍ରିନର ଆଖପାଖରେ ୱିଜେଟକୁ ମୁଭ କରିବା ପାଇଁ ଏହାକୁ ସ୍ପର୍ଶ କରି ଧରି ରଖନ୍ତୁ"</string>
- <string name="add_to_home_screen" msgid="9168649446635919791">"ମୂଳସ୍କ୍ରିନରେ ଯୋଗ କରନ୍ତୁ"</string>
+ <string name="add_to_home_screen" msgid="9168649446635919791">"ହୋମ ସ୍କ୍ରିନରେ ଯୋଗ କରନ୍ତୁ"</string>
<string name="added_to_home_screen_accessibility_text" msgid="4451545765448884415">"<xliff:g id="WIDGET_NAME">%1$s</xliff:g>ର ୱିଜେଟ୍ ମୂଳସ୍କ୍ରିନରେ ଯୋଡ଼ାଗଲା"</string>
<string name="widgets_count" msgid="6467746476364652096">"{count,plural, =1{#ଟି ୱିଜେଟ୍}other{#ଟି ୱିଜେଟ୍}}"</string>
<string name="shortcuts_count" msgid="8471715556199592381">"{count,plural, =1{#ଟି ସର୍ଟକଟ୍}other{#ଟି ସର୍ଟକଟ୍}}"</string>
@@ -131,7 +131,7 @@
<string name="dialog_remove" msgid="6510806469849709407">"କାଢ଼ି ଦିଅନ୍ତୁ"</string>
<string name="widgets_list" msgid="796804551140113767">"ୱିଜେଟ୍ ତାଲିକା"</string>
<string name="widgets_list_closed" msgid="6141506579418771922">"ୱିଜେଟ୍ ତାଲିକା ବନ୍ଦ ହୋଇଛି"</string>
- <string name="action_add_to_workspace" msgid="215894119683164916">"ମୂଳସ୍କ୍ରିନରେ ଯୋଗ କରନ୍ତୁ"</string>
+ <string name="action_add_to_workspace" msgid="215894119683164916">"ହୋମ ସ୍କ୍ରିନରେ ଯୋଗ କରନ୍ତୁ"</string>
<string name="action_move_here" msgid="2170188780612570250">"ଆଇଟମ୍କୁ ଏଠାକୁ ଘୁଞ୍ଚାନ୍ତୁ"</string>
<string name="item_added_to_workspace" msgid="4211073925752213539">"ହୋମ୍ ସ୍କ୍ରୀନରେ ଆଇଟମ୍ ଯୋଡ଼ାଗଲା"</string>
<string name="item_removed" msgid="851119963877842327">"ଆଇଟମକୁ କାଢ଼ି ଦିଆଯାଇଛି"</string>
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);