OSDN Git Service

Select correct system audio route in updateAudioRoutes
authorSungsoo Lim <sungsoo@google.com>
Mon, 18 Sep 2017 05:28:38 +0000 (14:28 +0900)
committerSungsoo Lim <sungsoo@google.com>
Mon, 25 Sep 2017 01:15:49 +0000 (10:15 +0900)
commit0e43c503ab73f0a66875ed4cd9b40e68bbb405aa
tree27741190a7a455e33a00a3c821d3c88bddd39307
parent7a59a622760078658f821a27b6299eb148de4c65
Select correct system audio route in updateAudioRoutes

While update audio routes, MediaRouter had an access to the variable
of MediaRouterService.mGlobalBluetoothA2dpOn, which was updated in
the callback of AudioRoutesObserver.dispatchAudioRoutesChanged().
However, since updateAudioRoutes() was also called by the same
callback, mGlobalBluetoothA2dpOn could be used in updateAudioRoutes()
before its value was updated.

Bug: 65629167
Test: passed MediaRouterTest
Test: Manually confirmed that the issue is fixed with this CL
Change-Id: Id0034996a51a6d8d1e8bd9d2c6ca386aabbb8baf
Merged-In: Id0034996a51a6d8d1e8bd9d2c6ca386aabbb8baf
media/java/android/media/IMediaRouterService.aidl
media/java/android/media/MediaRouter.java
services/core/java/com/android/server/media/MediaRouterService.java