Home
last modified time | relevance | path

Searched refs:StepSegment (Results 1 – 25 of 27) sorted by relevance

12

/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/vibrator/
H A DRampDownAdapterTest.java26 import android.os.vibrator.StepSegment;
89 new StepSegment(/* amplitude= */ 1, /* frequencyHz= */ 0, /* duration= */ 10), in testRampAndStepSegments_withNoRampDownDuration_keepsOriginalSteps()
90 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 0, /* duration= */ 100), in testRampAndStepSegments_withNoRampDownDuration_keepsOriginalSteps()
105 new StepSegment(/* amplitude= */ 1, /* frequencyHz= */ 0, /* duration= */ 10), in testStepSegments_withShortZeroSegment_replaceWithStepsDown()
108 new StepSegment(/* amplitude= */ 1, /* frequencyHz= */ 0, /* duration= */ 10), in testStepSegments_withShortZeroSegment_replaceWithStepsDown()
110 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 0, /* duration= */ 5)); in testStepSegments_withShortZeroSegment_replaceWithStepsDown()
119 new StepSegment(/* amplitude= */ 1, /* frequencyHz= */ 0, /* duration= */ 10), in testStepSegments_withLongZeroSegment_replaceWithStepsDownWithRemainingOffSegment()
124 new StepSegment(/* amplitude= */ 1, /* frequencyHz= */ 0, /* duration= */ 10), in testStepSegments_withLongZeroSegment_replaceWithStepsDownWithRemainingOffSegment()
128 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 0, /* duration= */ 35), in testStepSegments_withLongZeroSegment_replaceWithStepsDownWithRemainingOffSegment()
138 new StepSegment(/* amplitude= */ 1, /* frequencyHz= */ 0, /* duration= */ 10), in testStepSegments_withZeroSegmentBeforeRepeat_fixesRepeat()
[all …]
H A DRampToStepAdapterTest.java27 import android.os.vibrator.StepSegment;
65 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 1, /* duration= */ 10), in testStepAndPrebakedAndPrimitiveSegments_keepsListUnchanged()
80 new StepSegment(/* amplitude= */ 0.5f, /* frequencyHz= */ 0, /* duration= */ 100), in testRampSegments_withPwleCapability_keepsListUnchanged()
95 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 1, /* duration= */ 10), in testRampSegments_withoutPwleCapability_convertsRampsToSteps()
105 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 1, /* duration= */ 10), in testRampSegments_withoutPwleCapability_convertsRampsToSteps()
108 new StepSegment(/* amplitude= */ 1, /* frequencyHz= */ 10, /* duration= */ 5), in testRampSegments_withoutPwleCapability_convertsRampsToSteps()
109 new StepSegment(/* amplitude= */ 0.2f, /* frequencyHz= */ 150, /* duration= */ 5), in testRampSegments_withoutPwleCapability_convertsRampsToSteps()
111 new StepSegment(/* amplitude= */ 0.8f, /* frequencyHz= */ 30, /* duration= */ 5), in testRampSegments_withoutPwleCapability_convertsRampsToSteps()
112 new StepSegment(/* amplitude= */ 0.6f, /* frequencyHz= */ 40, /* duration= */ 5), in testRampSegments_withoutPwleCapability_convertsRampsToSteps()
113 new StepSegment(/* amplitude= */ 0.2f, /* frequencyHz= */ 60, /* duration= */ 1), in testRampSegments_withoutPwleCapability_convertsRampsToSteps()
[all …]
H A DStepToRampAdapterTest.java27 import android.os.vibrator.StepSegment;
113 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 1, /* duration= */ 10), in testStepAndRampSegments_withoutPwleCapability_keepsListUnchanged()
127 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 0, /* duration= */ 10), in testStepAndRampSegments_withPwleCapabilityAndNoFrequency_keepsOriginalSteps()
128 new StepSegment(/* amplitude= */ 0.5f, /* frequencyHz= */ 0, /* duration= */ 100), in testStepAndRampSegments_withPwleCapabilityAndNoFrequency_keepsOriginalSteps()
146 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 200, /* duration= */ 10), in testStepAndRampSegments_withPwleCapabilityAndStepNextToRamp_convertsStepsToRamps()
147 new StepSegment(/* amplitude= */ 0.5f, /* frequencyHz= */ 150, /* duration= */ 60), in testStepAndRampSegments_withPwleCapabilityAndStepNextToRamp_convertsStepsToRamps()
152 new StepSegment(/* amplitude= */ 0.8f, /* frequencyHz= */ 10, /* duration= */ 60))); in testStepAndRampSegments_withPwleCapabilityAndStepNextToRamp_convertsStepsToRamps()
176 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 100, /* duration= */ 10), in testStepSegments_withPwleCapabilityAndFrequency_convertsStepsToRamps()
177 new StepSegment(/* amplitude= */ 0.5f, /* frequencyHz= */ 0, /* duration= */ 6))); in testStepSegments_withPwleCapabilityAndFrequency_convertsStepsToRamps()
H A DDeviceVibrationEffectAdapterTest.java33 import android.os.vibrator.StepSegment;
107 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 200, /* duration= */ 10), in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps()
108 new StepSegment(/* amplitude= */ 0.5f, /* frequencyHz= */ 150, /* duration= */ 100), in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps()
123 assertTrue(adaptedSegment instanceof StepSegment); in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps()
130 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 175, /* duration= */ 10), in testStepAndRampSegments_withPwleCapability_convertsStepsToRamps()
131 new StepSegment(/* amplitude= */ 0.5f, /* frequencyHz= */ 150, /* duration= */ 60), in testStepAndRampSegments_withPwleCapability_convertsStepsToRamps()
157 new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 175, /* duration= */ 10), in testStepAndRampSegments_withEmptyFreqMapping_returnsAmplitudesWithResonantFreq()
158 new StepSegment(/* amplitude= */ 0.5f, /* frequencyHz= */ 0, /* duration= */ 100), in testStepAndRampSegments_withEmptyFreqMapping_returnsAmplitudesWithResonantFreq()
188 new StepSegment(/* amplitude= */ 0.5f, /* frequencyHz= */ 0, /* duration= */ 10), in testStepAndRampSegments_withValidFreqMapping_returnsClippedValues()
189 new StepSegment(/* amplitude= */ 1, /* frequencyHz= */ 125, /* duration= */ 100), in testStepAndRampSegments_withValidFreqMapping_returnsClippedValues()
H A DVibrationScalerTest.java48 import android.os.vibrator.StepSegment;
204 StepSegment resolved = getFirstSegment(mVibrationScaler.scale( in scale_withOneShotAndWaveform_resolvesAmplitude()
225 StepSegment scaled = getFirstSegment(mVibrationScaler.scale( in scale_withOneShotAndWaveform_scalesAmplitude()
H A DFakeVibratorControllerProvider.java27 import android.os.vibrator.StepSegment;
99 recordEffectSegment(vibrationId, new StepSegment(VibrationEffect.DEFAULT_AMPLITUDE, in on()
H A DVibrationThreadTest.java58 import android.os.vibrator.StepSegment;
706 assertTrue(segments.get(i) instanceof StepSegment); in vibrate_singleVibratorComposedWithFallback_replacedInTheMiddleOfComposition()
1646 return new StepSegment(VibrationEffect.DEFAULT_AMPLITUDE, in expectedOneShot()
H A DVibratorManagerServiceTest.java76 import android.os.vibrator.StepSegment;
1100 assertEquals(1, played.stream().filter(StepSegment.class::isInstance).count()); in vibrate_withOngoingSameImportancePipelinedVibration_continuesOngoingEffect()
1468 assertTrue(segments.get(i) instanceof StepSegment); in vibrate_prebakedAndComposedVibrationsWithFallbacks_playsFallbackOnlyForPredefined()
/aosp14/frameworks/base/core/tests/coretests/src/android/os/vibrator/
H A DStepSegmentTest.java53 StepSegment step = new StepSegment(/* amplitude= */ 1f, /* frequencyHz= */ 1f, in testCreation()
64 StepSegment original = new StepSegment(0.5f, 1f, 10); in testSerialization()
101 StepSegment original = new StepSegment(VibrationEffect.DEFAULT_AMPLITUDE, 0, 0); in testResolve()
105 StepSegment resolved = new StepSegment(0, 0, 0); in testResolve()
113 StepSegment step = new StepSegment(VibrationEffect.DEFAULT_AMPLITUDE, 0, 0); in testApplyEffectStrength_ignoresAndReturnsSameEffect()
119 StepSegment initial = new StepSegment(1f, 0, 0); in testScale_fullAmplitude()
133 StepSegment initial = new StepSegment(0.5f, 0, 0); in testScale_halfAmplitude()
147 StepSegment initial = new StepSegment(0, 0, 0); in testScale_zeroAmplitude()
156 StepSegment initial = new StepSegment(VibrationEffect.DEFAULT_AMPLITUDE, 0, 0); in testScale_defaultAmplitude()
172 StepSegment segment = in testVibrationFeaturesSupport_zeroAmplitude_supported()
[all …]
/aosp14/frameworks/base/core/java/android/os/vibrator/
H A DStepSegment.java43 public final class StepSegment extends VibrationEffectSegment { class
48 StepSegment(@NonNull Parcel in) { in StepSegment() method in StepSegment
61 if (!(o instanceof StepSegment)) { in equals()
64 StepSegment other = (StepSegment) o; in equals()
122 public StepSegment resolve(int defaultAmplitude) { in resolve()
139 public StepSegment scale(float scaleFactor) { in scale()
150 public StepSegment applyEffectStrength(int effectStrength) { in applyEffectStrength()
182 new Parcelable.Creator<StepSegment>() {
187 return new StepSegment(in);
191 public StepSegment[] newArray(int size) {
[all …]
H A DVibrationEffectSegment.java191 return new StepSegment(in);
/aosp14/frameworks/base/services/core/java/com/android/server/vibrator/
H A DRampDownAdapter.java21 import android.os.vibrator.StepSegment;
91 if (previousSegment instanceof StepSegment) { in addRampDownToZeroAmplitudeSegments()
178 if (lastSegment instanceof StepSegment) { in addRampDownToLoop()
179 float previousAmplitude = ((StepSegment) lastSegment).getAmplitude(); in addRampDownToLoop()
203 steps.add(new StepSegment(0, frequency, remainingDuration)); in createStepsDown()
218 } else if (segment instanceof StepSegment) { in updateDuration()
219 StepSegment step = (StepSegment) segment; in updateDuration()
227 if (segment instanceof StepSegment) { in isOffSegment()
228 StepSegment ramp = (StepSegment) segment; in isOffSegment()
239 if (segment instanceof StepSegment) { in endsWithNonZeroAmplitude()
[all …]
H A DRampToStepAdapter.java22 import android.os.vibrator.StepSegment;
56 List<StepSegment> steps = apply(info, (RampSegment) segment); in apply()
69 private List<StepSegment> apply(VibratorInfo info, RampSegment ramp) { in apply()
73 new StepSegment(ramp.getStartAmplitude(), in apply()
78 List<StepSegment> steps = new ArrayList<>(); in apply()
85 steps.add(new StepSegment( in apply()
92 steps.add(new StepSegment(ramp.getEndAmplitude(), endFrequencyHz, duration)); in apply()
H A DClippingAmplitudeAndFrequencyAdapter.java21 import android.os.vibrator.StepSegment;
43 if (segment instanceof StepSegment) { in apply()
44 segments.set(i, apply((StepSegment) segment, info)); in apply()
52 private StepSegment apply(StepSegment segment, VibratorInfo info) { in apply()
54 return new StepSegment( in apply()
H A DStepToRampAdapter.java22 import android.os.vibrator.StepSegment;
55 if (isStep(segment) && ((StepSegment) segment).getFrequencyHz() != 0) { in convertStepsToRamps()
56 segments.set(i, convertStepToRamp(info, (StepSegment) segment)); in convertStepsToRamps()
64 segments.set(j, convertStepToRamp(info, (StepSegment) segments.get(j))); in convertStepsToRamps()
67 segments.set(j, convertStepToRamp(info, (StepSegment) segments.get(j))); in convertStepsToRamps()
108 private static RampSegment convertStepToRamp(VibratorInfo info, StepSegment segment) { in convertStepToRamp()
147 return segment instanceof StepSegment; in isStep()
H A DSetAmplitudeVibratorStep.java22 import android.os.vibrator.StepSegment;
95 if (!(segment instanceof StepSegment)) { in play()
102 StepSegment stepSegment = (StepSegment) segment; in play()
181 if (!(segment instanceof StepSegment) in getVibratorOnDuration()
182 || ((StepSegment) segment).getAmplitude() == 0) { in getVibratorOnDuration()
H A DVibration.java28 import android.os.vibrator.StepSegment;
335 if (segment instanceof StepSegment) { in dumpEffect()
336 dumpEffect(proto, SegmentProto.STEP, (StepSegment) segment); in dumpEffect()
347 private void dumpEffect(ProtoOutputStream proto, long fieldId, StepSegment segment) { in dumpEffect()
H A DStartSequentialEffectStep.java28 import android.os.vibrator.StepSegment;
341 if (firstSegment instanceof StepSegment) { in calculateRequiredSyncCapabilities()
H A DComposePwleVibratorStep.java22 import android.os.vibrator.StepSegment;
/aosp14/frameworks/base/core/java/android/os/
H A DVibrationEffect.java35 import android.os.vibrator.StepSegment;
284 List<StepSegment> segments = new ArrayList<>(); in createWaveform()
288 segments.add(new StepSegment(parsedAmplitude, /* frequencyHz= */ 0, (int) timings[i])); in createWaveform()
708 StepSegment stepSegment = in computeCreateWaveformOffOnTimingsOrNull()
914 private static StepSegment castToValidStepSegmentForOffOnTimingsOrNull( in castToValidStepSegmentForOffOnTimingsOrNull()
916 if (!(segment instanceof StepSegment)) { in castToValidStepSegmentForOffOnTimingsOrNull()
920 StepSegment stepSegment = (StepSegment) segment; in castToValidStepSegmentForOffOnTimingsOrNull()
1054 addSegment(new StepSegment(/* amplitude= */ 0, /* frequencyHz= */ 0, in addOffDuration()
1407 mSegments.add(new StepSegment(mLastAmplitude, mLastFrequencyHz, durationMs)); in addSustain()
1476 mSegments.add(new StepSegment(targetAmplitude, targetFrequency, durationMs)); in addTransitionSegment()
/aosp14/frameworks/base/core/tests/coretests/src/android/os/
H A DVibrationEffectTest.java46 import android.os.vibrator.StepSegment;
645 assertEquals(0.2f, ((StepSegment) resolved.getSegments().get(0)).getAmplitude()); in testResolveOneShot()
653 assertEquals(0.4f, ((StepSegment) resolved.getSegments().get(2)).getAmplitude()); in testResolveWaveform()
675 assertEquals(0.2f, ((StepSegment) resolved.getSegments().get(0)).getAmplitude()); in testResolveComposed()
718 assertTrue(100 / 255f < ((StepSegment) scaledUp.getSegments().get(0)).getAmplitude()); in testScaleOneShot()
721 assertTrue(100 / 255f > ((StepSegment) scaledDown.getSegments().get(0)).getAmplitude()); in testScaleOneShot()
727 assertEquals(1f, ((StepSegment) scaledUp.getSegments().get(0)).getAmplitude(), 1e-5f); in testScaleWaveform()
730 assertTrue(1f > ((StepSegment) scaledDown.getSegments().get(0)).getAmplitude()); in testScaleWaveform()
754 assertTrue(100 / 255f < ((StepSegment) scaledUp.getSegments().get(1)).getAmplitude()); in testScaleComposed()
758 assertTrue(100 / 255f > ((StepSegment) scaledDown.getSegments().get(1)).getAmplitude()); in testScaleComposed()
/aosp14/frameworks/base/services/core/java/com/android/server/input/
H A DInputManagerService.java79 import android.os.vibrator.StepSegment;
1477 if (!(segment instanceof StepSegment)) { in VibrationInfo()
1482 float amplitude = ((StepSegment) segment).getAmplitude(); in VibrationInfo()
/aosp14/frameworks/base/core/api/
H A Dtest-current.txt2614 public final class StepSegment extends android.os.vibrator.VibrationEffectSegment {
2620 …NonNull public static final android.os.Parcelable.Creator<android.os.vibrator.StepSegment> CREATOR;
/aosp14/frameworks/base/boot/
H A Dpreloaded-classes6360 android.os.vibrator.StepSegment$1
6361 android.os.vibrator.StepSegment
/aosp14/frameworks/base/config/
H A Dpreloaded-classes6364 android.os.vibrator.StepSegment$1
6365 android.os.vibrator.StepSegment

12