summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorJon Miranda <jonmiranda@google.com>2019-09-09 15:15:37 -0700
committerJonathan Miranda <jonmiranda@google.com>2019-09-09 22:29:49 +0000
commit36e39535388b3621642292ec300c291a1e8096a2 (patch)
treebd23dc632d0aa129ffaf64326011387fd88ff8f1 /src/com
parent478414a7c3318c57f35a3413d0e2a5d7afcaa2f9 (diff)
parent735d1fe124812fd11feabc644c9a4f8482039f57 (diff)
downloadandroid_packages_apps_Trebuchet-36e39535388b3621642292ec300c291a1e8096a2.tar.gz
android_packages_apps_Trebuchet-36e39535388b3621642292ec300c291a1e8096a2.tar.bz2
android_packages_apps_Trebuchet-36e39535388b3621642292ec300c291a1e8096a2.zip
[DO NOT MERGE] Merge commit '735d1fe124812fd11feabc644c9a4f8482039f57' into manual_merge_735d1fe124812fd11feabc644c9a4f8482039f57
The ub-launcher3-qt-future-dev branch cut missed the CLs that went into ub-launcher3-master, so the merge failed Change-Id: I4f6f5ca8323350af3bc84c72d61d935b36f8064f
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/launcher3/Launcher.java8
-rw-r--r--src/com/android/launcher3/compat/PackageInstallerCompatVL.java5
2 files changed, 8 insertions, 5 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 61d05c1e6..b559e093a 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -158,6 +158,9 @@ import java.util.HashSet;
import java.util.List;
import java.util.function.Predicate;
+import androidx.annotation.Nullable;
+import androidx.annotation.VisibleForTesting;
+
/**
* Default launcher application.
*/
@@ -209,10 +212,9 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns,
private static final int ON_ACTIVITY_RESULT_ANIMATION_DELAY = 500;
// How long to wait before the new-shortcut animation automatically pans the workspace
- private static final int NEW_APPS_PAGE_MOVE_DELAY = 500;
+ @VisibleForTesting public static final int NEW_APPS_PAGE_MOVE_DELAY = 500;
private static final int NEW_APPS_ANIMATION_INACTIVE_TIMEOUT_SECONDS = 5;
- @Thunk
- static final int NEW_APPS_ANIMATION_DELAY = 500;
+ @Thunk @VisibleForTesting public static final int NEW_APPS_ANIMATION_DELAY = 500;
private static final int APPS_VIEW_ALPHA_CHANNEL_INDEX = 1;
private static final int SCRIM_VIEW_ALPHA_CHANNEL_INDEX = 0;
diff --git a/src/com/android/launcher3/compat/PackageInstallerCompatVL.java b/src/com/android/launcher3/compat/PackageInstallerCompatVL.java
index c423d13ae..c5a1bcc8e 100644
--- a/src/com/android/launcher3/compat/PackageInstallerCompatVL.java
+++ b/src/com/android/launcher3/compat/PackageInstallerCompatVL.java
@@ -139,14 +139,15 @@ public class PackageInstallerCompatVL extends PackageInstallerCompat {
* Add a promise app icon to the workspace iff:
* - The settings for it are enabled
* - The user installed the app
- * - There is a provided app icon (For apps with no launching activity, no icon is provided).
+ * - There is an app icon and label (For apps with no launching activity, no icon is provided).
*/
private void tryQueuePromiseAppIcon(SessionInfo sessionInfo) {
if (Utilities.ATLEAST_OREO && FeatureFlags.PROMISE_APPS_NEW_INSTALLS.get()
&& SessionCommitReceiver.isEnabled(mAppContext)
- && sessionInfo != null
+ && verify(sessionInfo) != null
&& sessionInfo.getInstallReason() == PackageManager.INSTALL_REASON_USER
&& sessionInfo.getAppIcon() != null
+ && !TextUtils.isEmpty(sessionInfo.getAppLabel())
&& !mPromiseIconIds.contains(sessionInfo.getSessionId())) {
SessionCommitReceiver.queuePromiseAppIconAddition(mAppContext, sessionInfo);
mPromiseIconIds.add(sessionInfo.getSessionId());