Loading packages/SystemUI/shared/src/com/android/systemui/shared/system/InputChannelCompat.java +14 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.view.Choreographer; import android.view.InputChannel; import android.view.InputEvent; import android.view.InputEventSender; import android.view.MotionEvent; /** * @see android.view.InputChannel Loading Loading @@ -63,6 +64,19 @@ public class InputChannelCompat { return new InputEventReceiver(channel, looper, choreographer, listener); } /** * Version of addBatch method which preserves time accuracy in nanoseconds instead of * converting the time to milliseconds. * @param src old MotionEvent where the target should be appended * @param target new MotionEvent which should be added to the src * @return true if the merge was successful * * @see MotionEvent#addBatch(MotionEvent) */ public static boolean mergeMotionEvent(MotionEvent src, MotionEvent target) { return target.addBatch(src); } /** * @see BatchedInputEventReceiver */ Loading Loading
packages/SystemUI/shared/src/com/android/systemui/shared/system/InputChannelCompat.java +14 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.view.Choreographer; import android.view.InputChannel; import android.view.InputEvent; import android.view.InputEventSender; import android.view.MotionEvent; /** * @see android.view.InputChannel Loading Loading @@ -63,6 +64,19 @@ public class InputChannelCompat { return new InputEventReceiver(channel, looper, choreographer, listener); } /** * Version of addBatch method which preserves time accuracy in nanoseconds instead of * converting the time to milliseconds. * @param src old MotionEvent where the target should be appended * @param target new MotionEvent which should be added to the src * @return true if the merge was successful * * @see MotionEvent#addBatch(MotionEvent) */ public static boolean mergeMotionEvent(MotionEvent src, MotionEvent target) { return target.addBatch(src); } /** * @see BatchedInputEventReceiver */ Loading