am f63e3f3c: Merge change 24512 into eclair

Merge commit 'f63e3f3cc8c61bc9eeda980f314795412eb03b79' into eclair-plus-aosp

* commit 'f63e3f3cc8c61bc9eeda980f314795412eb03b79':
  Fix issue android.permission.cts.NoAudioPermissionTest:testRouting is failing.
This commit is contained in:
Eric Laurent
2009-09-10 08:17:19 -07:00
committed by Android Git Automerger

View File

@@ -758,6 +758,9 @@ public class AudioService extends IAudioService.Stub {
/** @see AudioManager#setSpeakerphoneOn() */
public void setSpeakerphoneOn(boolean on){
if (!checkAudioSettingsPermission("setSpeakerphoneOn()")) {
return;
}
if (on) {
AudioSystem.setForceUse(AudioSystem.FOR_COMMUNICATION, AudioSystem.FORCE_SPEAKER);
mForcedUseForComm = AudioSystem.FORCE_SPEAKER;
@@ -778,6 +781,9 @@ public class AudioService extends IAudioService.Stub {
/** @see AudioManager#setBluetoothScoOn() */
public void setBluetoothScoOn(boolean on){
if (!checkAudioSettingsPermission("setBluetoothScoOn()")) {
return;
}
if (on) {
AudioSystem.setForceUse(AudioSystem.FOR_COMMUNICATION, AudioSystem.FORCE_BT_SCO);
AudioSystem.setForceUse(AudioSystem.FOR_RECORD, AudioSystem.FORCE_BT_SCO);