OSDN Git Service

Close Folder when opening WidgetsBottomSheet
authorTony Wickham <twickham@google.com>
Mon, 1 May 2017 15:44:35 +0000 (08:44 -0700)
committerTony Wickham <twickham@google.com>
Tue, 2 May 2017 20:48:30 +0000 (13:48 -0700)
Dragging a shortcut from the bottom sheet to the open folder crashes.

Bug: 37810233
Change-Id: I82c953dd67528f9f1bc5a678650e87215af347a2

src/com/android/launcher3/popup/SystemShortcut.java

index e48e349..81460e4 100644 (file)
@@ -4,6 +4,7 @@ import android.content.Context;
 import android.graphics.drawable.Drawable;
 import android.view.View;
 
+import com.android.launcher3.AbstractFloatingView;
 import com.android.launcher3.InfoDropTarget;
 import com.android.launcher3.ItemInfo;
 import com.android.launcher3.Launcher;
@@ -60,7 +61,7 @@ public abstract class SystemShortcut {
             return new View.OnClickListener() {
                 @Override
                 public void onClick(View view) {
-                    PopupContainerWithArrow.getOpen(launcher).close(true);
+                    AbstractFloatingView.closeAllOpenViews(launcher);
                     WidgetsBottomSheet widgetsBottomSheet =
                             (WidgetsBottomSheet) launcher.getLayoutInflater().inflate(
                                     R.layout.widgets_bottom_sheet, launcher.getDragLayer(), false);