mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
bug 723243 - SimpleScaleGestureDetector uses getActionIndex(), which is not available in eclair r=wesj
This commit is contained in:
parent
a22d53f424
commit
cb4401d7dd
@ -101,9 +101,14 @@ public class SimpleScaleGestureDetector {
|
||||
return mPointerInfo.size();
|
||||
}
|
||||
|
||||
private int getActionIndex(MotionEvent event) {
|
||||
return (event.getAction() & MotionEvent.ACTION_POINTER_INDEX_MASK)
|
||||
>> MotionEvent.ACTION_POINTER_INDEX_SHIFT;
|
||||
}
|
||||
|
||||
private void onTouchStart(MotionEvent event) {
|
||||
mLastEventTime = event.getEventTime();
|
||||
mPointerInfo.addFirst(PointerInfo.create(event, event.getActionIndex()));
|
||||
mPointerInfo.addFirst(PointerInfo.create(event, getActionIndex(event)));
|
||||
if (getPointersDown() == 2) {
|
||||
sendScaleGesture(EventType.BEGIN);
|
||||
}
|
||||
@ -126,7 +131,7 @@ public class SimpleScaleGestureDetector {
|
||||
private void onTouchEnd(MotionEvent event) {
|
||||
mLastEventTime = event.getEventTime();
|
||||
|
||||
int id = event.getPointerId(event.getActionIndex());
|
||||
int id = event.getPointerId(getActionIndex(event));
|
||||
ListIterator<PointerInfo> iterator = mPointerInfo.listIterator();
|
||||
while (iterator.hasNext()) {
|
||||
PointerInfo pointerInfo = iterator.next();
|
||||
|
Loading…
Reference in New Issue
Block a user