diff options
| author | 2021-05-26 17:28:52 +0000 | |
|---|---|---|
| committer | 2021-05-26 17:28:52 +0000 | |
| commit | 03b86cd11f39877753c919e38d040c692e386b5d (patch) | |
| tree | a93deab043b164b4d12caa1fa67cc5a86184e44b | |
| parent | ee48d00b1669ad8fa7e214c34825c534db3f255b (diff) | |
| parent | c76c77393fc2d735564aa9a47490f11bef342c13 (diff) | |
Merge "Add documentation to VibratorManager on foreground/background behavior" into sc-dev
| -rw-r--r-- | core/java/android/os/VibratorManager.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/java/android/os/VibratorManager.java b/core/java/android/os/VibratorManager.java index 01cece39b922..c82a51669b86 100644 --- a/core/java/android/os/VibratorManager.java +++ b/core/java/android/os/VibratorManager.java @@ -94,6 +94,8 @@ public abstract class VibratorManager { * VibrationEffect VibrationEffects} to be played on one or more vibrators. * </p> * + * <p>The app should be in foreground for the vibration to happen.</p> + * * @param effect a combination of effects to be performed by one or more vibrators. */ @RequiresPermission(android.Manifest.permission.VIBRATE) @@ -109,6 +111,9 @@ public abstract class VibratorManager { * VibrationEffect} to be played on one or more vibrators. * </p> * + * <p>The app should be in foreground for the vibration to happen. Background apps should + * specify a ringtone, notification or alarm usage in order to vibrate.</p> + * * @param effect a combination of effects to be performed by one or more vibrators. * @param attributes {@link VibrationAttributes} corresponding to the vibration. For example, * specify {@link VibrationAttributes#USAGE_ALARM} for alarm vibrations or |