Merge "Fix crash when pausing work profile." into main
diff --git a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
index e705d94..51d1c9f 100644
--- a/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
+++ b/src/com/android/launcher3/allapps/AllAppsRecyclerView.java
@@ -331,6 +331,9 @@
public void setLettersToScrollLayout(
List<AlphabeticalAppsList.FastScrollSectionInfo> fastScrollSections) {
+ if (fastScrollSections.isEmpty()) {
+ return;
+ }
if (mLetterList != null) {
mLetterList.removeAllViews();
}
@@ -364,6 +367,8 @@
mLetterList.addView(lastLetterListTextView);
constraintTextViewsVertically(mLetterList, textViews);
mLetterList.setVisibility(VISIBLE);
+ // Set the alpha to 0 to avoid the letter list being shown when it shouldn't be.
+ mLetterList.setAlpha(0);
}
private void constraintTextViewsVertically(ConstraintLayout constraintLayout,