From 293688a9a06c203d89a1313fbf4cf9c9f06e23ae Mon Sep 17 00:00:00 2001 From: Eddie Lan Date: Thu, 9 Mar 2023 02:29:40 +0000 Subject: [PATCH] Revert "Hide the splash icon when launching with no view and no ..." Revert submission 21447384-no-splash Reason for revert: build break Bug: 272383391 Reverted changes: /q/submissionid:21447384-no-splash Change-Id: I73565b1f4e5dd969237980b2b5dbeee7b563abcb --- .../launcher3/uioverrides/QuickstepLauncher.java | 8 ++++---- src/com/android/launcher3/LauncherSettings.java | 4 ---- src/com/android/launcher3/views/ActivityContext.java | 10 +--------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index b9a05ea93a..3dbe6c8d3f 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -20,11 +20,10 @@ import static android.os.Trace.TRACE_TAG_APP; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_OPTIMIZE_MEASURE; import static android.view.accessibility.AccessibilityEvent.TYPE_VIEW_FOCUSED; -import static com.android.launcher3.LauncherSettings.Animation.DEFAULT_NO_ICON; -import static com.android.launcher3.LauncherSettings.Animation.VIEW_BACKGROUND; import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT; import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APPLICATION; import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT; +import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_SEARCH_ACTION; import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT; import static com.android.launcher3.LauncherState.ALL_APPS; import static com.android.launcher3.LauncherState.NORMAL; @@ -170,6 +169,7 @@ import com.android.quickstep.views.FloatingTaskView; import com.android.quickstep.views.OverviewActionsView; import com.android.quickstep.views.RecentsView; import com.android.quickstep.views.TaskView; +import com.android.systemui.shared.recents.model.Task; import com.android.systemui.shared.system.ActivityManagerWrapper; import com.android.systemui.unfold.RemoteUnfoldSharedComponent; import com.android.systemui.unfold.UnfoldSharedComponent; @@ -187,6 +187,7 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.Objects; +import java.util.function.Consumer; import java.util.function.Predicate; import java.util.stream.Stream; @@ -1049,8 +1050,7 @@ public class QuickstepLauncher extends Launcher { activityOptions.options.setSourceInfo(ActivityOptions.SourceInfo.TYPE_LAUNCHER, mLastTouchUpTime); } - if (item != null && (item.animationType == DEFAULT_NO_ICON - || item.animationType == VIEW_BACKGROUND)) { + if (item != null && item.itemType == ITEM_TYPE_SEARCH_ACTION) { activityOptions.options.setSplashScreenStyle( SplashScreen.SPLASH_SCREEN_STYLE_SOLID_COLOR); } else { diff --git a/src/com/android/launcher3/LauncherSettings.java b/src/com/android/launcher3/LauncherSettings.java index 76cae6afce..66ea616ffe 100644 --- a/src/com/android/launcher3/LauncherSettings.java +++ b/src/com/android/launcher3/LauncherSettings.java @@ -41,10 +41,6 @@ public class LauncherSettings { * An animation using the view's background. */ public static final int VIEW_BACKGROUND = 1; - /** - * The default animation for a given view/item info type, but without the splash icon. - */ - public static final int DEFAULT_NO_ICON = 2; } /** diff --git a/src/com/android/launcher3/views/ActivityContext.java b/src/com/android/launcher3/views/ActivityContext.java index 10f40b7124..b6f622359e 100644 --- a/src/com/android/launcher3/views/ActivityContext.java +++ b/src/com/android/launcher3/views/ActivityContext.java @@ -45,7 +45,6 @@ import android.view.WindowInsets; import android.view.WindowInsetsController; import android.view.inputmethod.InputMethodManager; import android.widget.Toast; -import android.window.SplashScreen; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -321,14 +320,7 @@ public interface ActivityContext { return false; } - Bundle optsBundle = null; - if (v != null) { - optsBundle = getActivityLaunchOptions(v, item).toBundle(); - } else if (item != null && item.animationType == LauncherSettings.Animation.DEFAULT_NO_ICON - && Utilities.ATLEAST_T) { - optsBundle = ActivityOptions.makeBasic() - .setSplashScreenStyle(SplashScreen.SPLASH_SCREEN_STYLE_SOLID_COLOR).toBundle(); - } + Bundle optsBundle = (v != null) ? getActivityLaunchOptions(v, item).toBundle() : null; UserHandle user = item == null ? null : item.user; // Prepare intent