From 5461089baa474da4b59bdb20fb5bfe882f0f68f2 Mon Sep 17 00:00:00 2001 From: Samuel Fufa Date: Tue, 6 Apr 2021 04:05:13 -0500 Subject: [PATCH] [Search][Layout] Fix blank space when predictions are disabled This regression is caused due to getExpectedHeight relying on view visibility state while AlphaUpdateListener.updateVisibility was reseting the views visibility. Bug: 184211402 Test: local Change-Id: Ib756f5eb8f6356a18a025626008b97fd7c77fec9 --- .../android/launcher3/appprediction/PredictionRowView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java b/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java index 8e92b59ae1..cc3ccea4d0 100644 --- a/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java +++ b/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java @@ -237,7 +237,9 @@ public class PredictionRowView extends LinearLayout implements setTranslationY(scroll); } setAlpha(mScrolledOut ? 0 : 1); - AlphaUpdateListener.updateVisibility(this); + if (getVisibility() != GONE) { + AlphaUpdateListener.updateVisibility(this); + } } @Override