summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2021-02-04 07:51:43 -0800
committerJean-Michel Trivi <jmtrivi@google.com>2021-03-05 17:00:18 -0800
commitb50f70c8c04ab2ff92ed9425eee2e8545b91b9a1 (patch)
treea488ed9d1fe5d31dc8a7910a8f73eec9ecd19405 /rs/java/android/renderscript/RenderScript.java
parentf98091f2e1fc0f0ee2794f6bc5b226647cfafebd (diff)
Audio focus: fade out active playbacks on FOCUS_LOSS
When an application loses audio focus with AUDIOFOCUS_LOSS and its active players (on usage GAME or MEDIA, but not SPEECH) qualify to be faded out with a VolumeShaper: - apply the fade on the active players - remove the focus loser from the stack - delay the dispatch of focus loss by the duration of the fade Management of who is being faded out is in the FadingManager class. When an app requests audio focus and the request is granted, undo the fade. When a player from an app being faded out starts, apply the fade but skip the volume ramp (essentially muting the player). Bug: 181910599 Test: cts-tradefed run cts -m CtsMediaTestCases -t android.media.cts.AudioFocusTest Change-Id: I5f7b466d30057ce03466ac2edc950a02aca767d6
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
0 files changed, 0 insertions, 0 deletions