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

Commit ce84f3d7 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "audio: register for device shutdown notification"

parents fc847f57 24e6493e
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -684,6 +684,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) {
@@ -5261,6 +5262,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