Audio focus: fix delayed focus request during locked focus behavior
Fix issue where if audio focus was requested with GAIN, and accepted delayed focus, while focus was locked, then previous focus owners didn't receive LOSS, and thus would be removed from the stack. The fix consists in propagating the focus loss through the stack under the focus locker, and remove any focus loser if the loss was definitive. In order to simulate the bug conditions, the test API for simulating focus requests and abandons, was modified to support locking the focus like in a phone call. Bug: 206856107 Test: atest AudioFocusTest#testAudioFocusDelayedByCall Test: atest AudioFocusTest#testAudioFocusTransientDelayedByCall Change-Id: I211cd46b66c882499bfa43718bc0cb37b2f79817
Loading
Please register or sign in to comment