diff options
| author | Lais Andrade <lsandrade@google.com> | 2021-04-06 14:20:23 +0000 |
|---|---|---|
| committer | Lais Andrade <lsandrade@google.com> | 2021-04-12 16:34:54 +0000 |
| commit | d8dc940fc013756cc46bdde7cb1537025dcdaaae (patch) | |
| tree | f7a9db65124036e566bd4dbcaf23e637821981fe /core/java/android/view/InputDevice.java | |
| parent | f6e8d81381fc50da18975382932fbd6b19170a84 (diff) | |
Rename CombinedVibrationEffect to CombinedVibration
The change makes the distinction between VibrationEffect and
CombinedVibratio clearer. The later is a combination of the former with
the extra information about the vibrator ids, allowing effects to be
played in one or more vibrators in parallel or in sequence.
The methods create/start synced where also renamed to parallel (together
with respective builder classes), to indicate they perform one or more
effects in parallel on multiple vibrators. This is also a better match
to the sequential combinations.
This change also deprecates the Context.VIBRATOR_SERVICE in favour of
the new VIBRATOR_MANAGER_SERVICE. The default vibrator can be retrieved
from the manager system service.
Same deprecation applied to InputDevice.getVibrator method.
Fix: 184123900
Test: CombinedVibrationTest
Change-Id: I44d8b225098d35fbf7783254acaf6a78f9fb4505
Diffstat (limited to 'core/java/android/view/InputDevice.java')
| -rw-r--r-- | core/java/android/view/InputDevice.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/java/android/view/InputDevice.java b/core/java/android/view/InputDevice.java index d1f8ee9b0cc7..3b1c8ec23016 100644 --- a/core/java/android/view/InputDevice.java +++ b/core/java/android/view/InputDevice.java @@ -812,7 +812,9 @@ public final class InputDevice implements Parcelable { * {@link Context#getSystemService} with {@link Context#VIBRATOR_SERVICE} as argument. * * @return The vibrator service associated with the device, never null. + * @deprecated Use {@link #getVibratorManager()} to retrieve the default device vibrator. */ + @Deprecated public Vibrator getVibrator() { synchronized (mMotionRanges) { if (mVibrator == null) { |
