/frameworks/base/services/tests/vibrator/src/com/android/server/vibrator/ |
D | VibrationThreadTest.java | 170 long vibrationId = startThreadAndDispatcher(effect); in vibrate_noVibrator_ignoresVibration() local 173 verify(mControllerCallbacks, never()).onComplete(anyInt(), eq(vibrationId)); in vibrate_noVibrator_ignoresVibration() 174 verifyCallbacksTriggered(vibrationId, Vibration.Status.IGNORED_UNSUPPORTED); in vibrate_noVibrator_ignoresVibration() 183 long vibrationId = startThreadAndDispatcher(effect); in vibrate_missingVibrators_ignoresVibration() local 186 verify(mControllerCallbacks, never()).onComplete(anyInt(), eq(vibrationId)); in vibrate_missingVibrators_ignoresVibration() 187 verifyCallbacksTriggered(vibrationId, Vibration.Status.IGNORED_UNSUPPORTED); in vibrate_missingVibrators_ignoresVibration() 195 long vibrationId = startThreadAndDispatcher(effect); in vibrate_singleVibratorOneShot_runsVibrationAndSetsAmplitude() local 200 verify(mControllerCallbacks).onComplete(eq(VIBRATOR_ID), eq(vibrationId)); in vibrate_singleVibratorOneShot_runsVibrationAndSetsAmplitude() 201 verifyCallbacksTriggered(vibrationId, Vibration.Status.FINISHED); in vibrate_singleVibratorOneShot_runsVibrationAndSetsAmplitude() 205 mVibratorProviders.get(VIBRATOR_ID).getEffectSegments(vibrationId)); in vibrate_singleVibratorOneShot_runsVibrationAndSetsAmplitude() [all …]
|
D | DeviceAdapterTest.java | 280 .newVibratorController(vibratorId, (id, vibrationId) -> {}); in createEmptyVibratorController() 287 return provider.newVibratorController(vibratorId, (id, vibrationId) -> {}); in createPwleWithoutFrequenciesVibratorController() 298 return provider.newVibratorController(vibratorId, (id, vibrationId) -> {}); in createPwleVibratorController()
|
/frameworks/base/services/tests/vibrator/utils/com/android/server/vibrator/ |
D | FakeVibratorControllerProvider.java | 73 void recordEffectSegment(long vibrationId, VibrationEffectSegment segment) { in recordEffectSegment() argument 74 mEffectSegments.computeIfAbsent(vibrationId, k -> new ArrayList<>()).add(segment); in recordEffectSegment() 77 void recordBraking(long vibrationId, int braking) { in recordBraking() argument 78 mBraking.computeIfAbsent(vibrationId, k -> new ArrayList<>()).add(braking); in recordBraking() 99 public long on(long milliseconds, long vibrationId) { in on() argument 100 recordEffectSegment(vibrationId, new StepSegment(VibrationEffect.DEFAULT_AMPLITUDE, in on() 103 scheduleListener(milliseconds, vibrationId); in on() 120 public long perform(long effect, long strength, long vibrationId) { in perform() argument 125 recordEffectSegment(vibrationId, in perform() 128 scheduleListener(EFFECT_DURATION, vibrationId); in perform() [all …]
|
/frameworks/base/services/core/java/com/android/server/vibrator/ |
D | VibratorController.java | 70 void onComplete(int vibratorId, long vibrationId); in onComplete() argument 253 public long on(long milliseconds, long vibrationId) { in on() argument 255 long duration = mNativeWrapper.on(milliseconds, vibrationId); in on() 273 public long on(PrebakedSegment prebaked, long vibrationId) { in on() argument 276 prebaked.getEffectStrength(), vibrationId); in on() 294 public long on(PrimitiveSegment[] primitives, long vibrationId) { in on() argument 299 long duration = mNativeWrapper.compose(primitives, vibrationId); in on() 316 public long on(RampSegment[] primitives, long vibrationId) { in on() argument 322 long duration = mNativeWrapper.composePwle(primitives, braking, vibrationId); in on() 421 private static native long on(long nativePtr, long milliseconds, long vibrationId); in on() argument [all …]
|
D | VibrationThread.java | 59 boolean triggerSyncedVibration(long vibrationId); in triggerSyncedVibration() argument 79 void onVibrationCompleted(long vibrationId, @NonNull Vibration.EndInfo vibrationEndInfo); in onVibrationCompleted() argument 85 void onVibrationThreadReleased(long vibrationId); in onVibrationThreadReleased() argument
|
D | VibratorManagerService.java | 206 static native boolean nativeTriggerSynced(long nativeServicePtr, long vibrationId); in nativeTriggerSynced() argument 978 private void onSyncedVibrationComplete(long vibrationId) { in onSyncedVibrationComplete() argument 981 && mCurrentVibration.getVibration().id == vibrationId) { in onSyncedVibrationComplete() 983 Slog.d(TAG, "Synced vibration " + vibrationId + " complete, notifying thread"); in onSyncedVibrationComplete() 990 private void onVibrationComplete(int vibratorId, long vibrationId) { in onVibrationComplete() argument 993 && mCurrentVibration.getVibration().id == vibrationId) { in onVibrationComplete() 995 Slog.d(TAG, "Vibration " + vibrationId + " on vibrator " + vibratorId in onVibrationComplete() 1468 public boolean triggerSyncedVibration(long vibrationId) { in triggerSyncedVibration() argument 1469 return mNativeWrapper.triggerSynced(vibrationId); in triggerSyncedVibration() 1510 public void onVibrationCompleted(long vibrationId, Vibration.EndInfo vibrationEndInfo) { in onVibrationCompleted() argument [all …]
|
/frameworks/base/services/core/jni/ |
D | com_android_server_vibrator_VibratorManagerService.cpp | 55 std::function<void()> createCallback(jlong vibrationId) { in createCallback() argument 56 return [vibrationId, this]() { in createCallback() 58 jniEnv->CallVoidMethod(mCallbackListener, sMethodIdOnComplete, vibrationId); in createCallback() 138 jlong vibrationId) { in nativeTriggerSynced() argument 145 auto callback = service->createCallback(vibrationId); in nativeTriggerSynced()
|
D | com_android_server_vibrator_VibratorController.cpp | 133 std::function<void()> createCallback(jlong vibrationId) { in createCallback() argument 135 return [vibrationId, callbackId, this]() { in createCallback() 143 vibrationId); in createCallback() 228 jlong vibrationId) { in vibratorOn() argument 234 auto callback = wrapper->createCallback(vibrationId); in vibratorOn() 279 jlong strength, jlong vibrationId) { in vibratorPerformEffect() argument 287 auto callback = wrapper->createCallback(vibrationId); in vibratorPerformEffect() 296 jobjectArray composition, jlong vibrationId) { in vibratorPerformComposedEffect() argument 308 auto callback = wrapper->createCallback(vibrationId); in vibratorPerformComposedEffect() 318 jobjectArray waveform, jint brakingId, jlong vibrationId) { in vibratorPerformPwleEffect() argument [all …]
|