Android MotionEvent.Geture(..)在操作系统更新后工作不正常

Android MotionEvent.Geture(..)在操作系统更新后工作不正常,android,android-studio,touch,motionevent,Android,Android Studio,Touch,Motionevent,我一直在使用MotionEvent.Get方法在应用程序上以编程方式使用click events 它在更新操作系统之前工作正常,但在更新操作系统之后就不工作了。它在纵向模式下工作正常,但在横向模式下单击随机位置 示例代码:- dispatchTouchEvent(MotionEvent.obtain(SystemClock.uptimeMillis(), SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN, x, y, 0));

我一直在使用MotionEvent.Get方法在应用程序上以编程方式使用click events

它在更新操作系统之前工作正常,但在更新操作系统之后就不工作了。它在纵向模式下工作正常,但在横向模式下单击随机位置

示例代码:-

   dispatchTouchEvent(MotionEvent.obtain(SystemClock.uptimeMillis(),
     SystemClock.uptimeMillis(), MotionEvent.ACTION_DOWN, x, y, 0));
   dispatchTouchEvent(MotionEvent.obtain(SystemClock.uptimeMillis(),
     SystemClock.uptimeMillis(), MotionEvent.ACTION_UP, x, y, 0));