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

Commit 80e2d820 authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat Committed by Steve Kondik
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 2e6dc781
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -714,6 +714,7 @@ public class AudioService extends IAudioService.Stub {
        intentFilter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED);

        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) {
@@ -5402,6 +5403,8 @@ public class AudioService extends IAudioService.Stub {
                int userId = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
                UserManagerService.getInstance().setSystemControlledUserRestriction(
                        UserManager.DISALLOW_RECORD_AUDIO, false, userId);
            } else if (action.equals(Intent.ACTION_SHUTDOWN)) {
                AudioSystem.setParameters("dev_shutdown=true");
            }
        }
    } // end class AudioServiceBroadcastReceiver