Home
last modified time | relevance | path

Searched refs:prebaked (Results 1 – 9 of 9) sorted by relevance

/frameworks/base/core/tests/coretests/src/android/os/vibrator/
DPrebakedSegmentTest.java40 PrebakedSegment prebaked = new PrebakedSegment( in testCreation() local
43 assertEquals(-1, prebaked.getDuration()); in testCreation()
44 assertTrue(prebaked.hasNonZeroAmplitude()); in testCreation()
45 assertEquals(VibrationEffect.EFFECT_CLICK, prebaked.getEffectId()); in testCreation()
46 assertEquals(VibrationEffect.EFFECT_STRENGTH_MEDIUM, prebaked.getEffectStrength()); in testCreation()
47 assertTrue(prebaked.shouldFallback()); in testCreation()
75 PrebakedSegment prebaked = new PrebakedSegment( in testResolve_ignoresAndReturnsSameEffect() local
77 assertSame(prebaked, prebaked.resolve(1000)); in testResolve_ignoresAndReturnsSameEffect()
104 PrebakedSegment prebaked = new PrebakedSegment( in testScale_ignoresAndReturnsSameEffect() local
106 assertSame(prebaked, prebaked.scale(0.5f)); in testScale_ignoresAndReturnsSameEffect()
/frameworks/base/services/core/java/com/android/server/vibrator/
DVibratorController.java194 public void updateAlwaysOn(int id, @Nullable PrebakedSegment prebaked) { in updateAlwaysOn() argument
199 if (prebaked == null) { in updateAlwaysOn()
202 mNativeWrapper.alwaysOnEnable(id, prebaked.getEffectId(), in updateAlwaysOn()
203 prebaked.getEffectStrength()); in updateAlwaysOn()
249 public long on(PrebakedSegment prebaked, long vibrationId) { in on() argument
251 long duration = mNativeWrapper.perform(prebaked.getEffectId(), in on()
252 prebaked.getEffectStrength(), vibrationId); in on()
DVibrationScaler.java122 public PrebakedSegment scale(PrebakedSegment prebaked, int usageHint) { in scale() argument
125 return prebaked.applyEffectStrength(newEffectStrength); in scale()
DVibrationThread.java1000 PrebakedSegment prebaked = (PrebakedSegment) segment; in play() local
1003 prebaked.getEffectId()) + " on vibrator " in play()
1007 VibrationEffect fallback = mVibration.getFallback(prebaked.getEffectId()); in play()
1008 mVibratorOnResult = controller.on(prebaked, mVibration.id); in play()
1010 if (mVibratorOnResult == 0 && prebaked.shouldFallback() in play()
1014 + VibrationEffect.effectIdToString(prebaked.getEffectId())); in play()
DVibratorManagerService.java834 PrebakedSegment prebaked = (PrebakedSegment) segment; in fillVibrationFallbacks() local
836 prebaked.getEffectId()); in fillVibrationFallbacks()
837 if (prebaked.shouldFallback() && fallback != null) { in fillVibrationFallbacks()
838 vib.addFallback(prebaked.getEffectId(), fallback); in fillVibrationFallbacks()
883 PrebakedSegment prebaked = extractPrebakedSegment(effects.valueAt(i)); in fixupAlwaysOnEffectsLocked() local
884 if (prebaked == null) { in fixupAlwaysOnEffectsLocked()
891 result.put(vibratorId, prebaked); in fixupAlwaysOnEffectsLocked()
/frameworks/base/services/tests/servicestests/src/com/android/server/vibrator/
DVibratorControllerTest.java166 PrebakedSegment prebaked = createPrebaked(VibrationEffect.EFFECT_CLICK, in updateAlwaysOn_withCapability_enablesAlwaysOnEffect() local
168 createController().updateAlwaysOn(1, prebaked); in updateAlwaysOn_withCapability_enablesAlwaysOnEffect()
184 PrebakedSegment prebaked = createPrebaked(VibrationEffect.EFFECT_CLICK, in updateAlwaysOn_withoutCapability_ignoresEffect() local
186 createController().updateAlwaysOn(1, prebaked); in updateAlwaysOn_withoutCapability_ignoresEffect()
207 PrebakedSegment prebaked = createPrebaked(VibrationEffect.EFFECT_CLICK, in on_withPrebaked_performsEffect() local
209 assertEquals(10L, controller.on(prebaked, 11)); in on_withPrebaked_performsEffect()
DFakeVibratorControllerProvider.java148 PrebakedSegment prebaked = new PrebakedSegment((int) effect, false, (int) strength); in alwaysOnEnable() local
149 mEnabledAlwaysOnEffects.put(id, prebaked); in alwaysOnEnable()
/frameworks/base/core/java/android/os/
DVibrationAttributes.java340 PrebakedSegment prebaked = extractPrebakedSegment(effect); in applyHapticFeedbackHeuristics() local
341 if (mUsage == USAGE_UNKNOWN && prebaked != null) { in applyHapticFeedbackHeuristics()
342 switch (prebaked.getEffectId()) { in applyHapticFeedbackHeuristics()
/frameworks/base/core/proto/android/server/vibrator/
Dvibratormanagerservice.proto56 optional PrebakedSegmentProto prebaked = 1; field