Home
last modified time | relevance | path

Searched refs:VibrationEffect (Results 1 – 25 of 133) sorted by relevance

123456

/frameworks/base/core/tests/vibrator/src/android/os/
DVibrationEffectTest.java19 import static android.os.VibrationEffect.DEFAULT_AMPLITUDE;
20 import static android.os.VibrationEffect.VibrationParameter.targetAmplitude;
21 import static android.os.VibrationEffect.VibrationParameter.targetFrequency;
40 import android.os.VibrationEffect.Composition.UnreachableAfterRepeatingIndefinitelyException;
68 private static final VibrationEffect TEST_ONE_SHOT =
69 VibrationEffect.createOneShot(TEST_TIMING, TEST_AMPLITUDE);
70 private static final VibrationEffect DEFAULT_ONE_SHOT =
71 VibrationEffect.createOneShot(TEST_TIMING, DEFAULT_AMPLITUDE);
72 private static final VibrationEffect TEST_WAVEFORM =
73 VibrationEffect.createWaveform(TEST_TIMINGS, TEST_AMPLITUDES, -1);
[all …]
DCombinedVibrationTest.java34 private static final VibrationEffect VALID_EFFECT = VibrationEffect.createOneShot(10, 255);
35 private static final VibrationEffect INVALID_EFFECT = new VibrationEffect.Composed(
50 .addVibrator(1, VibrationEffect.get(VibrationEffect.EFFECT_TICK)) in testValidateStereo()
122 VibrationEffect.createOneShot(1, 1)).getDuration()); in testDurationMono()
124 VibrationEffect.get(VibrationEffect.EFFECT_CLICK)).getDuration()); in testDurationMono()
126 VibrationEffect.startComposition() in testDurationMono()
127 .addPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK) in testDurationMono()
128 .addPrimitive(VibrationEffect.Composition.PRIMITIVE_TICK, 1, 100) in testDurationMono()
132 VibrationEffect.createWaveform( in testDurationMono()
139 .addVibrator(1, VibrationEffect.createOneShot(1, 1)) in testDurationStereo()
[all …]
DVibratorInfoTest.java83 .setSupportedEffects(VibrationEffect.EFFECT_CLICK) in testIsEffectSupported()
86 noEffects.isEffectSupported(VibrationEffect.EFFECT_CLICK)); in testIsEffectSupported()
88 canClick.isEffectSupported(VibrationEffect.EFFECT_CLICK)); in testIsEffectSupported()
90 canClick.isEffectSupported(VibrationEffect.EFFECT_TICK)); in testIsEffectSupported()
97 .setSupportedPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK, 10) in testIsPrimitiveSupported()
99 assertTrue(info.isPrimitiveSupported(VibrationEffect.Composition.PRIMITIVE_CLICK)); in testIsPrimitiveSupported()
100 assertFalse(info.isPrimitiveSupported(VibrationEffect.Composition.PRIMITIVE_TICK)); in testIsPrimitiveSupported()
104 .setSupportedPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK, 10) in testIsPrimitiveSupported()
106 assertFalse(info.isPrimitiveSupported(VibrationEffect.Composition.PRIMITIVE_CLICK)); in testIsPrimitiveSupported()
113 .setSupportedPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK, 20) in testGetPrimitiveDuration()
[all …]
/frameworks/base/core/tests/vibrator/src/android/os/vibrator/
DPrebakedSegmentTest.java28 import android.os.VibrationEffect;
41 VibrationEffect.EFFECT_CLICK, true, VibrationEffect.EFFECT_STRENGTH_MEDIUM); in testCreation()
44 assertEquals(VibrationEffect.EFFECT_CLICK, prebaked.getEffectId()); in testCreation()
45 assertEquals(VibrationEffect.EFFECT_STRENGTH_MEDIUM, prebaked.getEffectStrength()); in testCreation()
52 VibrationEffect.EFFECT_CLICK, true, VibrationEffect.EFFECT_STRENGTH_MEDIUM); in testSerialization()
61 new PrebakedSegment(VibrationEffect.EFFECT_CLICK, true, in testValidate()
62 VibrationEffect.EFFECT_STRENGTH_MEDIUM).validate(); in testValidate()
65 () -> new PrebakedSegment(1000, true, VibrationEffect.EFFECT_STRENGTH_MEDIUM) in testValidate()
68 () -> new PrebakedSegment(VibrationEffect.EFFECT_TICK, false, 1000) in testValidate()
75 VibrationEffect.EFFECT_CLICK, true, VibrationEffect.EFFECT_STRENGTH_MEDIUM); in testResolve_ignoresAndReturnsSameEffect()
[all …]
DPrimitiveSegmentTest.java28 import android.os.VibrationEffect;
42 VibrationEffect.Composition.PRIMITIVE_CLICK, 1, 10); in testCreation()
45 assertEquals(VibrationEffect.Composition.PRIMITIVE_CLICK, primitive.getPrimitiveId()); in testCreation()
53 VibrationEffect.Composition.PRIMITIVE_CLICK, 1, 10); in testSerialization()
62 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_CLICK, 1, 0).validate(); in testValidate()
67 () -> new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_NOOP, -1, 0) in testValidate()
70 () -> new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_NOOP, 1, -1) in testValidate()
77 VibrationEffect.Composition.PRIMITIVE_CLICK, 1, 0); in testResolve_ignoresAndReturnsSameEffect()
84 VibrationEffect.Composition.PRIMITIVE_CLICK, 1, 0); in testApplyEffectStrength_ignoresAndReturnsSameEffect()
86 primitive.applyEffectStrength(VibrationEffect.EFFECT_STRENGTH_STRONG)); in testApplyEffectStrength_ignoresAndReturnsSameEffect()
[all …]
DVibratorInfoFactoryTest.java23 import android.os.VibrationEffect;
39 .setSupportedEffects(VibrationEffect.EFFECT_CLICK) in testCreatedInfo_hasTheRequestedId()
43 .setSupportedPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK, 10) in testCreatedInfo_hasTheRequestedId()
66 .setSupportedEffects(VibrationEffect.EFFECT_TICK, VibrationEffect.EFFECT_THUD) in testCreatedInfo_fromSingleVibratorInfo_hasEqualContent()
67 .setSupportedPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK, 20) in testCreatedInfo_fromSingleVibratorInfo_hasEqualContent()
68 .setSupportedPrimitive(VibrationEffect.Composition.PRIMITIVE_TICK, 30) in testCreatedInfo_fromSingleVibratorInfo_hasEqualContent()
81 .setSupportedEffects(VibrationEffect.EFFECT_CLICK) in testCreatedInfo_hasEqualContentRegardlessOfSourceInfoOrder()
85 .setSupportedPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK, 10) in testCreatedInfo_hasEqualContentRegardlessOfSourceInfoOrder()
97 .setSupportedEffects(VibrationEffect.EFFECT_CLICK, VibrationEffect.EFFECT_POP) in testCreatedInfoContents()
98 .setSupportedPrimitive(VibrationEffect.Composition.PRIMITIVE_THUD, 5) in testCreatedInfoContents()
[all …]
/frameworks/base/core/java/com/android/internal/vibrator/persistence/
DXmlConstants.java22 import android.os.VibrationEffect;
23 import android.os.VibrationEffect.Composition.PrimitiveType;
72 LOW_TICK(VibrationEffect.Composition.PRIMITIVE_LOW_TICK),
73 TICK(VibrationEffect.Composition.PRIMITIVE_TICK),
74 CLICK(VibrationEffect.Composition.PRIMITIVE_CLICK),
75 SLOW_RISE(VibrationEffect.Composition.PRIMITIVE_SLOW_RISE),
76 QUICK_RISE(VibrationEffect.Composition.PRIMITIVE_QUICK_RISE),
77 QUICK_FALL(VibrationEffect.Composition.PRIMITIVE_QUICK_FALL),
78 SPIN(VibrationEffect.Composition.PRIMITIVE_SPIN),
79 THUD(VibrationEffect.Composition.PRIMITIVE_THUD);
[all …]
/frameworks/base/core/java/android/os/vibrator/
DPrebakedSegment.java24 import android.os.VibrationEffect;
39 public static final int DEFAULT_STRENGTH = VibrationEffect.EFFECT_STRENGTH_MEDIUM;
93 case VibrationEffect.EFFECT_CLICK: in areVibrationFeaturesSupported()
94 case VibrationEffect.EFFECT_DOUBLE_CLICK: in areVibrationFeaturesSupported()
95 case VibrationEffect.EFFECT_HEAVY_CLICK: in areVibrationFeaturesSupported()
96 case VibrationEffect.EFFECT_TICK: in areVibrationFeaturesSupported()
108 case VibrationEffect.EFFECT_CLICK: in isHapticFeedbackCandidate()
109 case VibrationEffect.EFFECT_DOUBLE_CLICK: in isHapticFeedbackCandidate()
110 case VibrationEffect.EFFECT_HEAVY_CLICK: in isHapticFeedbackCandidate()
111 case VibrationEffect.EFFECT_POP: in isHapticFeedbackCandidate()
[all …]
/frameworks/base/services/tests/vibrator/src/com/android/server/vibrator/
DDeviceAdapterTest.java28 import android.os.VibrationEffect;
92 VibrationEffect.Composed effect = new VibrationEffect.Composed(Arrays.asList( in testPrebakedAndPrimitiveSegments_returnsOriginalSegment()
94 VibrationEffect.EFFECT_CLICK, false, VibrationEffect.EFFECT_STRENGTH_LIGHT), in testPrebakedAndPrimitiveSegments_returnsOriginalSegment()
95 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_TICK, 1, 10), in testPrebakedAndPrimitiveSegments_returnsOriginalSegment()
97 VibrationEffect.EFFECT_THUD, true, VibrationEffect.EFFECT_STRENGTH_STRONG), in testPrebakedAndPrimitiveSegments_returnsOriginalSegment()
98 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_SPIN, 0.5f, 100)), in testPrebakedAndPrimitiveSegments_returnsOriginalSegment()
107 VibrationEffect.Composed effect = new VibrationEffect.Composed(Arrays.asList( in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps()
117 VibrationEffect.Composed adaptedEffect = in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps()
118 (VibrationEffect.Composed) mAdapter.adaptToVibrator(EMPTY_VIBRATOR_ID, effect); in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps()
129 VibrationEffect.Composed effect = new VibrationEffect.Composed(Arrays.asList( in testStepAndRampSegments_withPwleCapability_convertsStepsToRamps()
[all …]
DVibrationThreadTest.java20 import static android.os.VibrationEffect.VibrationParameter.targetAmplitude;
21 import static android.os.VibrationEffect.VibrationParameter.targetFrequency;
55 import android.os.VibrationEffect;
169 VibrationEffect.get(VibrationEffect.EFFECT_CLICK)); in vibrate_noVibrator_ignoresVibration()
180 .addNext(2, VibrationEffect.get(VibrationEffect.EFFECT_CLICK)) in vibrate_missingVibrators_ignoresVibration()
181 .addNext(3, VibrationEffect.get(VibrationEffect.EFFECT_TICK)) in vibrate_missingVibrators_ignoresVibration()
194 VibrationEffect effect = VibrationEffect.createOneShot(10, 100); in vibrate_singleVibratorOneShot_runsVibrationAndSetsAmplitude()
211 VibrationEffect effect = VibrationEffect.createOneShot(10, 100); in vibrate_oneShotWithoutAmplitudeControl_runsVibrationWithDefaultAmplitude()
230 VibrationEffect effect = VibrationEffect.createWaveform( in vibrate_singleVibratorWaveform_runsVibrationAndChangesAmplitudes()
252 VibrationEffect effect = VibrationEffect.createWaveform( in vibrate_singleWaveformWithAdaptiveHapticsScaling_scalesAmplitudesProperly()
[all …]
DVibratorManagerServiceTest.java76 import android.os.VibrationEffect;
186 private final SparseArray<VibrationEffect> mHapticFeedbackVibrationMap = new SparseArray<>();
387 VibrationEffect.createPredefined(VibrationEffect.EFFECT_CLICK)); in createService_doNotCrashIfUsedBeforeSystemReady()
440 vibrator.setSupportedEffects(VibrationEffect.EFFECT_CLICK); in getVibratorInfo_vibratorSuccessfulLoadBeforeSystemReady_returnsInfoForVibrator()
441 vibrator.setSupportedPrimitives(VibrationEffect.Composition.PRIMITIVE_CLICK); in getVibratorInfo_vibratorSuccessfulLoadBeforeSystemReady_returnsInfoForVibrator()
452 info.isEffectSupported(VibrationEffect.EFFECT_CLICK)); in getVibratorInfo_vibratorSuccessfulLoadBeforeSystemReady_returnsInfoForVibrator()
454 info.isEffectSupported(VibrationEffect.EFFECT_TICK)); in getVibratorInfo_vibratorSuccessfulLoadBeforeSystemReady_returnsInfoForVibrator()
455 assertTrue(info.isPrimitiveSupported(VibrationEffect.Composition.PRIMITIVE_CLICK)); in getVibratorInfo_vibratorSuccessfulLoadBeforeSystemReady_returnsInfoForVibrator()
456 assertFalse(info.isPrimitiveSupported(VibrationEffect.Composition.PRIMITIVE_TICK)); in getVibratorInfo_vibratorSuccessfulLoadBeforeSystemReady_returnsInfoForVibrator()
488 VibrationEffect.createOneShot(oneShotDuration, VibrationEffect.DEFAULT_AMPLITUDE), in registerVibratorStateListener_callbacksAreTriggered()
[all …]
DVibrationScalerTest.java43 import android.os.VibrationEffect;
188 PrebakedSegment effect = new PrebakedSegment(VibrationEffect.EFFECT_CLICK, in scale_withPrebakedSegment_setsEffectStrengthBasedOnSettings()
189 /* shouldFallback= */ false, VibrationEffect.EFFECT_STRENGTH_MEDIUM); in scale_withPrebakedSegment_setsEffectStrengthBasedOnSettings()
192 assertEquals(scaled.getEffectStrength(), VibrationEffect.EFFECT_STRENGTH_STRONG); in scale_withPrebakedSegment_setsEffectStrengthBasedOnSettings()
197 assertEquals(scaled.getEffectStrength(), VibrationEffect.EFFECT_STRENGTH_MEDIUM); in scale_withPrebakedSegment_setsEffectStrengthBasedOnSettings()
201 assertEquals(scaled.getEffectStrength(), VibrationEffect.EFFECT_STRENGTH_LIGHT); in scale_withPrebakedSegment_setsEffectStrengthBasedOnSettings()
206 assertEquals(scaled.getEffectStrength(), VibrationEffect.EFFECT_STRENGTH_MEDIUM); in scale_withPrebakedSegment_setsEffectStrengthBasedOnSettings()
213 VibrationEffect effect = VibrationEffect.createPredefined(VibrationEffect.EFFECT_CLICK); in scale_withPrebakedEffect_setsEffectStrengthBasedOnSettings()
217 assertEquals(scaled.getEffectStrength(), VibrationEffect.EFFECT_STRENGTH_STRONG); in scale_withPrebakedEffect_setsEffectStrengthBasedOnSettings()
222 assertEquals(scaled.getEffectStrength(), VibrationEffect.EFFECT_STRENGTH_MEDIUM); in scale_withPrebakedEffect_setsEffectStrengthBasedOnSettings()
[all …]
DHapticFeedbackCustomizationTest.java20 import static android.os.VibrationEffect.Composition.PRIMITIVE_TICK;
21 import static android.os.VibrationEffect.EFFECT_CLICK;
32 import android.os.VibrationEffect;
62 private static final VibrationEffect COMPOSITION_VIBRATION =
63 VibrationEffect.startComposition().addPrimitive(PRIMITIVE_TICK, 0.2497f).compose();
67 private static final VibrationEffect PREDEFINED_VIBRATION =
68 VibrationEffect.createPredefined(EFFECT_CLICK);
75 private static final VibrationEffect WAVEFORM_VIBARTION =
76 VibrationEffect.createWaveform(new long[] {123}, new int[] {254}, -1);
116 SparseArray<VibrationEffect> expectedMapping = new SparseArray<>(); in testParseCustomizations_oneVibrationCustomization_success()
[all …]
/frameworks/base/services/core/java/com/android/server/vibrator/
DHapticFeedbackVibrationProvider.java22 import android.os.VibrationEffect;
53 private final VibrationEffect mSafeModeEnabledVibrationEffect;
57 @Nullable private final SparseArray<VibrationEffect> mHapticCustomizations;
72 @Nullable SparseArray<VibrationEffect> hapticCustomizations) { in HapticFeedbackVibrationProvider()
102 @Nullable public VibrationEffect getVibrationForHapticFeedback(int effectId) { in getVibrationForHapticFeedback()
109 return getVibration(effectId, VibrationEffect.EFFECT_TICK); in getVibrationForHapticFeedback()
118 return getVibration(effectId, VibrationEffect.EFFECT_TEXTURE_TICK); in getVibrationForHapticFeedback()
128 VibrationEffect.EFFECT_TICK, in getVibrationForHapticFeedback()
139 return getVibration(effectId, VibrationEffect.EFFECT_CLICK); in getVibrationForHapticFeedback()
145 return getVibration(effectId, VibrationEffect.EFFECT_HEAVY_CLICK); in getVibrationForHapticFeedback()
[all …]
DPerformPrebakedVibratorStep.java20 import android.os.VibrationEffect;
37 VibratorController controller, VibrationEffect.Composed effect, int index, in PerformPrebakedVibratorStep()
59 Slog.d(VibrationThread.TAG, "Perform " + VibrationEffect.effectIdToString( in play()
64 VibrationEffect fallback = getVibration().getFallback(prebaked.getEffectId()); in play()
70 && (fallback instanceof VibrationEffect.Composed)) { in play()
73 + VibrationEffect.effectIdToString(prebaked.getEffectId())); in play()
76 replaceCurrentSegment((VibrationEffect.Composed) fallback), in play()
97 private VibrationEffect.Composed replaceCurrentSegment(VibrationEffect.Composed fallback) { in replaceCurrentSegment()
105 return new VibrationEffect.Composed(newSegments, newRepeatIndex); in replaceCurrentSegment()
/frameworks/base/packages/SystemUI/tests/utils/src/com/android/systemui/haptics/
DFakeVibratorHelper.kt22 import android.os.VibrationEffect
34 private val vibrationEffectHistory = ArrayList<VibrationEffect>()
39 override fun vibrate(effect: VibrationEffect) { in vibrate()
43 override fun vibrate(effect: VibrationEffect, attributes: VibrationAttributes) = vibrate(effect) in vibrate()
45 override fun vibrate(effect: VibrationEffect, attributes: AudioAttributes) = vibrate(effect) in vibrate()
50 vibe: VibrationEffect, in vibrate()
58 fun hasVibratedWithEffects(vararg effects: VibrationEffect): Boolean = in hasVibratedWithEffects()
61 fun timesVibratedWithEffect(effect: VibrationEffect): Int = in hasVibratedWithEffects()
67 VibrationEffect.Composition.PRIMITIVE_NOOP to 0,
68 VibrationEffect.Composition.PRIMITIVE_CLICK to 12,
[all …]
/frameworks/base/core/tests/vibrator/src/android/os/vibrator/persistence/
DVibrationEffectXmlSerializationTest.java19 import static android.os.VibrationEffect.Composition.PRIMITIVE_CLICK;
20 import static android.os.VibrationEffect.Composition.PRIMITIVE_LOW_TICK;
21 import static android.os.VibrationEffect.Composition.PRIMITIVE_SPIN;
22 import static android.os.VibrationEffect.Composition.PRIMITIVE_TICK;
29 import android.os.VibrationEffect;
73 VibrationEffect effect = VibrationEffect.startComposition() in testParseElement_fromVibrationTag_succeedAndParserPointsToEndVibrationTag()
81 VibrationEffect effect2 = VibrationEffect.startComposition() in testParseElement_fromVibrationTag_succeedAndParserPointsToEndVibrationTag()
120 parser, VibrationEffect.startComposition().addPrimitive(PRIMITIVE_TICK).compose()); in testParseElement_fromVibrationTag_succeedAndParserPointsToEndVibrationTag()
127 VibrationEffect effect1 = VibrationEffect.startComposition() in testParseElement_fromVibrationSelectTag_succeedAndParserPointsToEndVibrationSelectTag()
135 VibrationEffect effect2 = VibrationEffect.startComposition() in testParseElement_fromVibrationSelectTag_succeedAndParserPointsToEndVibrationSelectTag()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/taptotransfer/sender/
DTransferStatus.kt19 import android.os.VibrationEffect
28 val vibrationEffect: VibrationEffect? = null,
33 VibrationEffect.startComposition()
34 .addPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK, 1.0f, 0)
40 VibrationEffect.startComposition()
41 .addPrimitive(VibrationEffect.Composition.PRIMITIVE_QUICK_RISE, 1.0f, 0)
42 .addPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK, 0.7f, 70)
48 FAILED(vibrationEffect = VibrationEffect.get(VibrationEffect.EFFECT_DOUBLE_CLICK)),
/frameworks/base/packages/SystemUI/src/com/android/systemui/haptics/qs/
DLongPressHapticBuilder.kt19 import android.os.VibrationEffect in <lambda>()
39 ): VibrationEffect? { in <lambda>()
57 val composition = VibrationEffect.startComposition() in <lambda>()
62 VibrationEffect.Composition.PRIMITIVE_LOW_TICK, in <lambda>()
69 composition.addPrimitive(VibrationEffect.Composition.PRIMITIVE_SPIN, SPIN_SCALE, 0) in <lambda>()
74 VibrationEffect.Composition.PRIMITIVE_LOW_TICK, in <lambda>()
84 fun createSnapEffect(): VibrationEffect? = in <lambda>()
85 VibrationEffect.startComposition() in <lambda>()
86 .addPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK, CLICK_SCALE, 0) in <lambda>()
94 ): VibrationEffect? { in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/ui/binder/
DKeyguardBottomAreaVibrations.kt19 import android.os.VibrationEffect
31 VibrationEffect.startComposition()
40 VibrationEffect.Composition.PRIMITIVE_TICK, in <lambda>()
49 VibrationEffect.startComposition()
51 VibrationEffect.Composition.PRIMITIVE_TICK,
56 VibrationEffect.Composition.PRIMITIVE_QUICK_RISE,
63 VibrationEffect.startComposition()
65 VibrationEffect.Composition.PRIMITIVE_TICK,
70 VibrationEffect.Composition.PRIMITIVE_QUICK_FALL,
/frameworks/base/apct-tests/perftests/core/src/android/os/
DVibratorPerfTest.java49 mVibrator.vibrate(VibrationEffect.createPredefined(VibrationEffect.EFFECT_CLICK)); in testEffectClick()
57 mVibrator.vibrate(VibrationEffect.createOneShot(SECONDS.toMillis(2), in testOneShot()
58 VibrationEffect.DEFAULT_AMPLITUDE)); in testOneShot()
67 mVibrator.vibrate(VibrationEffect.createWaveform(timings, -1)); in testWaveform()
76 VibrationEffect.startComposition() in testCompose()
77 .addPrimitive(VibrationEffect.Composition.PRIMITIVE_CLICK) in testCompose()
78 .addPrimitive(VibrationEffect.Composition.PRIMITIVE_TICK, 0.5f, 100) in testCompose()
86 int[] effects = new int[]{VibrationEffect.EFFECT_CLICK, VibrationEffect.EFFECT_TICK}; in testAreEffectsSupported()
95 int[] primitives = new int[]{VibrationEffect.Composition.PRIMITIVE_CLICK, in testArePrimitivesSupported()
96 VibrationEffect.Composition.PRIMITIVE_TICK}; in testArePrimitivesSupported()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/haptics/slider/
DSliderHapticFeedbackProviderTest.kt19 import android.os.VibrationEffect
59 kosmos.vibratorHelper.primitiveDurations[VibrationEffect.Composition.PRIMITIVE_LOW_TICK] = in setup()
74 VibrationEffect.startComposition() in playHapticAtLowerBookend_playsClick()
76 VibrationEffect.Composition.PRIMITIVE_CLICK, in playHapticAtLowerBookend_playsClick()
92 VibrationEffect.startComposition() in playHapticAtLowerBookend_twoTimes_playsClickOnlyOnce()
94 VibrationEffect.Composition.PRIMITIVE_CLICK, in playHapticAtLowerBookend_twoTimes_playsClickOnlyOnce()
109 VibrationEffect.startComposition() in playHapticAtUpperBookend_playsClick()
111 VibrationEffect.Composition.PRIMITIVE_CLICK, in playHapticAtUpperBookend_playsClick()
127 VibrationEffect.startComposition() in playHapticAtUpperBookend_twoTimes_playsClickOnlyOnce()
129 VibrationEffect.Composition.PRIMITIVE_CLICK, in playHapticAtUpperBookend_twoTimes_playsClickOnlyOnce()
[all …]
/frameworks/base/services/core/java/com/android/server/notification/
DVibratorHelper.java19 import static android.os.VibrationEffect.VibrationParameter.targetAmplitude;
20 import static android.os.VibrationEffect.VibrationParameter.targetFrequency;
29 import android.os.VibrationEffect;
82 public static VibrationEffect createWaveformVibration(@Nullable long[] pattern, in createWaveformVibration()
86 return VibrationEffect.createWaveform(pattern, /* repeat= */ insistent ? 0 : -1); in createWaveformVibration()
108 public static VibrationEffect createPwleWaveformVibration(@Nullable float[] values, in createPwleWaveformVibration()
121 VibrationEffect.WaveformBuilder waveformBuilder = VibrationEffect.startWaveform(); in createPwleWaveformVibration()
127 VibrationEffect effect = waveformBuilder.build(); in createPwleWaveformVibration()
129 return VibrationEffect.startComposition() in createPwleWaveformVibration()
145 public VibrationEffect scale(VibrationEffect effect, float scale) { in scale()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DVibratorHelper.java24 import android.os.VibrationEffect;
51 private static final VibrationEffect BIOMETRIC_SUCCESS_VIBRATION_EFFECT =
52 VibrationEffect.get(VibrationEffect.EFFECT_CLICK);
53 private static final VibrationEffect BIOMETRIC_ERROR_VIBRATION_EFFECT =
54 VibrationEffect.get(VibrationEffect.EFFECT_DOUBLE_CLICK);
85 mVibrator.vibrate(VibrationEffect.get(effectId, false /* fallback */), in vibrate()
92 public void vibrate(int uid, String opPkg, @NonNull VibrationEffect vibe, in vibrate()
103 public void vibrate(@NonNull VibrationEffect effect, @NonNull AudioAttributes attributes) { in vibrate()
113 public void vibrate(@NotNull VibrationEffect effect) { in vibrate()
123 public void vibrate(@NonNull VibrationEffect effect, @NonNull VibrationAttributes attributes) { in vibrate()
/frameworks/base/core/java/android/os/vibrator/persistence/
DParsedVibration.java23 import android.os.VibrationEffect;
41 private final List<VibrationEffect> mEffects;
44 public ParsedVibration(@NonNull List<VibrationEffect> effects) { in ParsedVibration()
49 public ParsedVibration(@NonNull VibrationEffect effect) { in ParsedVibration()
60 public VibrationEffect resolve(@NonNull Vibrator vibrator) { in resolve()
75 public List<VibrationEffect> getVibrationEffects() { in getVibrationEffects()
85 public final VibrationEffect resolve(@NonNull VibratorInfo info) { in resolve()
87 VibrationEffect effect = mEffects.get(i); in resolve()

123456