Disable the two-swipe when quickstep is disabled.

Change-Id: I5eee57def216406fd8f7766ba4b87cd5de98f0a4
This commit is contained in:
Winson Chung committed 2018-03-21 17:50:29 -07:00
1 parent 9869f75825
commit edb0d6b429
3 files changed
+22 -1

No files matched your search

@@ -16,7 +16,11 @@
package com.android.launcher3.uioverrides;
import static com.android.launcher3.Utilities.getPrefs;
import static com.android.quickstep.OverviewInteractionState.KEY_SWIPE_UP_ENABLED;
import android.content.Context;
import android.content.SharedPreferences;
import android.view.View;
import android.view.View.AccessibilityDelegate;
@@ -33,6 +37,14 @@ import com.android.quickstep.views.RecentsView;
public class UiFactory {
public static TouchController[] createTouchControllers(Launcher launcher) {
SharedPreferences prefs = getPrefs(launcher);
boolean swipeUpEnabled = prefs.getBoolean(KEY_SWIPE_UP_ENABLED, true);
if (!swipeUpEnabled) {
return new TouchController[] {
launcher.getDragController(),
new LandscapeStatesTouchController(launcher),
new TaskViewTouchController(launcher)};
}
if (launcher.getDeviceProfile().isVerticalBarLayout()) {
return new TouchController[] {
launcher.getDragController(),
@@ -70,7 +70,7 @@ public class OverviewInteractionState implements OnSharedPreferenceChangeListene
return INSTANCE;
}
private static final String KEY_SWIPE_UP_ENABLED = "pref_enable_quickstep";
public static final String KEY_SWIPE_UP_ENABLED = "pref_enable_quickstep";
private static final int MSG_SET_PROXY = 200;
private static final int MSG_SET_BACK_BUTTON_VISIBLE = 201;