Some cherry-picks AOSP

Fix a programmatic smooth scroll bug

Bug: smoothScrollToPosition() stops at child view of which height is
higher than list view itself.

Change-Id: I695ca9db4c706aa7f365967dd3916f9a01917346
Signed-off-by: Yongyi Li <yongyi.li.cn@gmail.com>

Properly rotate full [-pi, +pi] orientation range if available

The code currently in place assumes that orientation has a range
of [-pi/2, +pi/2] as may be found with a touch digitizer. However,
when used with a digitzer that can report the full [-pi, +pi] range
of orientations (e.g. a stylus) the calculations here are incorrect.

This patch checks if the post-rotation value is out of range for
the axis, and wraps it back around.

Change-Id: I03a22f7bf9526a5d995df1a18430d6dd24c6d6ee

Fix spurious ANR occurence when MOTION batch event is not served by the InputTransporter

Sometimes Batch event of MOTION type is not processed by the Input Transporter
even though it is queued to the waitQueue-Responsible for ANR whenever any event
response does not come from the App. To fix this issue, one Boolean lock is added.
Thus InputTransporter wont ignore the Batch event.
Issue: https://code.google.com/p/android/issues/detail?id=41755

Change-Id: I3bb2eb4cf1f8ecdd1d04671c0e8205dee4ad3a6c

Revert "Fix spurious ANR occurence when MOTION batch event is not served by the InputTransporter"

This reverts commit 022eb04f1ec31cb98bf42bd27ffac7c315135e35.