|
发表于 2017-12-21 16:43:06
只看该作者
26#
本帖最后由 hch246 于 2017-12-22 13:48 编辑
备注下:
1、添加官网源码的commit 26b7b5e1d7cc69824aa484b0d66b2d2c0404db63q
--- a/frameworks/base/services/core/java/com/android/server/wm/InputMonitor.java
+++ b/frameworks/base/services/core/java/com/android/server/wm/InputMonitor.java
@@ -495,6 +495,22 @@ private boolean validWindowState(WindowState win){
public long interceptMotionBeforeDispatching(
InputWindowHandle focus,MotionEvent event,int policyFlags){
+ int action = event.getAction();
+ int screenWidth = mService.getDefaultDisplayInfoLocked().logicalWidth;
+ if (mService.mCurConfiguration.dualscreenflag == Configuration.ENABLE_DUAL_SCREEN &&
+ action == MotionEvent.ACTION_HOVER_MOVE) {
+ int x1 = (int)event.getX();
+ int y1 = (int)event.getY();
+ if (/*x1 < 15 || */x1 + 15 > screenWidth) {
+ if(!mService.isWorked("com.android.Listappinfo.ManderService")){
+ LOGV("start com.android.Listappinfo.ManderService");
+ Intent intent = new Intent();
+ intent.setClassName("com.android.Listappinfo", "com.android.Listappinfo.ManderService");
+ mService.mContext.startService(intent);
+ return -1;
+ }
+ }
+ }
return mInputMonitorController.interceptMotionBeforeDispatching(mService.mContext,focus, event, policyFlags);
}
2、在 build/tools/buildinfo.sh 里添加 ro.htg.force=1
|
|