Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f63e3f3c authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 24512 into eclair

* changes:
  Fix issue android.permission.cts.NoAudioPermissionTest:testRouting is failing.
parents df4edc80 dc1d17a1
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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);