Skip to content
Commit e69b5f41 authored by Lais Andrade's avatar Lais Andrade
Browse files

Cache result from VibratorService.hasVibrator in SystemVibrator

The existing implementation of performHapticFeedback in
PhoneWindowManager uses both hasVibrator and vibrate methods from
Vibrator class. The implementation of VibratorService.hasVibrator is
already constant, returning true if the device has a built in vibrator.

This adds a cache for this value to SystemVibrator, to avoid binder
calls to system_server after the first one.

Bug: 170127981
Test: manual
Change-Id: I68934a41068f4388449321d08a42d8bf890ea91e
parent ee605b64
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