File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
services/java/com/android/server Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -391,9 +391,15 @@ public void onInputDeviceRemoved(int deviceId) {
391391 }
392392
393393 private boolean doVibratorExists () {
394- synchronized (mInputDeviceVibrators ) {
395- return !mInputDeviceVibrators .isEmpty () || vibratorExists ();
396- }
394+ // For now, we choose to ignore the presence of input devices that have vibrators
395+ // when reporting whether the device has a vibrator. Applications often use this
396+ // information to decide whether to enable certain features so they expect the
397+ // result of hasVibrator() to be constant. For now, just report whether
398+ // the device has a built-in vibrator.
399+ //synchronized (mInputDeviceVibrators) {
400+ // return !mInputDeviceVibrators.isEmpty() || vibratorExists();
401+ //}
402+ return vibratorExists ();
397403 }
398404
399405 private void doVibratorOn (long millis ) {
You can’t perform that action at this time.
0 commit comments