Skip to content
Commit 7ca22de1 authored by Simon Bowden's avatar Simon Bowden
Browse files

Extract Steps and StepQueue out of VibrationThread.

This is groundwork for making VibrationThread long-lived, executing
vibrations managed by a VibrationStepConductor(StepQueue) in turn. The
purpose is to separate state from the two, but I thought we might as
well pull the steps right out to the top-level rather than moving them
to be nested in the conductor, as it's easier to navigate conductor code
then.

Renames:
 - StepQueue to VibrationStepConductor
 - SingleVibratorStep to AbstractVibratorStep
 - all subclasses of SingleVibratorStep to be called
   SomethingVibratorStep.
 - The non-VibratorStep Steps are now SomethingSequentialEffectStep.

This CL is intended to have no logic changes - just path-to-access, but
needs to move fields and methods around a lot, and change visibility to
make it work. In some cases, the field visibility arrangement is not
great (especially the lock used in VibrationThread), but the worst of
those will change in a follow-up that will detach VibrationStepConductor
from VibrationThread that will require non-trivial changes.

One small refactor for neatness was to move "noteVibratorOn/Off" into
the VibratorManagerHooks so that the battery stats service itself isn't
needed.

Bug: 193792066
Test: atest
Change-Id: Iabed5a057b0e0f65450c9ed9ef01186055f21907
parent 45a07122
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment