diff options
author | Eric Laurent <elaurent@google.com> | 2010-02-12 07:41:14 -0800 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2010-02-12 07:41:14 -0800 |
commit | 6015a9715421a339c2b7bb63f9166504e3488179 (patch) | |
tree | 44343bb407d7df8a9bd83fe3e0c3070a307c4083 /media | |
parent | a0659aa36c987e28e29778bd97e75fe52152c60e (diff) | |
download | frameworks_base-6015a9715421a339c2b7bb63f9166504e3488179.zip frameworks_base-6015a9715421a339c2b7bb63f9166504e3488179.tar.gz frameworks_base-6015a9715421a339c2b7bb63f9166504e3488179.tar.bz2 |
Fix issue 2418668: AudioManager isWiredHeadsetOn() always returns false for headset without mic.
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/AudioManager.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index 171881f..70c27c2 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -751,6 +751,8 @@ public class AudioManager { */ public boolean isWiredHeadsetOn() { if (AudioSystem.getDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADSET,"") + == AudioSystem.DEVICE_STATE_UNAVAILABLE && + AudioSystem.getDeviceConnectionState(AudioSystem.DEVICE_OUT_WIRED_HEADPHONE,"") == AudioSystem.DEVICE_STATE_UNAVAILABLE) { return false; } else { |