This change allows to use this header with the NDK's standalone toolchain.
For the record, the NDK toolchain defines __ANDROID__ as a compiler built-in
macro, this is however not the case currently for the prebuilt binaries that
are being used by the full Android build system, which otherwise defines ANDROID.
This change allows the header to be used by all toolchains properly. Note however
that we should properly should change our toolchain and sources to provide and
rely on __ANDROID__ instead of ANDROID though.
Change-Id: Iaa1aa1146985b5f24dcf3a83d9ddb9b4b59dc328
Two issues:
1. First, due to an inverted conditional in the input dispatcher, we were
reporting touches as long touches and vice-versa to the power manager.
2. Power manager user activity cheek event suppression also suppresses touch
events (but not long touch or up events). As a result, if cheek event
suppression was enabled, touches would not poke the user activity timer.
However due to the above logic inversion, this actually affected long
touches. Net result, if cheek suppression was enabled in the power manager
and you held your thumb on the screen long enough, the phone would
go to sleep!
Cheek event suppression is commonly turned on when making a phone call.
Interestingly, it does not seem to get turned off afterward...
This change fixes the logic inversion and exempts touches from the cheek
suppression. The reason we do the latter is because the old behavior
was actually harmful in other ways too: a touch down would be suppressed
but not a long touch or the touch up. This would cause bizarre behavior
if you touched the screen while it was dimmed. Instead of brightening
immediately, it would brighten either when you lifted your finger or
300ms later, whichever came first.
Bug: 3154895
Change-Id: Ied9ccec6718fbe86506322ff47a4e3eb58f81834
This patch makes the dispatcher drop all of its state when it is
disabled (when the screen turns off). This ensures that the dispatcher
does not get stuck thinking a pointer is still down if the screen
turned off while the user was touching the display (such as a fat touch
while hitting the power button).
Bug: 3098344
Change-Id: If50ef5804870aa1acd3179fd4b40e3cda58dd39d
Two bugs were counter acting each other.
- rotation matrices are on the left-hand side of multiplies
- the transform of the overlay is applied before that of the layer
Change-Id: Ia79bd368e9b719235c89ecf244ea263f01ce906a