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

Commit e04783cc authored by Eric Laurent's avatar Eric Laurent Committed by Android Git Automerger
Browse files

am 615858a8: Merge "Indicate screen off condition to audio framework." into ics-mr0

* commit '615858a8':
  Indicate screen off condition to audio framework.
parents 93c299d0 615858a8
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -368,6 +368,8 @@ public class AudioService extends IAudioService.Stub {
        intentFilter.addAction(Intent.ACTION_USB_DGTL_HEADSET_PLUG);
        intentFilter.addAction(Intent.ACTION_HDMI_AUDIO_PLUG);
        intentFilter.addAction(Intent.ACTION_BOOT_COMPLETED);
        intentFilter.addAction(Intent.ACTION_SCREEN_ON);
        intentFilter.addAction(Intent.ACTION_SCREEN_OFF);
        context.registerReceiver(mReceiver, intentFilter);

        // Register for package removal intent broadcasts for media button receiver persistence
@@ -2565,6 +2567,10 @@ public class AudioService extends IAudioService.Stub {
                        removeMediaButtonReceiverForPackage(packageName);
                    }
                }
            } else if (action.equals(Intent.ACTION_SCREEN_ON)) {
                AudioSystem.setParameters("screen_state=on");
            } else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
                AudioSystem.setParameters("screen_state=off");
            }
        }
    }