Ensure non-empty selected routes in session
This is a partial revert of I0c12d2b63b0c3969c91e0082f7821e342360b724, which allows a race condition where the available routes don't include the selected route, because both collections are obtained without holding the lock that guards both collections. While this change doesn't ensure the transferable and selectable routes of the session are consistent, it does prevent an exception due to empty selectable routes. Bug: b/416911854 Test: atest CtsMediaRouterTestCases Test: Manual using a BT device and a wired headset. Flag: EXEMPT BUGFIX Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:d1b3245c261cabcc936af263e3f71b79c9aeecc5 Merged-In: I6a022c6098daf8282e6085bb671173f574e63a4f Change-Id: I6a022c6098daf8282e6085bb671173f574e63a4f
Loading
Please register or sign in to comment