OSDN Git Service

Vol key presses: active stream has priority of set control stream
authorJean-Michel Trivi <jmtrivi@google.com>
Sat, 15 Apr 2017 19:41:05 +0000 (12:41 -0700)
committerJean-Michel Trivi <jmtrivi@google.com>
Tue, 18 Apr 2017 02:12:47 +0000 (19:12 -0700)
commita7880d4bb7784c1b72def92a6b7a7aaf489b3971
treeedd7c84430e187a49c1dc6ced7c79aa43a0b5c8c
parent57af565fb79c006522261fc211b078d2a5efd331
Vol key presses: active stream has priority of set control stream

When deciding which volume stream is to be controlled by key
  presses, give priority to the stream that is actually playing,
  unless the user has selected a another volume to be controlled
  by the key presses.

Test: play some music over headset, pause, go to home screen.
  Press vol up, it changes ringer volume, immediately press play
  and press vol up again, it should now change music volume
  (and UI updates to indicate that).
Bug: 33355229

Change-Id: Ibad9b59a692e1c6375487b739c55fdbf07f107dd
services/core/java/com/android/server/audio/AudioService.java