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

Commit 8bfb959a authored by Vlad Popa's avatar Vlad Popa Committed by Automerger Merge Worker
Browse files

Merge "CSD: enable sound dose in AudioService" into udc-dev am: 6b0bb05b

parents 3f7fc172 6b0bb05b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2078,7 +2078,7 @@
    <integer name="config_audio_ring_vol_default">5</integer>

    <!-- Enable sound dose computation and warnings -->
    <bool name="config_audio_csd_enabled_default">false</bool>
    <bool name="config_audio_csd_enabled_default">true</bool>

    <!-- The default value for whether head tracking for
         spatial audio is enabled for a newly connected audio device -->
+10 −0
Original line number Diff line number Diff line
@@ -732,6 +732,16 @@ public class SoundDoseHelper {

    private void initCsd() {
        if (!mEnableCsd) {
            final ISoundDose soundDose = AudioSystem.getSoundDoseInterface(mSoundDoseCallback);
            if (soundDose == null) {
                Log.w(TAG,  "ISoundDose instance is null.");
                return;
            }
            try {
                soundDose.disableCsd();
            } catch (RemoteException e) {
                Log.e(TAG, "Cannot disable CSD", e);
            }
            return;
        }