Don't close all apps when touching deep shortcuts container.

Bug: 31373894
Change-Id: Ica1d0c2318e8f5d3e45196174c9b495a1c2515cd
This commit is contained in:
Tony Wickham
2016-09-08 14:20:48 -07:00
parent 285c76dded
commit 946f85060a

View File

@@ -52,7 +52,6 @@ import com.android.launcher3.dragndrop.DragOptions;
import com.android.launcher3.folder.Folder;
import com.android.launcher3.graphics.TintedDrawableSpan;
import com.android.launcher3.keyboard.FocusedItemDecorator;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Target;
import com.android.launcher3.util.ComponentKey;
@@ -278,6 +277,12 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
if (mAppsRecyclerView.getScrollBar().isNearThumb(point[0], point[1])) {
return false;
}
// IF a shortcuts container is open, container should not be pulled down.
if (mLauncher.getOpenShortcutsContainer() != null) {
return false;
}
// IF scroller is at the very top OR there is no scroll bar because there is probably not
// enough items to scroll, THEN it's okay for the container to be pulled down.
if (mAppsRecyclerView.getScrollBar().getThumbOffset().y <= 0) {