I add a log in the file KeyInputQueue.java just after
generateRelMotion
    me = ms.generateRelMotion(di, curTime,...);
    Log.i("mylog","===+==="+me.toString());

On the emulator, I press F6 to enter trackball mode, press down PC
mouse's left key, move PC mouse while keeping mouse left key down,
release mouse left key at last.
I get following log:
I/mylog   (   56): ===+===MotionEvent{43cb0ea0 action=0 x=0.0 y=0.0
pressure=1.0 size=0.0}
I/mylog   (   56): ===+===MotionEvent{43c69238 action=1 x=0.0
y=0.6666667 pressure=1.0 size=0.0}
I/mylog   (   56): ===+===MotionEvent{43bf6920 action=2 x=0.0
y=0.6666667 pressure=1.0 size=0.0}
I/mylog   (   56): ===+===MotionEvent{43bf78e0 action=2 x=0.0
y=0.6666667 pressure=1.0 size=0.0}
I/mylog   (   56): ===+===MotionEvent{43c61730 action=2 x=0.0
y=0.6666667 pressure=1.0 size=0.0}
I/mylog   (   56): ===+===MotionEvent{43db8740 action=2 x=0.0
y=0.6666667 pressure=1.0 size=0.0}
I/mylog   (   56): ===+===MotionEvent{43db9758 action=2 x=0.0
y=0.6666667 pressure=1.0 size=0.0}
I/mylog   (   56): ===+===MotionEvent{43d415e8 action=2 x=0.0 y=0.0
pressure=1.0 size=0.0}

I think
action=1
here is abnormal, which would appear at the end.

compare to "adb shell getevent"'s output
/dev/input/event0: 0001 0110 00000001
/dev/input/event0: 0002 0001 00000004
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0002 0001 00000005
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0002 0001 00000004
/dev/input/event0: 0000 0000 00000000
/dev/input/event0: 0001 0110 00000000 <==== up at the end of move

I think it doesn't matter is only ACTION_MOVE used in trackball mode.
But may become an issue if ACTION_UP used in some cases.

BstRgds
gan




On Dec 1, 2:11 pm, Dianne Hackborn <[email protected]> wrote:
> As far as I know they work fine.  I have that code running fine with both
> touch screens and trackballs.  Can you be more specific about the problem
> you are seeing?
>
>
>
>
>
> On Sun, Nov 29, 2009 at 5:55 PM, gan <[email protected]> wrote:
> > Hi:
>
> > In Android 2.0, generateRelMotion&generateAbsMotion replace
> > generateMotion.
> > But seems MotionEvent related with ACTION_UP not generate rightly in
> > the API InputDevice.MotionState.generateRelMotion.
>
> > My question is:
> > For relative coordinates devices, does
> > MotionEvent.ACTION_UP&MotionEvent.ACTION_DOWN would be supported from
> > 2.0 on that let other codes can use besides ACTION_MOVE ?
>
> > Thanks&BstRgds
> > gan
>
> > --
> > unsubscribe: 
> > [email protected]<android-porting%2bunsubscr...@­googlegroups.com>
> > website:http://groups.google.com/group/android-porting
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to