summaryrefslogtreecommitdiffstats
path: root/media/java
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2011-08-02 17:41:11 -0700
committerEric Laurent <elaurent@google.com>2011-08-12 17:43:35 -0700
commit497b3fe7257d5bbee7762455c6988915bde21601 (patch)
tree53eb1f81d44e07906216667506b7c63b03f076bb /media/java
parent7b53848d14dc041f6bc64c6fa5c63b93a87010aa (diff)
downloadframeworks_base-497b3fe7257d5bbee7762455c6988915bde21601.zip
frameworks_base-497b3fe7257d5bbee7762455c6988915bde21601.tar.gz
frameworks_base-497b3fe7257d5bbee7762455c6988915bde21601.tar.bz2
Issue 5081351: isWiredHeadsetOn() permission.
AudioManager.isWiredHeadsetOn() should not require permission MODIFY_AUDIO_SETTINGS. Remove permission checks on all getters in audio policy manager as permission enforcement is really usefull for setters. Also deprecate AudioManager.isWiredHeadsetOn() which name and implementation are deceptive. Change-Id: I38f8df7c26c0d417bf0e2b74e4c11c2d143f2ecd
Diffstat (limited to 'media/java')
-rw-r--r--media/java/android/media/AudioManager.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java
index da7a050..56a9933 100644
--- a/media/java/android/media/AudioManager.java
+++ b/media/java/android/media/AudioManager.java
@@ -1061,10 +1061,13 @@ public class AudioManager {
}
/**
- * Checks whether audio routing to the wired headset is on or off.
+ * Checks whether a wired headset is connected or not.
+ * <p>This is not a valid indication that audio playback is
+ * actually over the wired headset as audio routing depends on other conditions.
*
- * @return true if audio is being routed to/from wired headset;
+ * @return true if a wired headset is connected.
* false if otherwise
+ * @deprecated Use only to check is a headset is connected or not.
*/
public boolean isWiredHeadsetOn() {
if (AudioSystem.getDeviceConnectionState(DEVICE_OUT_WIRED_HEADSET,"")