Home
last modified time | relevance | path

Searched refs:segment (Results 1 – 25 of 28) sorted by relevance

12

/aosp14/frameworks/base/services/core/java/com/android/server/vibrator/
H A DClippingAmplitudeAndFrequencyAdapter.java42 VibrationEffectSegment segment = segments.get(i); in apply() local
43 if (segment instanceof StepSegment) { in apply()
44 segments.set(i, apply((StepSegment) segment, info)); in apply()
45 } else if (segment instanceof RampSegment) { in apply()
46 segments.set(i, apply((RampSegment) segment, info)); in apply()
52 private StepSegment apply(StepSegment segment, VibratorInfo info) { in apply() argument
53 float clampedFrequency = clampFrequency(info, segment.getFrequencyHz()); in apply()
55 clampAmplitude(info, clampedFrequency, segment.getAmplitude()), in apply()
57 (int) segment.getDuration()); in apply()
60 private RampSegment apply(RampSegment segment, VibratorInfo info) { in apply() argument
[all …]
H A DRampDownAdapter.java214 if (segment instanceof RampSegment) { in updateDuration()
215 RampSegment ramp = (RampSegment) segment; in updateDuration()
218 } else if (segment instanceof StepSegment) { in updateDuration()
219 StepSegment step = (StepSegment) segment; in updateDuration()
222 return segment; in updateDuration()
227 if (segment instanceof StepSegment) { in isOffSegment()
228 StepSegment ramp = (StepSegment) segment; in isOffSegment()
230 } else if (segment instanceof RampSegment) { in isOffSegment()
231 RampSegment ramp = (RampSegment) segment; in isOffSegment()
239 if (segment instanceof StepSegment) { in endsWithNonZeroAmplitude()
[all …]
H A DVibration.java326 dumpEffect(proto, VibrationEffectProto.SEGMENTS, segment); in dumpEffect()
333 VibrationEffectSegment segment) { in dumpEffect() argument
335 if (segment instanceof StepSegment) { in dumpEffect()
337 } else if (segment instanceof RampSegment) { in dumpEffect()
339 } else if (segment instanceof PrebakedSegment) { in dumpEffect()
341 } else if (segment instanceof PrimitiveSegment) { in dumpEffect()
349 proto.write(StepSegmentProto.DURATION, segment.getDuration()); in dumpEffect()
366 PrebakedSegment segment) { in dumpEffect() argument
375 PrimitiveSegment segment) { in dumpEffect() argument
378 proto.write(PrimitiveSegmentProto.SCALE, segment.getScale()); in dumpEffect()
[all …]
H A DStepToRampAdapter.java54 VibrationEffectSegment segment = segments.get(i); in convertStepsToRamps() local
55 if (isStep(segment) && ((StepSegment) segment).getFrequencyHz() != 0) { in convertStepsToRamps()
56 segments.set(i, convertStepToRamp(info, (StepSegment) segment)); in convertStepsToRamps()
108 private static RampSegment convertStepToRamp(VibratorInfo info, StepSegment segment) { in convertStepToRamp() argument
109 float frequencyHz = fillEmptyFrequency(info, segment.getFrequencyHz()); in convertStepToRamp()
110 return new RampSegment(segment.getAmplitude(), segment.getAmplitude(), in convertStepToRamp()
111 frequencyHz, frequencyHz, (int) segment.getDuration()); in convertStepToRamp()
146 private static boolean isStep(VibrationEffectSegment segment) { in isStep() argument
147 return segment instanceof StepSegment; in isStep()
H A DSetAmplitudeVibratorStep.java94 VibrationEffectSegment segment = effect.getSegments().get(segmentIndex); in play() local
95 if (!(segment instanceof StepSegment)) { in play()
97 "Ignoring wrong segment for a SetAmplitudeVibratorStep: " + segment); in play()
102 StepSegment stepSegment = (StepSegment) segment; in play()
127 long nextStartTime = startTime + segment.getDuration(); in play()
180 VibrationEffectSegment segment = segments.get(i); in getVibratorOnDuration() local
181 if (!(segment instanceof StepSegment) in getVibratorOnDuration()
182 || ((StepSegment) segment).getAmplitude() == 0) { in getVibratorOnDuration()
185 timing += segment.getDuration(); in getVibratorOnDuration()
H A DPerformPrebakedVibratorStep.java49 VibrationEffectSegment segment = effect.getSegments().get(segmentIndex); in play() local
50 if (!(segment instanceof PrebakedSegment)) { in play()
52 + "PerformPrebakedVibratorStep: " + segment); in play()
57 PrebakedSegment prebaked = (PrebakedSegment) segment; in play()
H A DComposePrimitivesVibratorStep.java113 VibrationEffectSegment segment = effect.getSegments().get(i); in unrollPrimitiveSegments() local
114 if (segment instanceof PrimitiveSegment) { in unrollPrimitiveSegments()
115 segments.add((PrimitiveSegment) segment); in unrollPrimitiveSegments()
H A DRampToStepAdapter.java52 VibrationEffectSegment segment = segments.get(i); in apply() local
53 if (!(segment instanceof RampSegment)) { in apply()
56 List<StepSegment> steps = apply(info, (RampSegment) segment); in apply()
H A DComposePwleVibratorStep.java118 VibrationEffectSegment segment = effect.getSegments().get(i); in unrollRampSegments() local
119 if (segment instanceof RampSegment) { in unrollRampSegments()
120 RampSegment rampSegment = (RampSegment) segment; in unrollRampSegments()
H A DVibrationStepConductor.java131 VibrationEffectSegment segment = effect.getSegments().get(segmentIndex); in nextVibrateStep() local
132 if (segment instanceof PrebakedSegment) { in nextVibrateStep()
136 if (segment instanceof PrimitiveSegment) { in nextVibrateStep()
140 if (segment instanceof RampSegment) { in nextVibrateStep()
H A DVibratorManagerService.java1111 VibrationEffectSegment segment = composed.getSegments().get(i); in fillVibrationFallbacks() local
1112 if (segment instanceof PrebakedSegment) { in fillVibrationFallbacks()
1113 PrebakedSegment prebaked = (PrebakedSegment) segment; in fillVibrationFallbacks()
1199 VibrationEffectSegment segment = composed.getSegments().get(0); in extractPrebakedSegment() local
1200 if (segment instanceof PrebakedSegment) { in extractPrebakedSegment()
1201 return (PrebakedSegment) segment; in extractPrebakedSegment()
/aosp14/frameworks/base/core/tests/coretests/src/android/os/vibrator/
H A DStepSegmentTest.java172 StepSegment segment = in testVibrationFeaturesSupport_zeroAmplitude_supported() local
176 assertTrue(segment.areVibrationFeaturesSupported(mVibrator)); in testVibrationFeaturesSupport_zeroAmplitude_supported()
180 assertTrue(segment.areVibrationFeaturesSupported(mVibrator)); in testVibrationFeaturesSupport_zeroAmplitude_supported()
185 StepSegment segment = in testVibrationFeaturesSupport_maxAmplitude_supported() local
189 assertTrue(segment.areVibrationFeaturesSupported(mVibrator)); in testVibrationFeaturesSupport_maxAmplitude_supported()
193 assertTrue(segment.areVibrationFeaturesSupported(mVibrator)); in testVibrationFeaturesSupport_maxAmplitude_supported()
198 StepSegment segment = in testVibrationFeaturesSupport_defaultAmplitude_supported() local
205 assertTrue(segment.areVibrationFeaturesSupported(mVibrator)); in testVibrationFeaturesSupport_defaultAmplitude_supported()
230 StepSegment segment = in testVibrationFeaturesSupport_zeroFrequency_supported() local
243 StepSegment segment = in testVibrationFeaturesSupport_nonZeroFrequency_hasFrequencyCtrl_supported() local
[all …]
/aosp14/system/core/libcutils/
H A Dfs.cpp211 char* segment = buf + 1; in fs_mkdirs() local
212 char* p = segment; in fs_mkdirs()
217 if (!strcmp(segment, "..") || !strcmp(segment, ".") || !strcmp(segment, "")) { in fs_mkdirs()
223 if (fstatat(fd, segment, &sb, AT_SYMLINK_NOFOLLOW) != 0) { in fs_mkdirs()
226 if (mkdirat(fd, segment, mode) != 0) { in fs_mkdirs()
255 if ((next_fd = openat(fd, segment, O_NOFOLLOW | O_CLOEXEC)) == -1) { in fs_mkdirs()
265 segment = p + 1; in fs_mkdirs()
/aosp14/frameworks/base/apct-tests/perftests/core/src/android/graphics/perftests/
H A DPathIteratorPerfTest.java62 PathIterator.Segment segment = iterator.next(); in testNextSegmentImpl() local
63 while (segment.getVerb() != VERB_DONE) { in testNextSegmentImpl()
64 segment = iterator.next(); in testNextSegmentImpl()
/aosp14/frameworks/base/core/java/android/os/
H A DVibrationEffect.java666 Composed(@NonNull VibrationEffectSegment segment) { in Composed() argument
667 this(Arrays.asList(segment), /* repeatIndex= */ -1); in Composed()
737 VibrationEffectSegment segment = mSegments.get(i); in validate() local
738 segment.validate(); in validate()
740 hasNonZeroDuration |= segment.getDuration() != 0; in validate()
773 for (VibrationEffectSegment segment : mSegments) { in areVibrationFeaturesSupported()
774 if (!segment.areVibrationFeaturesSupported(vibrator)) { in areVibrationFeaturesSupported()
915 VibrationEffectSegment segment) { in castToValidStepSegmentForOffOnTimingsOrNull() argument
916 if (!(segment instanceof StepSegment)) { in castToValidStepSegmentForOffOnTimingsOrNull()
920 StepSegment stepSegment = (StepSegment) segment; in castToValidStepSegmentForOffOnTimingsOrNull()
[all …]
H A DEnvironment.java1569 for (String segment : segments) { in buildPath()
1571 cur = new File(segment); in buildPath()
1573 cur = new File(cur, segment); in buildPath()
/aosp14/frameworks/base/libs/hwui/apex/
H A DLayoutlibLoader.cpp148 string segment; in parseCsv() local
149 while(getline(stream, segment, ',')) in parseCsv()
151 result.push_back(segment); in parseCsv()
/aosp14/frameworks/base/core/tests/coretests/src/android/app/activity/
H A DLocalProvider.java161 String segment = url.getPathSegments().get(1); in update() local
162 rowId = Long.parseLong(segment); in update()
/aosp14/frameworks/base/core/java/com/android/internal/graphics/cam/
H A DHctSolver.java552 double[][] segment = bisectToSegment(y, targetHue); in bisectToLimit() local
553 double[] left = segment[0]; in bisectToLimit()
555 double[] right = segment[1]; in bisectToLimit()
/aosp14/frameworks/base/core/jni/
H A DLayoutlibLoader.cpp191 string segment; in parseCsv() local
192 while(getline(stream, segment, ',')) in parseCsv()
194 result.push_back(segment); in parseCsv()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/vibrator/
H A DFakeVibratorControllerProvider.java72 void recordEffectSegment(long vibrationId, VibrationEffectSegment segment) { in recordEffectSegment() argument
73 mEffectSegments.computeIfAbsent(vibrationId, k -> new ArrayList<>()).add(segment); in recordEffectSegment()
/aosp14/frameworks/base/services/core/java/com/android/server/content/
H A DContentService.java1804 String segment = getUriSegment(uri, index); in addObserverLocked() local
1805 if (segment == null) { in addObserverLocked()
1811 if (node.mName.equals(segment)) { in addObserverLocked()
1819 ObserverNode node = new ObserverNode(segment); in addObserverLocked()
1916 String segment = null; in collectObserversLocked() local
1923 segment = getUriSegment(uri, index); in collectObserversLocked()
1925 + segment); in collectObserversLocked()
1934 if (segment == null || node.mName.equals(segment)) { in collectObserversLocked()
1938 if (segment != null) { in collectObserversLocked()
/aosp14/frameworks/base/media/java/android/media/
H A DJetPlayer.java511 short segment, byte track, byte channel, byte controller, byte value); in onJetEvent() argument
/aosp14/frameworks/base/services/core/java/com/android/server/input/
H A DInputManagerService.java1473 VibrationEffectSegment segment = composed.getSegments().get(i); in VibrationInfo() local
1477 if (!(segment instanceof StepSegment)) { in VibrationInfo()
1478 Slog.w(TAG, "Input devices don't support segment " + segment); in VibrationInfo()
1482 float amplitude = ((StepSegment) segment).getAmplitude(); in VibrationInfo()
1489 pattern[amplitudeCount++] = segment.getDuration(); in VibrationInfo()
/aosp14/frameworks/base/cmds/bootanimation/
H A DFORMAT.md40 * **TYPE:** a single char indicating what type of animation segment this is:

12