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
Loading
Please register or sign in to comment