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 00:59:03 +0000 (09:59 +0900)
commit546a170bfa9aa8f877b76cbf7666c59161407029
tree0c1235be245176d8aca23ce0d39ac2576f08aa6a
parentbedc655f6d0b6d3c14a012e793eab219afd1cb45
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
media/java/android/media/IMediaRouterService.aidl
media/java/android/media/MediaRouter.java
services/core/java/com/android/server/media/MediaRouterService.java