/frameworks/base/services/tests/vibrator/src/com/android/server/vibrator/ |
D | VibrationThreadTest.java | 264 List<Float> amplitudes = mVibratorProviders.get(VIBRATOR_ID).getAmplitudes(); in vibrate_singleWaveformWithAdaptiveHapticsScaling_scalesAmplitudesProperly() local 265 for (int i = 0; i < amplitudes.size(); i++) { in vibrate_singleWaveformWithAdaptiveHapticsScaling_scalesAmplitudesProperly() 266 assertTrue(amplitudes.get(i) < 1 / 255f); in vibrate_singleWaveformWithAdaptiveHapticsScaling_scalesAmplitudesProperly() 294 int[] amplitudes = new int[]{1, 2, 3}; 295 VibrationEffect effect = VibrationEffect.createWaveform(new long[]{5, 5, 5}, amplitudes, 0); 299 waitUntil(() -> fakeVibrator.getAmplitudes().size() > 2 * amplitudes.length, 325 assertEquals(amplitudes[i % amplitudes.length] / 255f, playedAmplitudes.get(i), 1e-5); 335 int[] amplitudes = new int[]{1, 2, 3}; in vibrate_singleVibratorRepeatingShortAlwaysOnWaveform_turnsVibratorOnForLonger() local 337 new long[]{1, 10, 100}, amplitudes, 0); in vibrate_singleVibratorRepeatingShortAlwaysOnWaveform_turnsVibratorOnForLonger() 375 int[] amplitudes = new int[]{1, 2, 0, 3, 4, 5, 0, 6}; in vibrate_singleVibratorPatternWithZeroDurationAndAmplitude_skipsZeroDurationSteps() local [all …]
|
/frameworks/base/core/java/android/os/ |
D | VibrationEffect.java | 224 int[] amplitudes = new int[timings.length]; in createWaveform() local 226 amplitudes[i*2 + 1] = VibrationEffect.DEFAULT_AMPLITUDE; in createWaveform() 228 return createWaveform(timings, amplitudes, repeat); in createWaveform() 278 public static VibrationEffect createWaveform(long[] timings, int[] amplitudes, int repeat) { in createWaveform() argument 279 if (timings.length != amplitudes.length) { in createWaveform() 283 + ", amplitudes.length=" + amplitudes.length + ")"); in createWaveform() 287 float parsedAmplitude = amplitudes[i] == DEFAULT_AMPLITUDE in createWaveform() 288 ? DEFAULT_AMPLITUDE : (float) amplitudes[i] / MAX_AMPLITUDE; in createWaveform()
|
/frameworks/base/services/core/java/com/android/server/input/ |
D | NativeInputManagerService.java | 146 void vibrate(int deviceId, long[] pattern, int[] amplitudes, int repeat, int token); in vibrate() argument 148 void vibrateCombined(int deviceId, long[] pattern, SparseArray<int[]> amplitudes, in vibrateCombined() argument 410 public native void vibrate(int deviceId, long[] pattern, int[] amplitudes, int repeat, in vibrate() argument 415 SparseArray<int[]> amplitudes, in vibrateCombined() argument
|
D | InputManagerService.java | 1343 int[] amplitudes = null; in VibrationInfo() local 1351 amplitudes = new int[segmentCount]; in VibrationInfo() 1366 amplitudes[amplitudeCount] = DEFAULT_VIBRATION_MAGNITUDE; in VibrationInfo() 1368 amplitudes[amplitudeCount] = in VibrationInfo() 1385 System.arraycopy(amplitudes, 0, mAmplitudes, 0, amplitudeCount); in VibrationInfo() 1459 SparseArray<int[]> amplitudes = new SparseArray<>(effects.size()); in vibrateCombined() local 1469 amplitudes.put(effects.keyAt(i), info.getAmplitudes()); in vibrateCombined() 1471 mNative.vibrateCombined(deviceId, pattern, amplitudes, repeat, in vibrateCombined()
|
/frameworks/base/core/java/com/android/internal/vibrator/persistence/ |
D | SerializedAmplitudeStepWaveform.java | 51 private SerializedAmplitudeStepWaveform(long[] timings, int[] amplitudes, int repeatIndex) { in SerializedAmplitudeStepWaveform() argument 53 mAmplitudes = amplitudes; in SerializedAmplitudeStepWaveform()
|
/frameworks/base/services/core/jni/ |
D | com_android_server_vibrator_VibratorController.cpp | 448 std::vector<float> amplitudes = info.maxAmplitudes.value(); in vibratorGetInfo() local 449 maxAmplitudes = env->NewFloatArray(amplitudes.size()); in vibratorGetInfo() 450 env->SetFloatArrayRegion(maxAmplitudes, 0, amplitudes.size(), in vibratorGetInfo() 451 reinterpret_cast<jfloat*>(amplitudes.data())); in vibratorGetInfo()
|
D | com_android_server_input_InputManagerService.cpp | 2199 jint* amplitudes = static_cast<jint*>(env->GetPrimitiveArrayCritical(amplitudesObj, nullptr)); in nativeVibrate() local 2210 element.addChannel(vibrators[channel], static_cast<uint8_t>(amplitudes[i])); in nativeVibrate() 2215 env->ReleasePrimitiveArrayCritical(amplitudesObj, amplitudes, JNI_ABORT); in nativeVibrate()
|
/frameworks/base/core/tests/vibrator/src/android/os/ |
D | VibratorInfoTest.java | 547 private static VibrationEffect waveformWithAmplitudes(int...amplitudes) { in waveformWithAmplitudes() argument 548 long[] timings = new long[amplitudes.length]; in waveformWithAmplitudes() 552 return VibrationEffect.createWaveform(timings, amplitudes, /* repeatIndex= */ -1); in waveformWithAmplitudes()
|
/frameworks/native/services/vibratorservice/ |
D | VibratorHalWrapper.cpp | 409 std::vector<float> amplitudes; in getMaxAmplitudesInternal() local 410 auto result = getHal()->getBandwidthAmplitudeMap(&litudes); in getMaxAmplitudesInternal() 411 return HalResultFactory::fromStatus<std::vector<float>>(result, amplitudes); in getMaxAmplitudesInternal()
|
/frameworks/base/services/core/java/com/android/server/vibrator/ |
D | VibratorManagerService.java | 2340 List<Float> amplitudes = new ArrayList<>(); in addWaveformToComposition() local 2354 amplitudes.add( in addWaveformToComposition() 2357 amplitudes.add(nextAmplitude); in addWaveformToComposition() 2378 waveform.addTransition(transitionDuration, targetAmplitude(amplitudes.get(i)), in addWaveformToComposition() 2381 waveform.addTransition(transitionDuration, targetAmplitude(amplitudes.get(i))); in addWaveformToComposition() 2394 waveform = VibrationEffect.startWaveform(targetAmplitude(amplitudes.get(i)), in addWaveformToComposition() 2398 targetAmplitude(amplitudes.get(i))); in addWaveformToComposition()
|
/frameworks/native/services/vibratorservice/test/ |
D | VibratorHalWrapperAidlTest.cpp | 311 std::vector<float> amplitudes = {0.f, 1.f, 0.f}; in TEST_F() local 373 .WillRepeatedly(DoAll(SetArgPointee<0>(amplitudes), Return(Status()))); in TEST_F() 406 ASSERT_EQ(amplitudes, successful.maxAmplitudes.value()); in TEST_F()
|
/frameworks/native/services/inputflinger/tests/ |
D | InputReader_test.cpp | 3137 std::vector<uint8_t> amplitudes = {DEFAULT_AMPLITUDE, DEFAULT_AMPLITUDE / 2}; in TEST_F() local
|