Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b83aec2 authored by Lais Andrade's avatar Lais Andrade
Browse files

Extract vibration settings and scaling code from VibratorService

Move the existing logic around vibration settings and ContentObserver to
a separate class, that will be used by VibratiorManagerService once
migration is complete.

Also extract the vibration scaling logic to a separate controller, which
will also be used by the VibratorManagerService after migration.

Bug: 167946816
Bug: 131311651
Test: atest FrameworksServiceTests:VibratorServiceTest
      atest FrameworksServiceTests:VibrationSettingsTest
      atest FrameworksServiceTests:VibrationScaleTest
Change-Id: Idf081e662aa218e93a38cd3262a1357e2e3faf0d
parent a2a25399
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -413,7 +413,7 @@ public abstract class VibrationEffect implements Parcelable {
     *
     * @hide
     */
    public abstract VibrationEffect resolve(int defaultAmplitude);
    public abstract <T extends VibrationEffect> T resolve(int defaultAmplitude);

    /**
     * Scale the vibration effect intensity with the given constraints.
@@ -425,7 +425,7 @@ public abstract class VibrationEffect implements Parcelable {
     *
     * @hide
     */
    public abstract VibrationEffect scale(float scaleFactor);
    public abstract <T extends VibrationEffect> T scale(float scaleFactor);

    /**
     * Scale given vibration intensity by the given factor.
+46 −252

File changed.

Preview size limit exceeded, changes collapsed.

+158 −0

File added.

Preview size limit exceeded, changes collapsed.

+284 −0

File added.

Preview size limit exceeded, changes collapsed.

+55 −27

File changed.

Preview size limit exceeded, changes collapsed.

Loading