Fix crash when pausing work profile.

The issue happens when bindFastScrollbar is called during switching to a paused work tab and since there are no
letters to display (no sections in work tab because workProfile is paused) createVerticalChain complains because it needs two views to be
present when there are none. So just early check if there are sections existing will fix this.

bug:373533884
Test manually video: https://drive.google.com/file/d/1K9zdZthHNj4Gbdn-m30KINm3VFfwFfiM/view?usp=sharing
Flag: com.android.launcher3.letter_fast_scroller

Change-Id: I7a8501fa5e7d048fe5a2fe4525f96cc9809cfbfd
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,