Loading core/java/android/os/ExternalVibration.java +4 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,10 @@ public class ExternalVibration implements Parcelable { return mAttrs; } public IBinder getToken() { return mToken; } public VibrationAttributes getVibrationAttributes() { return new VibrationAttributes.Builder(mAttrs).build(); } Loading services/core/java/com/android/server/vibrator/AbstractVibratorStep.java +3 −3 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ abstract class AbstractVibratorStep extends Step { "Turning off vibrator " + getVibratorId()); } controller.off(); getVibration().stats().reportVibratorOff(); getVibration().stats.reportVibratorOff(); mPendingVibratorOffDeadline = 0; } Loading @@ -136,7 +136,7 @@ abstract class AbstractVibratorStep extends Step { "Amplitude changed on vibrator " + getVibratorId() + " to " + amplitude); } controller.setAmplitude(amplitude); getVibration().stats().reportSetAmplitude(); getVibration().stats.reportSetAmplitude(); } /** Loading Loading @@ -170,7 +170,7 @@ abstract class AbstractVibratorStep extends Step { // Count the loops that were played. int loopSize = effectSize - repeatIndex; int loopSegmentsPlayed = nextSegmentIndex - repeatIndex; getVibration().stats().reportRepetition(loopSegmentsPlayed / loopSize); getVibration().stats.reportRepetition(loopSegmentsPlayed / loopSize); nextSegmentIndex = repeatIndex + ((nextSegmentIndex - effectSize) % loopSize); } Step nextStep = conductor.nextVibrateStep(nextStartTime, controller, effect, Loading services/core/java/com/android/server/vibrator/ComposePrimitivesVibratorStep.java +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ final class ComposePrimitivesVibratorStep extends AbstractVibratorStep { primitives.toArray(new PrimitiveSegment[primitives.size()]); long vibratorOnResult = controller.on(primitivesArray, getVibration().id); handleVibratorOnResult(vibratorOnResult); getVibration().stats().reportComposePrimitives(vibratorOnResult, primitivesArray); getVibration().stats.reportComposePrimitives(vibratorOnResult, primitivesArray); // The next start and off times will be calculated from mVibratorOnResult. return nextSteps(/* segmentsPlayed= */ primitives.size()); Loading services/core/java/com/android/server/vibrator/ComposePwleVibratorStep.java +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ final class ComposePwleVibratorStep extends AbstractVibratorStep { RampSegment[] pwlesArray = pwles.toArray(new RampSegment[pwles.size()]); long vibratorOnResult = controller.on(pwlesArray, getVibration().id); handleVibratorOnResult(vibratorOnResult); getVibration().stats().reportComposePwle(vibratorOnResult, pwlesArray); getVibration().stats.reportComposePwle(vibratorOnResult, pwlesArray); // The next start and off times will be calculated from mVibratorOnResult. return nextSteps(/* segmentsPlayed= */ pwles.size()); Loading services/core/java/com/android/server/vibrator/FinishSequentialEffectStep.java +4 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,8 @@ final class FinishSequentialEffectStep extends Step { Slog.d(VibrationThread.TAG, "FinishSequentialEffectStep for effect #" + startedStep.currentIndex); } conductor.vibratorManagerHooks.noteVibratorOff(conductor.getVibration().uid); conductor.vibratorManagerHooks.noteVibratorOff( conductor.getVibration().callerInfo.uid); Step nextStep = startedStep.nextStep(); return nextStep == null ? VibrationStepConductor.EMPTY_STEP_LIST : Arrays.asList(nextStep); Loading @@ -68,6 +69,7 @@ final class FinishSequentialEffectStep extends Step { @Override public void cancelImmediately() { conductor.vibratorManagerHooks.noteVibratorOff(conductor.getVibration().uid); conductor.vibratorManagerHooks.noteVibratorOff( conductor.getVibration().callerInfo.uid); } } Loading
core/java/android/os/ExternalVibration.java +4 −0 Original line number Diff line number Diff line Loading @@ -104,6 +104,10 @@ public class ExternalVibration implements Parcelable { return mAttrs; } public IBinder getToken() { return mToken; } public VibrationAttributes getVibrationAttributes() { return new VibrationAttributes.Builder(mAttrs).build(); } Loading
services/core/java/com/android/server/vibrator/AbstractVibratorStep.java +3 −3 Original line number Diff line number Diff line Loading @@ -126,7 +126,7 @@ abstract class AbstractVibratorStep extends Step { "Turning off vibrator " + getVibratorId()); } controller.off(); getVibration().stats().reportVibratorOff(); getVibration().stats.reportVibratorOff(); mPendingVibratorOffDeadline = 0; } Loading @@ -136,7 +136,7 @@ abstract class AbstractVibratorStep extends Step { "Amplitude changed on vibrator " + getVibratorId() + " to " + amplitude); } controller.setAmplitude(amplitude); getVibration().stats().reportSetAmplitude(); getVibration().stats.reportSetAmplitude(); } /** Loading Loading @@ -170,7 +170,7 @@ abstract class AbstractVibratorStep extends Step { // Count the loops that were played. int loopSize = effectSize - repeatIndex; int loopSegmentsPlayed = nextSegmentIndex - repeatIndex; getVibration().stats().reportRepetition(loopSegmentsPlayed / loopSize); getVibration().stats.reportRepetition(loopSegmentsPlayed / loopSize); nextSegmentIndex = repeatIndex + ((nextSegmentIndex - effectSize) % loopSize); } Step nextStep = conductor.nextVibrateStep(nextStartTime, controller, effect, Loading
services/core/java/com/android/server/vibrator/ComposePrimitivesVibratorStep.java +1 −1 Original line number Diff line number Diff line Loading @@ -73,7 +73,7 @@ final class ComposePrimitivesVibratorStep extends AbstractVibratorStep { primitives.toArray(new PrimitiveSegment[primitives.size()]); long vibratorOnResult = controller.on(primitivesArray, getVibration().id); handleVibratorOnResult(vibratorOnResult); getVibration().stats().reportComposePrimitives(vibratorOnResult, primitivesArray); getVibration().stats.reportComposePrimitives(vibratorOnResult, primitivesArray); // The next start and off times will be calculated from mVibratorOnResult. return nextSteps(/* segmentsPlayed= */ primitives.size()); Loading
services/core/java/com/android/server/vibrator/ComposePwleVibratorStep.java +1 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ final class ComposePwleVibratorStep extends AbstractVibratorStep { RampSegment[] pwlesArray = pwles.toArray(new RampSegment[pwles.size()]); long vibratorOnResult = controller.on(pwlesArray, getVibration().id); handleVibratorOnResult(vibratorOnResult); getVibration().stats().reportComposePwle(vibratorOnResult, pwlesArray); getVibration().stats.reportComposePwle(vibratorOnResult, pwlesArray); // The next start and off times will be calculated from mVibratorOnResult. return nextSteps(/* segmentsPlayed= */ pwles.size()); Loading
services/core/java/com/android/server/vibrator/FinishSequentialEffectStep.java +4 −2 Original line number Diff line number Diff line Loading @@ -51,7 +51,8 @@ final class FinishSequentialEffectStep extends Step { Slog.d(VibrationThread.TAG, "FinishSequentialEffectStep for effect #" + startedStep.currentIndex); } conductor.vibratorManagerHooks.noteVibratorOff(conductor.getVibration().uid); conductor.vibratorManagerHooks.noteVibratorOff( conductor.getVibration().callerInfo.uid); Step nextStep = startedStep.nextStep(); return nextStep == null ? VibrationStepConductor.EMPTY_STEP_LIST : Arrays.asList(nextStep); Loading @@ -68,6 +69,7 @@ final class FinishSequentialEffectStep extends Step { @Override public void cancelImmediately() { conductor.vibratorManagerHooks.noteVibratorOff(conductor.getVibration().uid); conductor.vibratorManagerHooks.noteVibratorOff( conductor.getVibration().callerInfo.uid); } }