/aosp12/frameworks/base/services/tests/servicestests/src/com/android/server/vibrator/ |
H A D | RampDownAdapterTest.java | 26 import android.os.vibrator.StepSegment; 89 new StepSegment(/* amplitude= */ 1, /* frequency= */ 0, /* duration= */ 10), in testRampAndStepSegments_withNoRampDownDuration_keepsOriginalSteps() 90 new StepSegment(/* amplitude= */ 0, /* frequency= */ 0, /* duration= */ 100), in testRampAndStepSegments_withNoRampDownDuration_keepsOriginalSteps() 105 new StepSegment(/* amplitude= */ 1, /* frequency= */ 0, /* duration= */ 10), in testStepSegments_withShortZeroSegment_replaceWithStepsDown() 106 new StepSegment(/* amplitude= */ 0, /* frequency= */ 0, /* duration= */ 10), in testStepSegments_withShortZeroSegment_replaceWithStepsDown() 109 new StepSegment(/* amplitude= */ 1, /* frequency= */ 0, /* duration= */ 10), in testStepSegments_withShortZeroSegment_replaceWithStepsDown() 111 new StepSegment(/* amplitude= */ 0, /* frequency= */ 0, /* duration= */ 5), in testStepSegments_withShortZeroSegment_replaceWithStepsDown() 122 new StepSegment(/* amplitude= */ 1, /* frequency= */ 0, /* duration= */ 10), in testStepSegments_withLongZeroSegment_replaceWithStepsDown() 127 new StepSegment(/* amplitude= */ 1, /* frequency= */ 0, /* duration= */ 10), in testStepSegments_withLongZeroSegment_replaceWithStepsDown() 131 new StepSegment(/* amplitude= */ 0, /* frequency= */ 0, /* duration= */ 35), in testStepSegments_withLongZeroSegment_replaceWithStepsDown() [all …]
|
H A D | RampToStepAdapterTest.java | 27 import android.os.vibrator.StepSegment; 59 new StepSegment(/* amplitude= */ 0, /* frequency= */ 1, /* duration= */ 10), in testStepAndPrebakedAndPrimitiveSegments_keepsListUnchanged() 74 new StepSegment(/* amplitude= */ 0.5f, /* frequency= */ 0, /* duration= */ 100), in testRampSegments_withPwleCapability_keepsListUnchanged() 89 new StepSegment(/* amplitude= */ 0, /* frequency= */ 1, /* duration= */ 10), in testRampSegments_withoutPwleCapability_convertsRampsToSteps() 90 new StepSegment(/* amplitude= */ 0.5f, /* frequency= */ 0, /* duration= */ 100), in testRampSegments_withoutPwleCapability_convertsRampsToSteps() 99 new StepSegment(/* amplitude= */ 0, /* frequency= */ 1, /* duration= */ 10), in testRampSegments_withoutPwleCapability_convertsRampsToSteps() 102 new StepSegment(/* amplitude= */ 1, /* frequency= */ -4, /* duration= */ 5), in testRampSegments_withoutPwleCapability_convertsRampsToSteps() 103 new StepSegment(/* amplitude= */ 0.2f, /* frequency= */ 2, /* duration= */ 5), in testRampSegments_withoutPwleCapability_convertsRampsToSteps() 105 new StepSegment(/* amplitude= */ 0.8f, /* frequency= */ -3, /* duration= */ 5), in testRampSegments_withoutPwleCapability_convertsRampsToSteps() 106 new StepSegment(/* amplitude= */ 0.6f, /* frequency= */ -2, /* duration= */ 5), in testRampSegments_withoutPwleCapability_convertsRampsToSteps() [all …]
|
H A D | StepToRampAdapterTest.java | 27 import android.os.vibrator.StepSegment; 105 new StepSegment(/* amplitude= */ 0, /* frequency= */ 1, /* duration= */ 10), in testStepAndRampSegments_withoutPwleCapability_keepsListUnchanged() 119 new StepSegment(/* amplitude= */ 0, /* frequency= */ 0, /* duration= */ 10), in testStepAndRampSegments_withPwleCapabilityAndNoFrequency_keepsOriginalSteps() 120 new StepSegment(/* amplitude= */ 0.5f, /* frequency= */ 0, /* duration= */ 100), in testStepAndRampSegments_withPwleCapabilityAndNoFrequency_keepsOriginalSteps() 138 new StepSegment(/* amplitude= */ 0, /* frequency= */ 1, /* duration= */ 10), in testStepAndRampSegments_withPwleCapabilityAndStepNextToRamp_convertsStepsToRamps() 139 new StepSegment(/* amplitude= */ 0.5f, /* frequency= */ 0, /* duration= */ 100), in testStepAndRampSegments_withPwleCapabilityAndStepNextToRamp_convertsStepsToRamps() 144 new StepSegment(/* amplitude= */ 0.8f, /* frequency= */ -1, /* duration= */ 60))); in testStepAndRampSegments_withPwleCapabilityAndStepNextToRamp_convertsStepsToRamps() 168 new StepSegment(/* amplitude= */ 0, /* frequency= */ -1, /* duration= */ 10), in testStepSegments_withPwleCapabilityAndFrequency_convertsStepsToRamps() 169 new StepSegment(/* amplitude= */ 0.5f, /* frequency= */ 1, /* duration= */ 100))); in testStepSegments_withPwleCapabilityAndFrequency_convertsStepsToRamps()
|
H A D | DeviceVibrationEffectAdapterTest.java | 30 import android.os.vibrator.StepSegment; 90 new StepSegment(/* amplitude= */ 0, /* frequency= */ 1, /* duration= */ 10), in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps() 91 new StepSegment(/* amplitude= */ 0.5f, /* frequency= */ 0, /* duration= */ 100), in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps() 106 assertTrue(adaptedSegment instanceof StepSegment); in testStepAndRampSegments_withoutPwleCapability_convertsRampsToSteps() 113 new StepSegment(/* amplitude= */ 0, /* frequency= */ 1, /* duration= */ 10), in testStepAndRampSegments_withPwleCapability_convertsStepsToRamps() 114 new StepSegment(/* amplitude= */ 0.5f, /* frequency= */ 0, /* duration= */ 100), in testStepAndRampSegments_withPwleCapability_convertsStepsToRamps() 140 new StepSegment(/* amplitude= */ 0, /* frequency= */ 1, /* duration= */ 10), in testStepAndRampSegments_withEmptyFreqMapping_returnsSameAmplitudesAndZeroFreq() 141 new StepSegment(/* amplitude= */ 0.5f, /* frequency= */ 0, /* duration= */ 100), in testStepAndRampSegments_withEmptyFreqMapping_returnsSameAmplitudesAndZeroFreq() 171 new StepSegment(/* amplitude= */ 0.5f, /* frequency= */ 0, /* duration= */ 10), in testStepAndRampSegments_withValidFreqMapping_returnsClippedValues() 172 new StepSegment(/* amplitude= */ 1, /* frequency= */ -1, /* duration= */ 100), in testStepAndRampSegments_withValidFreqMapping_returnsClippedValues()
|
H A D | VibrationScalerTest.java | 39 import android.os.vibrator.StepSegment; 200 StepSegment resolved = getFirstSegment(mVibrationScaler.scale( in scale_withOneShotAndWaveform_resolvesAmplitude() 224 StepSegment scaled = getFirstSegment(mVibrationScaler.scale( in scale_withOneShotAndWaveform_scalesAmplitude()
|
H A D | FakeVibratorControllerProvider.java | 27 import android.os.vibrator.StepSegment; 87 mEffectSegments.add(new StepSegment(VibrationEffect.DEFAULT_AMPLITUDE, in on()
|
H A D | VibrationThreadTest.java | 51 import android.os.vibrator.StepSegment; 1348 return new StepSegment(VibrationEffect.DEFAULT_AMPLITUDE, /* frequency= */ 0, (int) millis); in expectedOneShot()
|
/aosp12/frameworks/base/core/tests/coretests/src/android/os/vibrator/ |
H A D | StepSegmentTest.java | 41 StepSegment step = new StepSegment(/* amplitude= */ 1f, /* frequency= */ -1f, in testCreation() 52 StepSegment original = new StepSegment(0.5f, 1f, 10); in testSerialization() 73 assertTrue(new StepSegment(1f, 0, 0).hasNonZeroAmplitude()); in testHasNonZeroAmplitude() 76 assertFalse(new StepSegment(0, 0, 0).hasNonZeroAmplitude()); in testHasNonZeroAmplitude() 81 StepSegment original = new StepSegment(VibrationEffect.DEFAULT_AMPLITUDE, 0, 0); in testResolve() 85 StepSegment resolved = new StepSegment(0, 0, 0); in testResolve() 93 StepSegment step = new StepSegment(VibrationEffect.DEFAULT_AMPLITUDE, 0, 0); in testApplyEffectStrength_ignoresAndReturnsSameEffect() 99 StepSegment initial = new StepSegment(1f, 0, 0); in testScale_fullAmplitude() 113 StepSegment initial = new StepSegment(0.5f, 0, 0); in testScale_halfAmplitude() 127 StepSegment initial = new StepSegment(0, 0, 0); in testScale_zeroAmplitude() [all …]
|
/aosp12/frameworks/base/core/java/android/os/vibrator/ |
H A D | StepSegment.java | 36 public final class StepSegment extends VibrationEffectSegment { class 41 StepSegment(@NonNull Parcel in) { in StepSegment() method in StepSegment 54 if (!(o instanceof StepSegment)) { in equals() 57 StepSegment other = (StepSegment) o; in equals() 93 public StepSegment resolve(int defaultAmplitude) { in resolve() 108 public StepSegment scale(float scaleFactor) { in scale() 118 public StepSegment applyEffectStrength(int effectStrength) { in applyEffectStrength() 150 new Parcelable.Creator<StepSegment>() { 155 return new StepSegment(in); 159 public StepSegment[] newArray(int size) { [all …]
|
H A D | VibrationEffectSegment.java | 100 return new StepSegment(in);
|
/aosp12/frameworks/base/services/core/java/com/android/server/vibrator/ |
H A D | RampDownAdapter.java | 21 import android.os.vibrator.StepSegment; 92 if (previousSegment instanceof StepSegment) { in addRampDownToZeroAmplitudeSegments() 172 if (lastSegment instanceof StepSegment) { in addRampDownToLoop() 173 float previousAmplitude = ((StepSegment) lastSegment).getAmplitude(); in addRampDownToLoop() 197 steps.add(new StepSegment(0, frequency, remainingDuration)); in createStepsDown() 212 } else if (segment instanceof StepSegment) { in updateDuration() 213 StepSegment step = (StepSegment) segment; in updateDuration() 221 if (segment instanceof StepSegment) { in isOffSegment() 222 StepSegment ramp = (StepSegment) segment; in isOffSegment() 233 if (segment instanceof StepSegment) { in endsWithNonZeroAmplitude() [all …]
|
H A D | RampToStepAdapter.java | 22 import android.os.vibrator.StepSegment; 55 List<StepSegment> steps = apply((RampSegment) segment); in apply() 68 private List<StepSegment> apply(RampSegment ramp) { in apply() 72 new StepSegment(ramp.getStartAmplitude(), ramp.getStartFrequency(), in apply() 76 List<StepSegment> steps = new ArrayList<>(); in apply() 80 steps.add(new StepSegment( in apply() 86 steps.add(new StepSegment(ramp.getEndAmplitude(), ramp.getEndFrequency(), duration)); in apply()
|
H A D | ClippingAmplitudeAndFrequencyAdapter.java | 21 import android.os.vibrator.StepSegment; 45 if (segment instanceof StepSegment) { in apply() 46 segments.set(i, apply((StepSegment) segment, info)); in apply() 54 private StepSegment apply(StepSegment segment, VibratorInfo info) { in apply() 56 return new StepSegment( in apply()
|
H A D | StepToRampAdapter.java | 22 import android.os.vibrator.StepSegment; 54 if (isStep(segment) && ((StepSegment) segment).getFrequency() != 0) { in convertStepsToRamps() 55 segments.set(i, convertStepToRamp((StepSegment) segment)); in convertStepsToRamps() 63 segments.set(j, convertStepToRamp((StepSegment) segments.get(j))); in convertStepsToRamps() 66 segments.set(j, convertStepToRamp((StepSegment) segments.get(j))); in convertStepsToRamps() 107 private static RampSegment convertStepToRamp(StepSegment segment) { in convertStepToRamp() 137 return segment instanceof StepSegment; in isStep()
|
H A D | Vibration.java | 28 import android.os.vibrator.StepSegment; 349 if (segment instanceof StepSegment) { in dumpEffect() 350 dumpEffect(proto, SegmentProto.STEP, (StepSegment) segment); in dumpEffect() 361 private void dumpEffect(ProtoOutputStream proto, long fieldId, StepSegment segment) { in dumpEffect()
|
H A D | VibrationThread.java | 35 import android.os.vibrator.StepSegment; 1418 if (!(segment instanceof StepSegment)) { in play() 1423 StepSegment stepSegment = (StepSegment) segment; in play() 1494 if (!(segment instanceof StepSegment) in getVibratorOnDuration() 1495 || ((StepSegment) segment).getAmplitude() == 0) { in getVibratorOnDuration() 1612 if (firstSegment instanceof StepSegment) { in calculateRequiredSyncCapabilities()
|
/aosp12/frameworks/base/core/tests/coretests/src/android/os/ |
H A D | VibrationEffectTest.java | 36 import android.os.vibrator.StepSegment; 199 assertEquals(0.2f, ((StepSegment) resolved.getSegments().get(0)).getAmplitude()); in testResolveOneShot() 207 assertEquals(0.4f, ((StepSegment) resolved.getSegments().get(2)).getAmplitude()); in testResolveWaveform() 229 assertEquals(0.2f, ((StepSegment) resolved.getSegments().get(0)).getAmplitude()); in testResolveComposed() 272 assertTrue(100 / 255f < ((StepSegment) scaledUp.getSegments().get(0)).getAmplitude()); in testScaleOneShot() 275 assertTrue(100 / 255f > ((StepSegment) scaledDown.getSegments().get(0)).getAmplitude()); in testScaleOneShot() 281 assertEquals(1f, ((StepSegment) scaledUp.getSegments().get(0)).getAmplitude(), 1e-5f); in testScaleWaveform() 284 assertTrue(1f > ((StepSegment) scaledDown.getSegments().get(0)).getAmplitude()); in testScaleWaveform() 308 assertTrue(100 / 255f < ((StepSegment) scaledUp.getSegments().get(1)).getAmplitude()); in testScaleComposed() 312 assertTrue(100 / 255f > ((StepSegment) scaledDown.getSegments().get(1)).getAmplitude()); in testScaleComposed()
|
/aosp12/frameworks/base/core/java/android/os/ |
H A D | VibrationEffect.java | 35 import android.os.vibrator.StepSegment; 256 List<StepSegment> segments = new ArrayList<>(); in createWaveform() 260 segments.add(new StepSegment(parsedAmplitude, /* frequency= */ 0, (int) timings[i])); in createWaveform() 818 addSegment(new StepSegment(/* amplitude= */ 0, /* frequency= */ 0, in addEffect() 1004 mSegments.add(new StepSegment(amplitude, frequency, duration)); in addStep() 1086 if (segment instanceof StepSegment) { in getPreviousFrequency() 1087 return ((StepSegment) segment).getFrequency(); in getPreviousFrequency() 1098 if (segment instanceof StepSegment) { in getPreviousAmplitude() 1099 return ((StepSegment) segment).getAmplitude(); in getPreviousAmplitude()
|
/aosp12/frameworks/base/services/core/java/com/android/server/input/ |
H A D | InputManagerService.java | 82 import android.os.vibrator.StepSegment; 2015 if (!(segment instanceof StepSegment)) { in VibrationInfo() 2020 float amplitude = ((StepSegment) segment).getAmplitude(); in VibrationInfo()
|
/aosp12/frameworks/base/core/api/ |
H A D | test-current.txt | 2029 public final class StepSegment extends android.os.vibrator.VibrationEffectSegment { 2030 method @NonNull public android.os.vibrator.StepSegment applyEffectStrength(int); 2036 method @NonNull public android.os.vibrator.StepSegment resolve(int); 2037 method @NonNull public android.os.vibrator.StepSegment scale(float); 2040 …NonNull public static final android.os.Parcelable.Creator<android.os.vibrator.StepSegment> CREATOR;
|
/aosp12/frameworks/base/services/ |
H A D | art-profile | 42508 …StepSegment;Landroid/os/VibratorInfo;)Landroid/os/vibrator/StepSegment;+]Landroid/os/VibratorInfo;… 42603 …StepSegment;Landroid/os/vibrator/StepSegment;]Landroid/os/VibrationEffect$Composed;Landroid/os/Vib… 42604 …StepSegment;Landroid/os/vibrator/StepSegment;]Landroid/os/VibrationEffect$Composed;Landroid/os/Vib…
|
/aosp12/frameworks/base/boot/ |
H A D | boot-image-profile.txt | 13595 …fectSegment;Landroid/os/vibrator/PrebakedSegment;,Landroid/os/vibrator/StepSegment;,Landroid/os/vi… 29201 Landroid/os/vibrator/StepSegment$1; 29202 Landroid/os/vibrator/StepSegment;
|
/aosp12/frameworks/base/config/ |
H A D | boot-image-profile.txt | 13585 …fectSegment;Landroid/os/vibrator/PrebakedSegment;,Landroid/os/vibrator/StepSegment;,Landroid/os/vi… 38838 Landroid/os/vibrator/StepSegment$1; 38839 Landroid/os/vibrator/StepSegment;
|