OSDN Git Service

Audio focus: duck new players during the ducked phase
authorJean-Michel Trivi <jmtrivi@google.com>
Tue, 4 Apr 2017 01:49:45 +0000 (18:49 -0700)
committerJean-Michel Trivi <jmtrivi@google.com>
Tue, 4 Apr 2017 22:48:58 +0000 (15:48 -0700)
commitcafed63e3acfebe1c633433c9e3a6013bb1f47cc
treeb26794b63bb858bea5f9eebe130c54551fc83c7c
parent38344ac4e923704bb121de6c2c59ef14d6d32619
Audio focus: duck new players during the ducked phase

Keep a list of all UIDs whose players should be ducked.
  Whenever a new player is created or started, and their
  UID matches one in the list, add them to the ducked
  players.
The bug observed was when Play Music transitioned from one
  song to another while music should have been ducked: the
  new song wasn't unducked because it wasn't in the list
  of players to unduck, as it wasn't active when the ducking
  occured.

Test: request focus while Play Music transitions from one song to another
Bug: 36232742
Bug: 30258418
Change-Id: If8bd47128e6177731406f39e77d049b0d6f34f5d
services/core/java/com/android/server/audio/PlaybackActivityMonitor.java