diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-09-12 21:42:36 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-09-12 21:42:36 +0000 |
commit | 26f21d523115561e033d710cb2fcee7c2bd21ea3 (patch) | |
tree | 1bd588b129c1c82d780ce47f1258750d58139b20 /src | |
parent | 52e551e73445adb0134e953c32744f83aaf33f08 (diff) | |
parent | 36e39535388b3621642292ec300c291a1e8096a2 (diff) | |
download | packages_apps_Trebuchet-26f21d523115561e033d710cb2fcee7c2bd21ea3.tar.gz packages_apps_Trebuchet-26f21d523115561e033d710cb2fcee7c2bd21ea3.tar.bz2 packages_apps_Trebuchet-26f21d523115561e033d710cb2fcee7c2bd21ea3.zip |
Merge "[DO NOT MERGE] Merge commit '735d1fe124812fd11feabc644c9a4f8482039f57' into manual_merge_735d1fe124812fd11feabc644c9a4f8482039f57" into ub-launcher3-qt-future-dev
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/launcher3/Launcher.java | 8 | ||||
-rw-r--r-- | src/com/android/launcher3/compat/PackageInstallerCompatVL.java | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 2df4adced..d667e8c0c 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()); |