diff options
author | Michael Wright <michaelwr@google.com> | 2015-04-27 14:41:37 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-27 14:41:37 +0000 |
commit | 104e268c3222b1481bd20f8fc85eea0e364f5962 (patch) | |
tree | 031c7cf3a897e87489da7dfd089517bcbb927299 /services/inputflinger/InputReader.cpp | |
parent | 63a0f428230208b9f3601eb7c99a08100c6f3a0b (diff) | |
parent | 5da11106b3aa10d515d0f080c27f315d5830dc85 (diff) | |
download | frameworks_native-104e268c3222b1481bd20f8fc85eea0e364f5962.zip frameworks_native-104e268c3222b1481bd20f8fc85eea0e364f5962.tar.gz frameworks_native-104e268c3222b1481bd20f8fc85eea0e364f5962.tar.bz2 |
am 5da11106: am 7ecc8952: Merge "Check orientation range has been initialized first"
* commit '5da11106b3aa10d515d0f080c27f315d5830dc85':
Check orientation range has been initialized first
Diffstat (limited to 'services/inputflinger/InputReader.cpp')
-rw-r--r-- | services/inputflinger/InputReader.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp index 8709692..f4c3928 100644 --- a/services/inputflinger/InputReader.cpp +++ b/services/inputflinger/InputReader.cpp @@ -4567,7 +4567,7 @@ void TouchInputMapper::cookPointerData() { bottom = float(mRawPointerAxes.x.maxValue - rawLeft) * mXScale + mXTranslate; top = float(mRawPointerAxes.x.maxValue - rawRight) * mXScale + mXTranslate; orientation -= M_PI_2; - if (orientation < mOrientedRanges.orientation.min) { + if (mOrientedRanges.haveOrientation && orientation < mOrientedRanges.orientation.min) { orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min); } break; @@ -4579,7 +4579,7 @@ void TouchInputMapper::cookPointerData() { bottom = float(mRawPointerAxes.y.maxValue - rawTop) * mYScale + mYTranslate; top = float(mRawPointerAxes.y.maxValue - rawBottom) * mYScale + mYTranslate; orientation -= M_PI; - if (orientation < mOrientedRanges.orientation.min) { + if (mOrientedRanges.haveOrientation && orientation < mOrientedRanges.orientation.min) { orientation += (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min); } break; @@ -4591,7 +4591,7 @@ void TouchInputMapper::cookPointerData() { bottom = float(rawRight - mRawPointerAxes.x.minValue) * mXScale + mXTranslate; top = float(rawLeft - mRawPointerAxes.x.minValue) * mXScale + mXTranslate; orientation += M_PI_2; - if (orientation > mOrientedRanges.orientation.max) { + if (mOrientedRanges.haveOrientation && orientation > mOrientedRanges.orientation.max) { orientation -= (mOrientedRanges.orientation.max - mOrientedRanges.orientation.min); } break; |