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

Commit 87c51b40 authored by Dhanalakshmi Siddani's avatar Dhanalakshmi Siddani Committed by Gerrit - the friendly Code Review server
Browse files

audio: register for device shutdown notification

- Device shutdown notification has to be intimated to HAL
- Add changes to register for device shutdown notification

Change-Id: I966795640d4cc5a4d3f9d247e8a6bc00b3a7b750
parent 0856c09c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -550,6 +550,7 @@ public class AudioService extends IAudioService.Stub {
        intentFilter.addAction(Intent.ACTION_USER_SWITCHED);

        intentFilter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
        intentFilter.addAction(Intent.ACTION_SHUTDOWN);
        // TODO merge orientation and rotation
        mMonitorOrientation = SystemProperties.getBoolean("ro.audio.monitorOrientation", false);
        if (mMonitorOrientation) {
@@ -4231,7 +4232,10 @@ public class AudioService extends IAudioService.Stub {
                        0,
                        0,
                        mStreamStates[AudioSystem.STREAM_MUSIC], 0);
            } else if (action.equals(Intent.ACTION_SHUTDOWN)) {
                AudioSystem.setParameters("dev_shutdown=true");
            }

        }
    }