boolean allowLongPress = isHotseatLayout(v) || mWorkspace.allowLongPress();
if (allowLongPress && !mDragController.isDragging()) {
if (itemUnderLongClick == null) {
- if (mWorkspace.hasNonCustomEmptyScreens()) {
- // User long pressed on empty space
- mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
- HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
- // Disabling reordering until we sort out some issues.
- if (mWorkspace.isInOverviewMode()) {
- mWorkspace.startReordering(v);
- } else {
- mWorkspace.enterOverviewMode();
- }
+ // User long pressed on empty space
+ mWorkspace.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS,
+ HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
+ // Disabling reordering until we sort out some issues.
+ if (mWorkspace.isInOverviewMode()) {
+ mWorkspace.startReordering(v);
+ } else {
+ mWorkspace.enterOverviewMode();
}
} else {
if (!(itemUnderLongClick instanceof Folder)) {
return -1;
}
- public boolean hasNonCustomEmptyScreens() {
- Launcher.addDumpLog(TAG, "10249126 - hasNonCustomEmptyScreens()", true);
- Iterator<Long> iter = mWorkspaceScreens.keySet().iterator();
- while (iter.hasNext()) {
- long id = iter.next();
- if (id >= 0) {
- return true;
- }
- }
- return false;
- }
-
ArrayList<Long> getScreenOrder() {
return mScreenOrder;
}