1 In the case of only one screen, the two-finger trigger movement will crash
Solution:
If there are no 2 screens, no movement operation will be triggered at all.
Code:
@Override
public void onPointerEvent(MotionEvent motionEvent) {
android.util.Log.i("DoubleScreenTouch","DoubleScreenMovePointerEventListener onPointerEvent motionEvent = "+motionEvent + " mService.mRoot.getChildCount() = " +mService.mRoot.getChildCount());
if (mService.mRoot.getChildCount() != 2) {
return;
}
//省略其他
}