Hi all,
Back in android2.3 there is such code in InputReader.cpp:
MultiTouchInputMapper::sync():
            if (inPointer.absMTPressure <= 0) {
                // Some devices send sync packets with X / Y but with
a 0 pressure to indicate
                // a pointer going up.  Drop this finger.
                continue;
            }
and
            if (inPointer.absMTTouchMajor <= 0) {
                // Some devices send sync packets with X / Y but with
a 0 touch major to indicate
                // a pointer going up.  Drop this finger.
                continue;
            }
so that means when you move your finger away from the screen,driver
send up a ABS_MT_TOUCH_MAJOR with absMTTouchMajor==0, this point is
dropped,through
MultiTouchInputMapper::sync()>TouchInputMapper::syncTouch>calculatePointerIds():
currentPointerCount == 0 and mCurrentTouch.idBits.clear();
then in dispatchTouches() currentIdBits <> lastIdBits and interpreted
as a UP movement.

BUT Android4.0 seems don't consider this ,in InputReader.cpp:
when driver send up ABS_MT_TOUCH_MAJOR:
MultiTouchMotionAccumulator::process();
            case ABS_MT_TOUCH_MAJOR:
                slot->mInUse = true;
                slot->mAbsMTTouchMajor = rawEvent->value;
                break;
mInUse is set to true no matter if rawEvent->value equals 0,and this
point is not dropped,in
MultiTouchInputMapper::syncTouch():
        if (!inSlot->isInUse()) {
            continue;
        }
and mCurrentRawPointerData.markIdBit(id, isHovering); called.

Then in dispatchTouches(),because currentIdBits == lastIdBits,this
action is interpreted as a MOVE action,not UP!

Where am I wrong? Plz help,thanks!!!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to