Merge "Add hasExternalControl hidden API to Vibrator" into sc-dev am: c5efbf1dba am: d20b62d8e2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14621133

Change-Id: I5f137de481a90f7cfb9488de59cc7a4218dc84f0
This commit is contained in:
TreeHugger Robot
2021-05-19 13:15:09 +00:00
committed by Automerger Merge Worker

View File

@@ -226,6 +226,17 @@ public abstract class Vibrator {
IVibrator.CAP_FREQUENCY_CONTROL | IVibrator.CAP_COMPOSE_PWLE_EFFECTS);
}
/**
* Check whether the vibrator can be controlled by an external service with the
* {@link IExternalVibratorService}.
*
* @return True if the hardware can be controlled by an external service, otherwise false.
* @hide
*/
public boolean hasExternalControl() {
return getInfo().hasCapability(IVibrator.CAP_EXTERNAL_CONTROL);
}
/**
* Gets the resonant frequency of the vibrator.
*