AudioService: fix volume shaper release

Catch exception when applying a volume shaper to cancel any remaining
  volume shaper for release

Test: see bug
Bug: 35842573
Change-Id: Ic724a43fad6df599540369c095498c8adb2c73a8
This commit is contained in:
Jean-Michel Trivi
2017-02-28 14:56:04 -08:00
parent a7aaae881c
commit 0b30c5a64a

View File

@@ -152,9 +152,11 @@ public final class PlaybackActivityMonitor
synchronized(mPlayerLock) {
final AudioPlaybackConfiguration apc = mPlayers.get(new Integer(piid));
if (checkConfigurationCaller(piid, apc, binderUid)) {
apc.getPlayerProxy().applyVolumeShaper(
DUCK_ID,
TERMINATE);
try {
apc.getPlayerProxy().applyVolumeShaper(
DUCK_ID,
TERMINATE);
} catch (Exception e) { /* silent failure, happens happens with binder failure */ }
mPlayers.remove(new Integer(piid));
} else {
Log.e(TAG, "Error releasing player " + piid);