Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16b07c54 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add ALLOW_SLIPPERY_TOUCHES to make StatusBarTouchController slippery"...

Merge "Add ALLOW_SLIPPERY_TOUCHES to make StatusBarTouchController slippery" into sc-dev am: c0231f8d am: f58691ae

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16444734

Change-Id: I6cfcbd67165461e3e649ece3d92fd1f292e475b9
parents 8fdd7396 f58691ae
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
    <uses-permission android:name="android.permission.READ_FRAME_BUFFER"/>
    <uses-permission android:name="android.permission.MANAGE_ACCESSIBILITY"/>
    <uses-permission android:name="android.permission.MONITOR_INPUT"/>
    <uses-permission android:name="android.permission.ALLOW_SLIPPERY_TOUCHES"/>

    <uses-permission android:name="android.permission.SYSTEM_APPLICATION_OVERLAY" />

+10 −11
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import static android.view.MotionEvent.ACTION_CANCEL;
import static android.view.MotionEvent.ACTION_DOWN;
import static android.view.MotionEvent.ACTION_MOVE;
import static android.view.MotionEvent.ACTION_UP;
import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY;

import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SWIPE_DOWN_WORKSPACE_NOTISHADE_OPEN;

@@ -47,17 +48,6 @@ public class StatusBarTouchController implements TouchController {

    private static final String TAG = "StatusBarController";

    /**
     * Window flag: Enable touches to slide out of a window into neighboring
     * windows in mid-gesture instead of being captured for the duration of
     * the gesture.
     *
     * This flag changes the behavior of touch focus for this window only.
     * Touches can slide out of the window but they cannot necessarily slide
     * back in (unless the other window with touch focus permits it).
     */
    private static final int FLAG_SLIPPERY = 0x20000000;

    private final Launcher mLauncher;
    private final SystemUiProxy mSystemUiProxy;
    private final float mTouchSlop;
@@ -140,6 +130,15 @@ public class StatusBarTouchController implements TouchController {
        return true;
    }

    /**
     * FLAG_SLIPPERY enables touches to slide out of a window into neighboring
     * windows in mid-gesture instead of being captured for the duration of
     * the gesture.
     *
     * This flag changes the behavior of touch focus for this window only.
     * Touches can slide out of the window but they cannot necessarily slide
     * back in (unless the other window with touch focus permits it).
     */
    private void setWindowSlippery(boolean enable) {
        Window w = mLauncher.getWindow();
        WindowManager.LayoutParams wlp = w.getAttributes();