Loading quickstep/src/com/android/launcher3/uioverrides/UiFactory.java +12 −0 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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(), Loading quickstep/src/com/android/quickstep/OverviewInteractionState.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; Loading src/com/android/launcher3/Launcher.java +9 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,12 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, L private RotationHelper mRotationHelper; // Used to keep track of the swipe up state private SharedPreferences.OnSharedPreferenceChangeListener mSharedPrefsListener = (sharedPreferences, s) -> { mDragLayer.setup(mDragController); }; @Override protected void onCreate(Bundle savedInstanceState) { if (DEBUG_STRICT_MODE) { Loading Loading @@ -273,6 +279,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, L initDeviceProfile(app.getInvariantDeviceProfile()); mSharedPrefs = Utilities.getPrefs(this); mSharedPrefs.registerOnSharedPreferenceChangeListener(mSharedPrefsListener); mIconCache = app.getIconCache(); mAccessibilityDelegate = new LauncherAccessibilityDelegate(this); Loading Loading @@ -758,6 +765,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, L } NotificationListener.removeNotificationsChangedListener(); getStateManager().moveToRestState(); } @Override Loading Loading @@ -1340,6 +1348,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, L LauncherAppState.getInstance(this).setLauncher(null); } mRotationHelper.destroy(); mSharedPrefs.unregisterOnSharedPreferenceChangeListener(mSharedPrefsListener); try { mAppWidgetHost.stopListening(); Loading Loading
quickstep/src/com/android/launcher3/uioverrides/UiFactory.java +12 −0 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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(), Loading
quickstep/src/com/android/quickstep/OverviewInteractionState.java +1 −1 Original line number Diff line number Diff line Loading @@ -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; Loading
src/com/android/launcher3/Launcher.java +9 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,12 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, L private RotationHelper mRotationHelper; // Used to keep track of the swipe up state private SharedPreferences.OnSharedPreferenceChangeListener mSharedPrefsListener = (sharedPreferences, s) -> { mDragLayer.setup(mDragController); }; @Override protected void onCreate(Bundle savedInstanceState) { if (DEBUG_STRICT_MODE) { Loading Loading @@ -273,6 +279,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, L initDeviceProfile(app.getInvariantDeviceProfile()); mSharedPrefs = Utilities.getPrefs(this); mSharedPrefs.registerOnSharedPreferenceChangeListener(mSharedPrefsListener); mIconCache = app.getIconCache(); mAccessibilityDelegate = new LauncherAccessibilityDelegate(this); Loading Loading @@ -758,6 +765,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, L } NotificationListener.removeNotificationsChangedListener(); getStateManager().moveToRestState(); } @Override Loading Loading @@ -1340,6 +1348,7 @@ public class Launcher extends BaseDraggingActivity implements LauncherExterns, L LauncherAppState.getInstance(this).setLauncher(null); } mRotationHelper.destroy(); mSharedPrefs.unregisterOnSharedPreferenceChangeListener(mSharedPrefsListener); try { mAppWidgetHost.stopListening(); Loading