Add ALLOW_SLIPPERY_TOUCHES to make StatusBarTouchController slippery am: 918776ee51
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/16510921 Change-Id: I974fcf457a96758f1002b64358c27edd54ab84de
This commit is contained in:
committed by
Automerger Merge Worker
commit
b2b60b12b4
@@ -30,6 +30,7 @@
|
||||
<uses-permission android:name="android.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
|
||||
<uses-permission android:name="android.permission.ALLOW_SLIPPERY_TOUCHES"/>
|
||||
<uses-permission android:name="${packageName}.permission.HOTSEAT_EDU" />
|
||||
|
||||
<application
|
||||
|
||||
+10
-11
@@ -19,6 +19,7 @@ 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.MotionEvent.ACTION_CANCEL;
|
||||
import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY;
|
||||
|
||||
import android.graphics.PointF;
|
||||
import android.util.SparseArray;
|
||||
@@ -48,17 +49,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;
|
||||
@@ -142,6 +132,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();
|
||||
|
||||
Reference in New Issue
Block a user