diff options
author | Eric Laurent <elaurent@google.com> | 2011-10-14 12:58:40 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-10-14 12:58:40 -0700 |
commit | e04783ccde79730f239d739ad515224245683f22 (patch) | |
tree | c6120978bbad10f2e08c61a412c38485ed1082cd /media/java | |
parent | 93c299d0d0fc46c2407edca569960c36043c137a (diff) | |
parent | 615858a8ebb12b3541fd709e6e965ac814880261 (diff) | |
download | frameworks_base-e04783ccde79730f239d739ad515224245683f22.zip frameworks_base-e04783ccde79730f239d739ad515224245683f22.tar.gz frameworks_base-e04783ccde79730f239d739ad515224245683f22.tar.bz2 |
am 615858a8: Merge "Indicate screen off condition to audio framework." into ics-mr0
* commit '615858a8ebb12b3541fd709e6e965ac814880261':
Indicate screen off condition to audio framework.
Diffstat (limited to 'media/java')
-rw-r--r-- | media/java/android/media/AudioService.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index 0c5e673..e0c2b3b 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -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"); } } } |