Home
last modified time | relevance | path

Searched refs:PrimitiveSegment (Results 1 – 25 of 29) sorted by relevance

12

/frameworks/base/core/tests/vibrator/src/android/os/vibrator/
DPrimitiveSegmentTest.java41 PrimitiveSegment primitive = new PrimitiveSegment( in testCreation()
52 PrimitiveSegment original = new PrimitiveSegment( in testSerialization()
57 assertEquals(original, PrimitiveSegment.CREATOR.createFromParcel(parcel)); in testSerialization()
62 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_CLICK, 1, 0).validate(); in testValidate()
65 () -> new PrimitiveSegment(1000, 0, 10).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()
76 PrimitiveSegment primitive = new PrimitiveSegment( in testResolve_ignoresAndReturnsSameEffect()
83 PrimitiveSegment primitive = new PrimitiveSegment( in testApplyEffectStrength_ignoresAndReturnsSameEffect()
91 PrimitiveSegment initial = new PrimitiveSegment( in testScale_fullPrimitiveScaleValue()
[all …]
/frameworks/base/core/java/android/os/vibrator/
DPrimitiveSegment.java38 public final class PrimitiveSegment extends VibrationEffectSegment { class
50 PrimitiveSegment(@NonNull Parcel in) { in PrimitiveSegment() method in PrimitiveSegment
55 public PrimitiveSegment(int id, float scale, int delay) { in PrimitiveSegment() method in PrimitiveSegment
93 public PrimitiveSegment resolve(int defaultAmplitude) { in resolve()
100 public PrimitiveSegment scale(float scaleFactor) { in scale()
106 return new PrimitiveSegment(mPrimitiveId, newScale, mDelay); in scale()
112 public PrimitiveSegment scaleLinearly(float scaleFactor) { in scaleLinearly()
118 return new PrimitiveSegment(mPrimitiveId, newScale, mDelay); in scaleLinearly()
124 public PrimitiveSegment applyEffectStrength(int effectStrength) { in applyEffectStrength()
170 PrimitiveSegment that = (PrimitiveSegment) o; in equals()
[all …]
DVibrationEffectSegment.java211 return new PrimitiveSegment(in);
/frameworks/base/services/core/java/com/android/server/vibrator/
DComposePrimitivesVibratorStep.java21 import android.os.vibrator.PrimitiveSegment;
57 List<PrimitiveSegment> primitives = unrollPrimitiveSegments(effect, segmentIndex, in play()
72 PrimitiveSegment[] primitivesArray = in play()
73 primitives.toArray(new PrimitiveSegment[primitives.size()]); in play()
98 private List<PrimitiveSegment> unrollPrimitiveSegments(VibrationEffect.Composed effect, in unrollPrimitiveSegments()
100 List<PrimitiveSegment> segments = new ArrayList<>(limit); in unrollPrimitiveSegments()
114 if (segment instanceof PrimitiveSegment) { in unrollPrimitiveSegments()
115 segments.add((PrimitiveSegment) segment); in unrollPrimitiveSegments()
DVibrationStats.java23 import android.os.vibrator.PrimitiveSegment;
243 void reportComposePrimitives(long halResult, PrimitiveSegment[] primitives) { in reportComposePrimitives()
250 for (PrimitiveSegment primitive : primitives) { in reportComposePrimitives()
259 for (PrimitiveSegment primitive : primitives) { in reportComposePrimitives()
DVibratorController.java27 import android.os.vibrator.PrimitiveSegment;
294 public long on(PrimitiveSegment[] primitives, long vibrationId) { in on()
430 private static native long performComposedEffect(long nativePtr, PrimitiveSegment[] effect, in performComposedEffect()
486 public long compose(PrimitiveSegment[] primitives, long vibrationId) { in compose()
DVibration.java27 import android.os.vibrator.PrimitiveSegment;
418 } else if (segment instanceof PrimitiveSegment) { in dumpEffect()
419 dumpEffect(proto, SegmentProto.PRIMITIVE, (PrimitiveSegment) segment); in dumpEffect()
452 PrimitiveSegment segment) { in dumpEffect()
DStartSequentialEffectStep.java26 import android.os.vibrator.PrimitiveSegment;
349 } else if (firstSegment instanceof PrimitiveSegment) { in calculateRequiredSyncCapabilities()
DVibrationStepConductor.java28 import android.os.vibrator.PrimitiveSegment;
144 if (segment instanceof PrimitiveSegment) { in nextVibrateStep()
/frameworks/base/core/java/com/android/internal/vibrator/persistence/
DSerializedCompositionPrimitive.java28 import android.os.vibrator.PrimitiveSegment;
67 if (Float.compare(mPrimitiveScale, PrimitiveSegment.DEFAULT_SCALE) != 0) { in write()
71 if (mPrimitiveDelayMs != PrimitiveSegment.DEFAULT_DELAY_MILLIS) { in write()
100 parser, ATTRIBUTE_SCALE, 0, 1, PrimitiveSegment.DEFAULT_SCALE); in parseNext()
102 parser, ATTRIBUTE_DELAY_MS, PrimitiveSegment.DEFAULT_DELAY_MILLIS); in parseNext()
DVibrationEffectXmlSerializer.java22 import android.os.vibrator.PrimitiveSegment;
70 if (firstSegment instanceof PrimitiveSegment) { in serialize()
152 XmlValidator.checkSerializerCondition(segment instanceof PrimitiveSegment, in serializePrimitiveSegment()
155 PrimitiveSegment primitive = (PrimitiveSegment) segment; in serializePrimitiveSegment()
/frameworks/base/services/tests/vibrator/src/com/android/server/vibrator/
DDeviceAdapterTest.java31 import android.os.vibrator.PrimitiveSegment;
95 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_TICK, 1, 10), in testPrebakedAndPrimitiveSegments_returnsOriginalSegment()
98 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_SPIN, 0.5f, 100)), in testPrebakedAndPrimitiveSegments_returnsOriginalSegment()
178 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_TICK, 1, 10), in testStepAndRampSegments_withValidFreqMapping_returnsClippedValuesOnlyInRamps()
191 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_TICK, 1, 10), in testStepAndRampSegments_withValidFreqMapping_returnsClippedValuesOnlyInRamps()
207 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_TICK, 1, 10), in testMonoCombinedVibration_returnsSameVibrationWhenEffectsUnchanged()
210 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_SPIN, 0.5f, 100)), in testMonoCombinedVibration_returnsSameVibrationWhenEffectsUnchanged()
DStepToRampAdapterTest.java25 import android.os.vibrator.PrimitiveSegment;
63 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_TICK, 1, 10))); in testRampAndPrebakedAndPrimitiveSegments_returnsOriginalSegments()
94 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_TICK, 1, 10), in testStepAndRampSegments_withPwleCapabilityAndNoFrequency_keepsOriginalSteps()
DRampToStepAdapterTest.java25 import android.os.vibrator.PrimitiveSegment;
63 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_TICK, 1, 10))); in testStepAndPrebakedAndPrimitiveSegments_keepsListUnchanged()
DSplitSegmentsAdapterTest.java25 import android.os.vibrator.PrimitiveSegment;
66 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_TICK, 1, 10))); in testStepAndPrebakedAndPrimitiveSegments_returnsOriginalSegments()
DVibratorControllerTest.java46 import android.os.vibrator.PrimitiveSegment;
213 PrimitiveSegment[] primitives = new PrimitiveSegment[]{ in on_withComposed_performsEffect()
214 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_CLICK, 0.5f, 10) in on_withComposed_performsEffect()
DRampDownAdapterTest.java24 import android.os.vibrator.PrimitiveSegment;
53 new PrimitiveSegment(VibrationEffect.Composition.PRIMITIVE_TICK, 1, 10))); in testPrebakedAndPrimitiveSegments_keepsListUnchanged()
DVibrationScalerTest.java48 import android.os.vibrator.PrimitiveSegment;
290 PrimitiveSegment scaled = getFirstSegment(mVibrationScaler.scale(composed, USAGE_RINGTONE));
DVibratorManagerServiceTest.java82 import android.os.vibrator.PrimitiveSegment;
1284 PrimitiveSegment expected = new PrimitiveSegment( in vibrate_withriggerCallback_finishesVibration()
1572 0.5 > ((PrimitiveSegment) fakeVibrator.getAllEffectSegments().get(0)).getScale()); in vibrate_withIntensitySettings_appliesSettingsToScaleVibrations()
1580 ((PrimitiveSegment) fakeVibrator.getAllEffectSegments().get(2)).getScale(), 1e-5); in vibrate_withIntensitySettings_appliesSettingsToScaleVibrations()
1651 assertEquals(0.7f, ((PrimitiveSegment) segments.get(0)).getScale(), 1e-5);
1652 assertEquals(0.4f, ((PrimitiveSegment) segments.get(1)).getScale(), 1e-5);
1653 assertEquals(1f, ((PrimitiveSegment) segments.get(2)).getScale(), 1e-5);
1750 assertTrue(segments.get(segments.size() - 1) instanceof PrimitiveSegment); in vibrate_prebakedAndComposedVibrationsWithFallbacks_playsFallbackOnlyForPredefined()
DVibrationThreadTest.java60 import android.os.vibrator.PrimitiveSegment;
802 assertTrue(segments.get(1) instanceof PrimitiveSegment); in vibrate_singleVibratorComposedWithFallback_replacedInTheMiddleOfComposition() local
807 assertTrue(segments.get(segments.size() - 1) instanceof PrimitiveSegment); in vibrate_singleVibratorComposedWithFallback_replacedInTheMiddleOfComposition()
1854 return new PrimitiveSegment(primitiveId, scale, delay); in expectedPrimitive()
/frameworks/base/services/tests/vibrator/utils/com/android/server/vibrator/
DFakeVibratorControllerProvider.java25 import android.os.vibrator.PrimitiveSegment;
133 public long compose(PrimitiveSegment[] primitives, long vibrationId) { in compose()
137 for (PrimitiveSegment primitive : primitives) { in compose()
143 for (PrimitiveSegment primitive : primitives) { in compose()
/frameworks/base/core/java/android/os/
DVibrationEffect.java32 import android.os.vibrator.PrimitiveSegment;
1205 return addPrimitive(primitiveId, PrimitiveSegment.DEFAULT_SCALE);
1220 return addPrimitive(primitiveId, scale, PrimitiveSegment.DEFAULT_DELAY_MILLIS);
1235 PrimitiveSegment primitive = new PrimitiveSegment(primitiveId, scale, delay);
/frameworks/base/core/tests/vibrator/src/android/os/
DVibrationEffectTest.java41 import android.os.vibrator.PrimitiveSegment;
709 assertTrue(0.5f < ((PrimitiveSegment) scaledUp.getSegments().get(0)).getScale()); in testScaleComposed()
713 assertTrue(0.5f > ((PrimitiveSegment) scaledDown.getSegments().get(0)).getScale()); in testScaleComposed()
/frameworks/base/core/api/
Dtest-current.txt2714 public final class PrimitiveSegment extends android.os.vibrator.VibrationEffectSegment {
2721 …ll public static final android.os.Parcelable.Creator<android.os.vibrator.PrimitiveSegment> CREATOR;
/frameworks/base/boot/
Dpreloaded-classes6489 android.os.vibrator.PrimitiveSegment$1
6490 android.os.vibrator.PrimitiveSegment

12