OSDN Git Service

Use previous pressure value if the current fusion data is zero.
authorMichael Wright <michaelwr@google.com>
Thu, 23 Apr 2015 16:39:53 +0000 (17:39 +0100)
committerMichael Wright <michaelwr@google.com>
Tue, 12 May 2015 13:17:42 +0000 (14:17 +0100)
commit53dca3aadda499824d3d0b2bbc25a72fc1a37877
tree0a15a5d433a0b65a5bb8946ddbccc22de4dbae3b
parent43fd19fd1a22d95ed985a0680fd8806d918f3ba7
Use previous pressure value if the current fusion data is zero.

Occasionally we'll receive the stylus up signal (pressure = 0) before
we receive the touch screen up signal. Rather than giving pointer a
pressure value of 0 (which is one of the signals of hovering) or
falling back to the touchscreen pressure values (which would make for
an inconsistent stream), use the previous pressure value which should
always be non-zero for a stream of fused data.

Bug: 20449776
Change-Id: I71eb97e7c4ea53e42b0eb54fc1f8ae7f89aad9d1
services/inputflinger/InputReader.cpp
services/inputflinger/InputReader.h