Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -10253,7 +10253,7 @@ package android.media { method public boolean isMicrophoneMute(); method public boolean isMusicActive(); method public boolean isSpeakerphoneOn(); method public boolean isWiredHeadsetOn(); method public deprecated boolean isWiredHeadsetOn(); method public void loadSoundEffects(); method public void playSoundEffect(int); method public void playSoundEffect(int, float); media/java/android/media/AudioManager.java +5 −2 Original line number Diff line number Diff line Loading @@ -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,"") Loading services/audioflinger/AudioPolicyService.cpp +0 −9 Original line number Diff line number Diff line Loading @@ -182,9 +182,6 @@ audio_policy_dev_state_t AudioPolicyService::getDeviceConnectionState( if (mpAudioPolicy == NULL) { return AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE; } if (!checkPermission()) { return AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE; } return mpAudioPolicy->get_device_connection_state(mpAudioPolicy, device, device_address); } Loading Loading @@ -250,9 +247,6 @@ audio_policy_forced_cfg_t AudioPolicyService::getForceUse(audio_policy_force_use if (mpAudioPolicy == NULL) { return AUDIO_POLICY_FORCE_NONE; } if (!checkPermission()) { return AUDIO_POLICY_FORCE_NONE; } if (usage < 0 || usage >= AUDIO_POLICY_FORCE_USE_CNT) { return AUDIO_POLICY_FORCE_NONE; } Loading Loading @@ -434,9 +428,6 @@ status_t AudioPolicyService::getStreamVolumeIndex(audio_stream_type_t stream, in if (mpAudioPolicy == NULL) { return NO_INIT; } if (!checkPermission()) { return PERMISSION_DENIED; } if (stream < 0 || stream >= AUDIO_STREAM_CNT) { return BAD_VALUE; } Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -10253,7 +10253,7 @@ package android.media { method public boolean isMicrophoneMute(); method public boolean isMusicActive(); method public boolean isSpeakerphoneOn(); method public boolean isWiredHeadsetOn(); method public deprecated boolean isWiredHeadsetOn(); method public void loadSoundEffects(); method public void playSoundEffect(int); method public void playSoundEffect(int, float);
media/java/android/media/AudioManager.java +5 −2 Original line number Diff line number Diff line Loading @@ -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,"") Loading
services/audioflinger/AudioPolicyService.cpp +0 −9 Original line number Diff line number Diff line Loading @@ -182,9 +182,6 @@ audio_policy_dev_state_t AudioPolicyService::getDeviceConnectionState( if (mpAudioPolicy == NULL) { return AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE; } if (!checkPermission()) { return AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE; } return mpAudioPolicy->get_device_connection_state(mpAudioPolicy, device, device_address); } Loading Loading @@ -250,9 +247,6 @@ audio_policy_forced_cfg_t AudioPolicyService::getForceUse(audio_policy_force_use if (mpAudioPolicy == NULL) { return AUDIO_POLICY_FORCE_NONE; } if (!checkPermission()) { return AUDIO_POLICY_FORCE_NONE; } if (usage < 0 || usage >= AUDIO_POLICY_FORCE_USE_CNT) { return AUDIO_POLICY_FORCE_NONE; } Loading Loading @@ -434,9 +428,6 @@ status_t AudioPolicyService::getStreamVolumeIndex(audio_stream_type_t stream, in if (mpAudioPolicy == NULL) { return NO_INIT; } if (!checkPermission()) { return PERMISSION_DENIED; } if (stream < 0 || stream >= AUDIO_STREAM_CNT) { return BAD_VALUE; } Loading