bstevant
unread,Aug 2, 2010, 4:44:34 AM8/2/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-porting
Hi android-porting group,
I am currently working on porting Android 2.2 on a device with an
ads7846 resistive screen. Although this screen is quite common and
drivers are available in the kernel, the Android system does not
handle it correctly in my build, the screen looks unresponsive and I
can not interact with the interface.
In the running system, the screen is recognized by kernel and a
proper /dev/input/event device comes up. The getevent command actually
shows the touch events happening on the screen. So my guess is that
the kernel layer works fine and the problem is at the Android layer.
So I started invertigating from the EventHub interface.
First strange thing I faced is that the screen was somehow recognized
with multitouch capabilities (device->classes shows the MT flag in
EventHub). I removed this flag to get the screen event correctly
handled in KeyInputQueue. I then put as much debug as possible to see
if something was not correctly handled there, but the event looks OK :
BTN_TOUCH when finger on the screen, ABS_X and ABS_Y when finger
moves, BTN_TOUCH when finger leaves the screen. Probably I need to
look at the upper layer which is WindowManager and MotionEvent, but it
is a bit complex there, this is why I ask for help here :)
You will find some log below showing how a touch-slide-release event
is handled. The coordinate outputs is a custom made log from
KeyInputEvent.java (~line 678) giving the actual position of the event
on the screen. I then set in WondowManagerService DEBUG_INPUT to true
to see what is forwarded to the upper layer. But I am not able to see
if there is something wrong here. Please someone can tell me :
- What kind of debug flag may be interesting in my case ?
- Is there common configuration pitfall where touchscreen is not
enable ? (I started from a fresh chekout of the repo then build a
device profile for this device, maybe I missed something there)
- Is there a place at the upper layer (WindowManager or anywhere)
where my Input event may be discarded ?
- Looking at the coordinates, do they look correct ? My screen
resolution is 800x480, the origin of the plan (0x0) is at the upper
left corner
Thanks in advance for any help !
=========== START LOGCAT OUTPUT =======
I/KeyInputQueue( 828): BTN TOUCH evt, ev.value is:
1
I/KeyInputQueue( 828): TOUCH @ X:
247
I/KeyInputQueue( 828): TOUCH @ Y:
255
V/WindowManager( 828): Event: type=4 data=MotionEvent{44058f80
action=0 x=Infi}
V/WindowManager( 828): dispatchPointer MotionEvent{44058f80 action=0
x=Infinit}
V/WindowManager( 828): waitForLastKey: mFinished=true,
mLastWin=null
I/WindowManager( 828): Sending evt to
target
V/WindowManager( 828): Delivering pointer QueuedEvent{44055910
MotionEvent{440}
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, fe
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, f)
V/WindowManager( 828): finishedKey: last
paused=false
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): Waiting for next key: now=102621, repeat @
10100174
I/KeyInputQueue( 828): TOUCH @ Y:
256
V/WindowManager( 828): Event: type=4 data=MotionEvent{44058f80
action=2 x=Infi}
V/WindowManager( 828): dispatchPointer MotionEvent{44058f80 action=2
x=Infinit}
V/WindowManager( 828): waitForLastKey: mFinished=true,
mLastWin=null
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): bindTargetToWindow QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): Delivering pointer QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, fe
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, f)
V/WindowManager( 828): finishedKey: last
paused=false
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): Returning pending motion: MotionEvent{44058f80
action=2}
V/WindowManager( 828): Waiting for next key: now=102644, repeat @
10100174
I/KeyInputQueue( 828): TOUCH @ Y:
257
V/WindowManager( 828): Event: type=4 data=MotionEvent{44058f80
action=2 x=Infi}
V/WindowManager( 828): dispatchPointer MotionEvent{44058f80 action=2
x=Infinit}
V/WindowManager( 828): waitForLastKey: mFinished=true,
mLastWin=null
I/WindowManager( 828): Sending evt to
target
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): bindTargetToWindow QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): Delivering pointer QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, fe
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, f)
V/WindowManager( 828): finishedKey: last
paused=false
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): Returning pending motion: MotionEvent{44058f80
action=2}
V/WindowManager( 828): Waiting for next key: now=102672, repeat @
10100174
I/KeyInputQueue( 828): TOUCH @ X:
247
I/KeyInputQueue( 828): TOUCH @ Y:
257
V/WindowManager( 828): Event: type=4 data=MotionEvent{44058f80
action=2 x=Infi}
V/WindowManager( 828): dispatchPointer MotionEvent{44058f80 action=2
x=Infinit}
V/WindowManager( 828): waitForLastKey: mFinished=true,
mLastWin=null
I/WindowManager( 828): Sending evt to
target
V/WindowManager( 828): releasePendingPointer
null
I/KeyInputQueue( 828): TOUCH @ X:
250
I/KeyInputQueue( 828): TOUCH @ Y:
258
I/KeyInputQueue( 828): TOUCH @ X:
252
I/KeyInputQueue( 828): TOUCH @ X:
269
I/KeyInputQueue( 828): TOUCH @ Y:
258
I/KeyInputQueue( 828): TOUCH @ X:
284
I/KeyInputQueue( 828): TOUCH @ Y:
259
V/WindowManager( 828): bindTargetToWindow QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): Delivering pointer QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, fe
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, f)
V/WindowManager( 828): finishedKey: last
paused=false
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): Returning pending motion: MotionEvent{44058f80
action=2}
V/WindowManager( 828): Waiting for next key: now=102801, repeat @
10100174
I/KeyInputQueue( 828): TOUCH @ X:
308
I/KeyInputQueue( 828): TOUCH @ Y:
264
V/WindowManager( 828): Event: type=4 data=MotionEvent{44058f80
action=2 x=Infi}
V/WindowManager( 828): dispatchPointer MotionEvent{44058f80 action=2
x=Infinit}
V/WindowManager( 828): waitForLastKey: mFinished=true,
mLastWin=null
I/WindowManager( 828): Sending evt to
target
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): bindTargetToWindow QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): Delivering pointer QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, fe
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, f)
V/WindowManager( 828): finishedKey: last
paused=false
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): Returning pending motion: MotionEvent{44058f80
action=2}
V/WindowManager( 828): Waiting for next key: now=102820, repeat @
10100174
I/KeyInputQueue( 828): TOUCH @ X:
333
I/KeyInputQueue( 828): TOUCH @ Y:
265
V/WindowManager( 828): Event: type=4 data=MotionEvent{44058f80
action=2 x=Infi}
V/WindowManager( 828): dispatchPointer MotionEvent{44058f80 action=2
x=Infinit}
V/WindowManager( 828): waitForLastKey: mFinished=true,
mLastWin=null
I/WindowManager( 828): Sending evt to
target
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): bindTargetToWindow QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): Delivering pointer QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, fe
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, f)
V/WindowManager( 828): finishedKey: last
paused=false
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): Returning pending motion: MotionEvent{44058f80
action=2}
V/WindowManager( 828): Waiting for next key: now=102848, repeat @
10100174
I/KeyInputQueue( 828): TOUCH @ X:
359
I/KeyInputQueue( 828): TOUCH @ Y:
266
V/WindowManager( 828): Event: type=4 data=MotionEvent{44058f80
action=2 x=Infi}
V/WindowManager( 828): dispatchPointer MotionEvent{44058f80 action=2
x=Infinit}
V/WindowManager( 828): waitForLastKey: mFinished=true,
mLastWin=null
I/WindowManager( 828): Sending evt to
target
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): bindTargetToWindow QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): Delivering pointer QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, fe
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, f)
V/WindowManager( 828): finishedKey: last
paused=false
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): Returning pending motion: MotionEvent{44058f80
action=2}
V/WindowManager( 828): Waiting for next key: now=102876, repeat @
10100174
I/KeyInputQueue( 828): TOUCH @ X:
377
I/KeyInputQueue( 828): TOUCH @ Y:
271
V/WindowManager( 828): Event: type=4 data=MotionEvent{44058f80
action=2 x=Infi}
V/WindowManager( 828): dispatchPointer MotionEvent{44058f80 action=2
x=Infinit}
V/WindowManager( 828): waitForLastKey: mFinished=true,
mLastWin=null
I/WindowManager( 828): Sending evt to
target
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): bindTargetToWindow QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): Delivering pointer QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, fe
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, f)
V/WindowManager( 828): finishedKey: last
paused=false
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): Returning pending motion: MotionEvent{44058f80
action=2}
V/WindowManager( 828): Waiting for next key: now=102904, repeat @
10100174
I/KeyInputQueue( 828): BTN TOUCH evt, ev.value is: 0
V/WindowManager( 828): Event: type=4 data=MotionEvent{44058f80
action=1 x=Infi}
V/WindowManager( 828): dispatchPointer MotionEvent{44058f80 action=1
x=Infinit}
V/WindowManager( 828): waitForLastKey: mFinished=true,
mLastWin=null
V/WindowManager( 828): Delivering pointer QueuedEvent{4405d2c0
MotionEvent{440}
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, fe
V/WindowManager( 828): finishedKey: client=android.view.ViewRoot
$W@43fc0588, f)
V/WindowManager( 828): finishedKey: last
paused=false
V/WindowManager( 828): releasePendingPointer
null
V/WindowManager( 828): Waiting for next key: now=102913, repeat @
10100174