Audio service: always unduck focus winner
When a FocusRequester gains focus, always unduck it. This fixes a bug where a player could remain ducked even after regaining focus. The issue was that the unducking was only done in the focus gain if the loss had been AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK, which is the only one that could have caused a duck. But between the moment the app lost audio focus with LOSS_TRANSIENT_CAN_DUCK and the moment it regains focus, it could have lost the focus once more with LOSS_TRANSIENT. And in this case, it would not have been unducked. The fix consists in always unducking an app that gains focus. If it wasn't ducked, that operation is a no-op. Test: see bug Bug: 37433811 Change-Id: I95a5bfcc2d5063986bd62841c1893bbbd00b45bf
Loading
Please register or sign in to comment