Merge "Fix crash when pausing work profile." into main

This commit is contained in:
Brandon Dayauon
2024-10-30 17:17:31 +00:00
committed by Android (Google) Code Review
@@ -331,6 +331,9 @@ public class AllAppsRecyclerView extends FastScrollRecyclerView {
public void setLettersToScrollLayout(
List<AlphabeticalAppsList.FastScrollSectionInfo> fastScrollSections) {
if (fastScrollSections.isEmpty()) {
return;
}
if (mLetterList != null) {
mLetterList.removeAllViews();
}
@@ -364,6 +367,8 @@ public class AllAppsRecyclerView extends FastScrollRecyclerView {
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,