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
Loading
Please register or sign in to comment