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

Commit e3464af6 authored by Preetam Singh Ranawat's avatar Preetam Singh Ranawat Committed by Linux Build Service Account
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

CRs-fixed: 1034581
Conflicts:
	services/core/java/com/android/server/audio/AudioService.java

Change-Id: I966795640d4cc5a4d3f9d247e8a6bc00b3a7b750
parent 3cae949c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -716,6 +716,7 @@ public class AudioService extends IAudioService.Stub {
        intentFilter.addAction(BluetoothAdapter.ACTION_STATE_CHANGED);

        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) {
@@ -5550,6 +5551,8 @@ public class AudioService extends IAudioService.Stub {
                        state == BluetoothAdapter.STATE_TURNING_OFF) {
                    disconnectAllBluetoothProfiles();
                }
            } else if (action.equals(Intent.ACTION_SHUTDOWN)) {
                AudioSystem.setParameters("dev_shutdown=true");
            }
        }
    } // end class AudioServiceBroadcastReceiver