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

Unverified Commit 277aea3e authored by Ido Ben-Hur's avatar Ido Ben-Hur Committed by Michael Bestas
Browse files

base: Allow disabling turbulence noise after clicking the play button



Having the turbulence noise play causes frame drops on mid to lower-end devices.
To work around this, allow disabling it through an overlay.

[basamaryan: Only disable the turbulence noise and kill the toggle]

Change-Id: If03f9ce6e4cb11805ef1edd484702367859933fe
Signed-off-by: default avatarbasamaryan <basam.aryan@gmail.com>
parent 05df0f93
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -26,4 +26,7 @@

    <!-- Whether usage of the proximity sensor during doze is supported -->
    <bool name="doze_proximity_sensor_supported">true</bool>

    <!-- Whether to play turbulence noise after clicking the play button -->
    <bool name="config_turbulenceNoise">true</bool>
</resources>
+3 −1
Original line number Diff line number Diff line
@@ -1180,7 +1180,9 @@ public class MediaControlPanel {
    }

    private boolean shouldPlayTurbulenceNoise() {
        return mButtonClicked && !mWasPlaying && isPlaying();
        boolean isTurbulenceNoiseEnabled = mContext.getResources().getBoolean(
                com.android.systemui.res.R.bool.config_turbulenceNoise);
        return mButtonClicked && !mWasPlaying && isPlaying() && isTurbulenceNoiseEnabled;
    }

    private TurbulenceNoiseAnimationConfig createTurbulenceNoiseConfig() {