Merge "Only show collapse handle when the bottom widgets picker is scrollable" into sc-dev
diff --git a/res/layout/widgets_bottom_sheet_content.xml b/res/layout/widgets_bottom_sheet_content.xml
index a9d523a..85c6488 100644
--- a/res/layout/widgets_bottom_sheet_content.xml
+++ b/res/layout/widgets_bottom_sheet_content.xml
@@ -15,10 +15,12 @@
 -->
 <merge xmlns:android="http://schemas.android.com/apk/res/android">
     <View
+        android:id="@+id/collapse_handle"
         android:layout_width="48dp"
         android:layout_height="2dp"
         android:layout_gravity="center_horizontal"
         android:layout_marginBottom="16dp"
+        android:visibility="gone"
         android:background="?android:attr/textColorSecondary"/>
     <TextView
         style="@style/TextHeadline"
diff --git a/src/com/android/launcher3/widget/WidgetsBottomSheet.java b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
index f18b63e..995ac47 100644
--- a/src/com/android/launcher3/widget/WidgetsBottomSheet.java
+++ b/src/com/android/launcher3/widget/WidgetsBottomSheet.java
@@ -118,6 +118,7 @@
             ViewGroup.LayoutParams layoutParams = widgetsTableScrollView.getLayoutParams();
             layoutParams.height = mMaxTableHeight;
             widgetsTableScrollView.setLayoutParams(layoutParams);
+            findViewById(R.id.collapse_handle).setVisibility(VISIBLE);
         }
     }