| Index: ui/events/android/motion_event_android.cc
|
| diff --git a/ui/events/android/motion_event_android.cc b/ui/events/android/motion_event_android.cc
|
| index ee645bfc80e25d19e1596ce70994b404e7a33867..8e99aa3866b8d2e05e6d01c584f65f49eb460b4c 100644
|
| --- a/ui/events/android/motion_event_android.cc
|
| +++ b/ui/events/android/motion_event_android.cc
|
| @@ -229,8 +229,8 @@ MotionEventAndroid::Action MotionEventAndroid::GetAction() const {
|
| }
|
|
|
| int MotionEventAndroid::GetActionIndex() const {
|
| - DCHECK(cached_action_ == ACTION_POINTER_UP ||
|
| - cached_action_ == ACTION_POINTER_DOWN)
|
| + DCHECK(cached_action_ == MotionEvent::ACTION_POINTER_UP ||
|
| + cached_action_ == MotionEvent::ACTION_POINTER_DOWN)
|
| << "Invalid action for GetActionIndex(): " << cached_action_;
|
| DCHECK_GE(cached_action_index_, 0);
|
| DCHECK_LT(cached_action_index_, static_cast<int>(cached_pointer_count_));
|
| @@ -304,6 +304,8 @@ float MotionEventAndroid::GetPressure(size_t pointer_index) const {
|
| // accessed at most once per event instance).
|
| if (!event_.obj())
|
| return 0.f;
|
| + if (cached_action_ == MotionEvent::ACTION_UP)
|
| + return 0.f;
|
| return Java_MotionEvent_getPressureF_I(AttachCurrentThread(), event_,
|
| pointer_index);
|
| }
|
|
|