frameworks\base\services\core\java\com\android\server\wm\SystemGesturesPointerEventListener.java
private int detectSwipe(int i, long time, float x, float y) {
final float fromX = mDownX[i];
final float fromY = mDownY[i];
final long elapsed = time - mDownTime[i];
if (DEBUG) Slog.d(TAG, "pointer " + mDownPointerId[i]
+ " moved (" + fromX + "->" + x + "," + fromY + "->" + y + ") in " + elapsed);
if (fromY <= mSwipeStartThreshold
&& y > fromY + mSwipeDistanceThreshold
&& elapsed < SWIPE_TIMEOUT_MS) {
return SWIPE_FROM_TOP;
}
if (fromY >= screenHeight - mSwipeStartThreshold
&& y < fromY - mSwipeDistanceThreshold
&& elapsed < SWIPE_TIMEOUT_MS) {
//start ----------------------------------------
if(fromY >1100 && fromX <640 ){
Log.e("lyl","back ");
Instrumentation inst = new Instrumentation();
inst.sendKeyDownUpSync(KeyEvent.KEYCODE_BACK);
}
if(fromY >1100 && fromX >=640 && fromX <1280 ){
Log.e("lyl","home ");
Intent intent= new Intent(Intent.ACTION_MAIN);
intent.addCat
展锐11.0 隐藏导航栏,从底部向上滑动代替back,home.recent键
最新推荐文章于 2023-03-31 00:15:00 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)