Merge "Dismiss AllApps when scrim is clicked"

This commit is contained in:
Alex Chau authored and Android (Google) Code Review committed 2022-01-28 11:58:26 +00:00
commit bc8a71153d
1 file changed
+6
@@ -21,6 +21,7 @@ import static android.view.MotionEvent.ACTION_MOVE;
import static android.view.MotionEvent.ACTION_POINTER_UP;
import static android.view.MotionEvent.ACTION_UP;
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_WORKSPACE_LONGPRESS;
@@ -150,6 +151,11 @@ public class WorkspaceTouchListener extends GestureDetector.SimpleOnGestureListe
if (action == ACTION_UP || action == ACTION_CANCEL) {
cancelLongPress();
}
if (action == ACTION_UP
&& mLauncher.isInState(ALL_APPS)
&& mLauncher.getDeviceProfile().isTablet) {
mLauncher.getStateManager().goToState(NORMAL);
}
return result;
}