From 37845c540b7de77cf4e9220d2da1764a280d350d Mon Sep 17 00:00:00 2001 From: Anushree Ganjam Date: Wed, 3 Apr 2024 18:28:11 -0700 Subject: [PATCH] Add dump for PredictionRowView. adb shell dumpsys activity NexusLauncherActivity : https://paste.googleplex.com/4907497231482880 When AllApps prediction is off : https://paste.googleplex.com/5930628737925120 Bug: 332171918 Test: Manual Flag: NA Change-Id: I753ff876aab162026d99fd1b35f63edf2e712f70 (cherry picked from commit 1115b416bb3a68c4bf8cbe643fee82daaa8e2a51) --- .../launcher3/appprediction/PredictionRowView.java | 9 ++++++++- .../android/launcher3/uioverrides/QuickstepLauncher.java | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java b/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java index b36fd662fe..3e9272d435 100644 --- a/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java +++ b/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java @@ -37,7 +37,6 @@ import com.android.launcher3.Utilities; import com.android.launcher3.allapps.FloatingHeaderRow; import com.android.launcher3.allapps.FloatingHeaderView; import com.android.launcher3.anim.AlphaUpdateListener; -import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.keyboard.FocusIndicatorHelper; import com.android.launcher3.keyboard.FocusIndicatorHelper.SimpleFocusIndicatorHelper; import com.android.launcher3.model.data.ItemInfo; @@ -45,6 +44,7 @@ import com.android.launcher3.model.data.ItemInfoWithIcon; import com.android.launcher3.model.data.WorkspaceItemInfo; import com.android.launcher3.views.ActivityContext; +import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; @@ -281,4 +281,11 @@ public class PredictionRowView return getChildAt(0); } + public void dump(String prefix, PrintWriter writer) { + writer.println(prefix + this.getClass().getSimpleName()); + writer.println(prefix + "\tmPredictionsEnabled: " + mPredictionsEnabled); + writer.println(prefix + "\tmPredictionUiUpdatePaused: " + mPredictionUiUpdatePaused); + writer.println(prefix + "\tmNumPredictedAppsPerRow: " + mNumPredictedAppsPerRow); + writer.println(prefix + "\tmPredictedApps: " + mPredictedApps); + } } diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java index 10a7ff67d4..1ea2cdc640 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java @@ -1414,6 +1414,10 @@ public class QuickstepLauncher extends Launcher { if (mHotseatPredictionController != null) { mHotseatPredictionController.dump(prefix, writer); } + PredictionRowView predictionRowView = + getAppsView().getFloatingHeaderView().findFixedRowByType( + PredictionRowView.class); + predictionRowView.dump(prefix, writer); } @Override