Skip to content
Commit 9a3d604e authored by Simon Bowden's avatar Simon Bowden
Browse files

Make the binder call in performHapticFeedback asynchronous.

Controlled by a build flag in ViewRootImpl.

This changes the return value to be true whenever it gets to dispatching
to binder - therefore it will no longer be false if the device has no
vibrator or if the HapticFeedbackConstant has no implementation. The
benefit is that the method should no longer have delays (including
binder scheduling ones) that can introduce jank on the UI thread.

The return code is currently undocumented and can be affected by a large
number of variables, so it seems unlikely to usefully deduce something
from it at runtime. In any case, the app would be better off, for
example, doing a one-off check separately, rather than a dynamic check
every time in this method that's asking to be called in the UI thread.

Bug: 264566815
Test: presubmit
Change-Id: I1c41ae26a1a9f0ad5a97b20d14a72d39ed8668ee
parent 2e48cd23
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment