Loading core/java/android/os/VibrationEffect.java +7 −7 Original line number Diff line number Diff line Loading @@ -232,11 +232,11 @@ public abstract class VibrationEffect implements Parcelable { * Computes a legacy vibration pattern (i.e. a pattern with duration values for "off/on" * vibration components) that is equivalent to this VibrationEffect. * * <p>All non-repeating effects created with {@link #createWaveform(int[], int)} are convertible * into an equivalent vibration pattern with this method. It is not guaranteed that an effect * created with other means becomes converted into an equivalent legacy vibration pattern, even * if it has an equivalent vibration pattern. If this method is unable to create an equivalent * vibration pattern for such effects, it will return {@code null}. * <p>All non-repeating effects created with {@link #createWaveform(long[], int)} are * convertible into an equivalent vibration pattern with this method. It is not guaranteed that * an effect created with other means becomes converted into an equivalent legacy vibration * pattern, even if it has an equivalent vibration pattern. If this method is unable to create * an equivalent vibration pattern for such effects, it will return {@code null}. * * <p>Note that a valid equivalent long[] pattern cannot be created for an effect that has any * form of repeating behavior, regardless of how the effect was created. For repeating effects, Loading @@ -245,7 +245,7 @@ public abstract class VibrationEffect implements Parcelable { * @return a long array representing a vibration pattern equivalent to the VibrationEffect, if * the method successfully derived a vibration pattern equivalent to the effect * (this will always be the case if the effect was created via * {@link #createWaveform(int[], int)} and is non-repeating). Otherwise, returns * {@link #createWaveform(long[], int)} and is non-repeating). Otherwise, returns * {@code null}. * @hide */ Loading Loading @@ -953,7 +953,7 @@ public abstract class VibrationEffect implements Parcelable { /** * Casts a provided {@link VibrationEffectSegment} to a {@link StepSegment} and returns it, * only if it can possibly be a segment for an effect created via * {@link #createWaveform(int[], int)}. Otherwise, returns {@code null}. * {@link #createWaveform(long[], int)}. Otherwise, returns {@code null}. */ @Nullable private static StepSegment castToValidStepSegmentForOffOnTimingsOrNull( Loading core/java/android/os/vibrator/PrebakedSegment.java +0 −6 Original line number Diff line number Diff line Loading @@ -118,12 +118,6 @@ public final class PrebakedSegment extends VibrationEffectSegment { } } /** @hide */ @Override public boolean hasNonZeroAmplitude() { return true; } /** @hide */ @NonNull @Override Loading core/java/android/os/vibrator/PrimitiveSegment.java +0 −7 Original line number Diff line number Diff line Loading @@ -87,13 +87,6 @@ public final class PrimitiveSegment extends VibrationEffectSegment { return true; } /** @hide */ @Override public boolean hasNonZeroAmplitude() { // Every primitive plays a vibration with a non-zero amplitude, even at scale == 0. return true; } /** @hide */ @NonNull @Override Loading core/java/android/os/vibrator/RampSegment.java +0 −6 Original line number Diff line number Diff line Loading @@ -123,12 +123,6 @@ public final class RampSegment extends VibrationEffectSegment { return true; } /** @hide */ @Override public boolean hasNonZeroAmplitude() { return mStartAmplitude > 0 || mEndAmplitude > 0; } /** @hide */ @Override public void validate() { Loading core/java/android/os/vibrator/StepSegment.java +0 −7 Original line number Diff line number Diff line Loading @@ -99,13 +99,6 @@ public final class StepSegment extends VibrationEffectSegment { return true; } /** @hide */ @Override public boolean hasNonZeroAmplitude() { // DEFAULT_AMPLITUDE == -1 is still a non-zero amplitude that will be resolved later. return Float.compare(mAmplitude, 0) != 0; } /** @hide */ @Override public void validate() { Loading Loading
core/java/android/os/VibrationEffect.java +7 −7 Original line number Diff line number Diff line Loading @@ -232,11 +232,11 @@ public abstract class VibrationEffect implements Parcelable { * Computes a legacy vibration pattern (i.e. a pattern with duration values for "off/on" * vibration components) that is equivalent to this VibrationEffect. * * <p>All non-repeating effects created with {@link #createWaveform(int[], int)} are convertible * into an equivalent vibration pattern with this method. It is not guaranteed that an effect * created with other means becomes converted into an equivalent legacy vibration pattern, even * if it has an equivalent vibration pattern. If this method is unable to create an equivalent * vibration pattern for such effects, it will return {@code null}. * <p>All non-repeating effects created with {@link #createWaveform(long[], int)} are * convertible into an equivalent vibration pattern with this method. It is not guaranteed that * an effect created with other means becomes converted into an equivalent legacy vibration * pattern, even if it has an equivalent vibration pattern. If this method is unable to create * an equivalent vibration pattern for such effects, it will return {@code null}. * * <p>Note that a valid equivalent long[] pattern cannot be created for an effect that has any * form of repeating behavior, regardless of how the effect was created. For repeating effects, Loading @@ -245,7 +245,7 @@ public abstract class VibrationEffect implements Parcelable { * @return a long array representing a vibration pattern equivalent to the VibrationEffect, if * the method successfully derived a vibration pattern equivalent to the effect * (this will always be the case if the effect was created via * {@link #createWaveform(int[], int)} and is non-repeating). Otherwise, returns * {@link #createWaveform(long[], int)} and is non-repeating). Otherwise, returns * {@code null}. * @hide */ Loading Loading @@ -953,7 +953,7 @@ public abstract class VibrationEffect implements Parcelable { /** * Casts a provided {@link VibrationEffectSegment} to a {@link StepSegment} and returns it, * only if it can possibly be a segment for an effect created via * {@link #createWaveform(int[], int)}. Otherwise, returns {@code null}. * {@link #createWaveform(long[], int)}. Otherwise, returns {@code null}. */ @Nullable private static StepSegment castToValidStepSegmentForOffOnTimingsOrNull( Loading
core/java/android/os/vibrator/PrebakedSegment.java +0 −6 Original line number Diff line number Diff line Loading @@ -118,12 +118,6 @@ public final class PrebakedSegment extends VibrationEffectSegment { } } /** @hide */ @Override public boolean hasNonZeroAmplitude() { return true; } /** @hide */ @NonNull @Override Loading
core/java/android/os/vibrator/PrimitiveSegment.java +0 −7 Original line number Diff line number Diff line Loading @@ -87,13 +87,6 @@ public final class PrimitiveSegment extends VibrationEffectSegment { return true; } /** @hide */ @Override public boolean hasNonZeroAmplitude() { // Every primitive plays a vibration with a non-zero amplitude, even at scale == 0. return true; } /** @hide */ @NonNull @Override Loading
core/java/android/os/vibrator/RampSegment.java +0 −6 Original line number Diff line number Diff line Loading @@ -123,12 +123,6 @@ public final class RampSegment extends VibrationEffectSegment { return true; } /** @hide */ @Override public boolean hasNonZeroAmplitude() { return mStartAmplitude > 0 || mEndAmplitude > 0; } /** @hide */ @Override public void validate() { Loading
core/java/android/os/vibrator/StepSegment.java +0 −7 Original line number Diff line number Diff line Loading @@ -99,13 +99,6 @@ public final class StepSegment extends VibrationEffectSegment { return true; } /** @hide */ @Override public boolean hasNonZeroAmplitude() { // DEFAULT_AMPLITUDE == -1 is still a non-zero amplitude that will be resolved later. return Float.compare(mAmplitude, 0) != 0; } /** @hide */ @Override public void validate() { Loading