OSDN Git Service

Bluetooth: Enable in-band ringing in vibration mode (1/4)
authorJack He <siyuanh@google.com>
Tue, 13 Feb 2018 05:00:24 +0000 (21:00 -0800)
committerJack He <siyuanh@google.com>
Fri, 23 Mar 2018 06:14:33 +0000 (06:14 +0000)
commit6dd78c1759e8b1bc95fbae2ffe87eaecad5a2041
tree22af68aabc64c2b4a47384196e5e38372bbb61db
parent9e5a7f2a63e1a43abf9b3a9f644fa5b70fefab03
Bluetooth: Enable in-band ringing in vibration mode (1/4)

* Add AudioSystem.FOR_VIBRATE_RINGING mode to match the native layer
  AUDIO_POLICY_FORCE_FOR_VIBRATE_RINGING force mode
* Switch to this mode when Bluetooth SCO is connected
* Modify AudioService.muteRingerModeStreams() method to not mute ringer
  volume when Bluetooth SCO is ON. Also, when ringer is unmuted, mirror
  speaker ringtone volume on Bluetooth SCO ringer

Bug: 72647074
Test: Call phone in vibration mode and hear ringtone on HFP enabled
      headset, verify that ringtone is only played through headset.
      Then disconnect headset and call again to verify that ringtone
      does not play through phone speaker in vibration mode.

Change-Id: I7d642020710c085f0e1f27c750c74b0e2fb57398
media/java/android/media/AudioSystem.java
services/core/java/com/android/server/audio/AudioService.java