Mir

MirMotionEvent action field not consistent

Bug #1320219 reported by Sylvain Becker
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
New
Undecided
Unassigned

Bug Description

With a touch screen and multi-touch, sometimes MIR sends (rarely) MirMotionEvent.action with bad values :

It sends motion.action == 0x101

"motion.action >> 8" refers to the index in the array "pointer_coordinates".
"motion.action & 0xff" refers to the "action", here mir_motion_action_up.

But pointer_count == 1 (size of the array "pointer_coordinates").

So the "motion.action" refers to an unreachable element of the array.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Good catch. This is a known issue and already has a bug number 1311699, so directing you there...

Revision history for this message
Sylvain Becker (sylvain-becker) wrote :

Actually, this is not a bug :)

http://developer.android.com/reference/android/view/MotionEvent.html

0x101 -> getActionMasked tells this is an ACTION_UP.
and for ACTION_UP, no way to look at the getActionIndex (motion.action >> 8).
It should be assumed to be 0.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.