summaryrefslogtreecommitdiff
path: root/quickstep/src/com/android/launcher3/appprediction
diff options
context:
space:
mode:
Diffstat (limited to 'quickstep/src/com/android/launcher3/appprediction')
-rw-r--r--quickstep/src/com/android/launcher3/appprediction/AppsDividerView.java7
-rw-r--r--quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java5
2 files changed, 6 insertions, 6 deletions
diff --git a/quickstep/src/com/android/launcher3/appprediction/AppsDividerView.java b/quickstep/src/com/android/launcher3/appprediction/AppsDividerView.java
index e8374b813c..037f7a8fea 100644
--- a/quickstep/src/com/android/launcher3/appprediction/AppsDividerView.java
+++ b/quickstep/src/com/android/launcher3/appprediction/AppsDividerView.java
@@ -35,9 +35,7 @@ import androidx.core.content.ContextCompat;
import com.android.launcher3.R;
import com.android.launcher3.allapps.FloatingHeaderRow;
import com.android.launcher3.allapps.FloatingHeaderView;
-import com.android.launcher3.util.OnboardingPrefs;
import com.android.launcher3.util.Themes;
-import com.android.launcher3.views.ActivityContext;
/**
* A view which shows a horizontal divider
@@ -93,10 +91,7 @@ public class AppsDividerView extends View implements FloatingHeaderRow {
? R.color.all_apps_label_text_dark
: R.color.all_apps_label_text);
- OnboardingPrefs<?> onboardingPrefs = ActivityContext.lookupContext(
- getContext()).getOnboardingPrefs();
- mShowAllAppsLabel = onboardingPrefs == null || !onboardingPrefs.hasReachedMaxCount(
- ALL_APPS_VISITED_COUNT);
+ mShowAllAppsLabel = !ALL_APPS_VISITED_COUNT.hasReachedMax(context);
}
public void setup(FloatingHeaderView parent, FloatingHeaderRow[] rows, boolean tabsHidden) {
diff --git a/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java b/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java
index f82474a8e8..1440498e15 100644
--- a/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java
+++ b/quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java
@@ -36,6 +36,7 @@ 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;
@@ -126,6 +127,10 @@ public class PredictionRowView<T extends Context & ActivityContext>
int verticalPadding = getResources().getDimensionPixelSize(
R.dimen.all_apps_predicted_icon_vertical_padding);
int totalHeight = iconHeight + iconPadding + textHeight + verticalPadding * 2;
+ if (FeatureFlags.enableTwolineAllapps()) {
+ // Add extra textHeight to the existing total height.
+ totalHeight += textHeight;
+ }
return getVisibility() == GONE ? 0 : totalHeight + getPaddingTop() + getPaddingBottom();
}