Removing state definition from Launcher

State is only maintained is workspace and is used for all the UI

Bug: 67678570
Change-Id: Ie3cce5a1f4ada3913d0480f7918c27460dacbd34
This commit is contained in:
Sunny Goyal
2017-10-18 10:55:56 -07:00
parent 4c7f215651
commit f9403d92fa
10 changed files with 98 additions and 128 deletions

View File

@@ -38,6 +38,7 @@ import com.android.launcher3.DropTarget.DragObject;
import com.android.launcher3.Insettable;
import com.android.launcher3.ItemInfo;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherState;
import com.android.launcher3.PromiseAppInfo;
import com.android.launcher3.R;
import com.android.launcher3.anim.SpringAnimationHandler;
@@ -292,7 +293,7 @@ public class AllAppsContainerView extends RelativeLayout implements DragSource,
@Override
public boolean onLongClick(final View v) {
// When we have exited all apps or are in transition, disregard long clicks
if (!mLauncher.isAppsViewVisible() ||
if (!mLauncher.isInState(LauncherState.ALL_APPS) ||
mLauncher.getWorkspace().isSwitchingState()) return false;
// Return if global dragging is not enabled or we are already dragging
if (!mLauncher.isDraggingEnabled()) return false;