Loading media/java/android/media/IMediaRouterService.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ interface IMediaRouterService { MediaRouterClientState getState(IMediaRouterClient client); boolean isPlaybackActive(IMediaRouterClient client); void setBluetoothA2dpOn(IMediaRouterClient client, boolean on); void setDiscoveryRequest(IMediaRouterClient client, int routeTypes, boolean activeScan); void setSelectedRoute(IMediaRouterClient client, String routeId, boolean explicit); void requestSetVolume(IMediaRouterClient client, String routeId, int volume); Loading media/java/android/media/MediaRouter.java +2 −1 Original line number Diff line number Diff line Loading @@ -1070,7 +1070,8 @@ public class MediaRouter { && (types & ROUTE_TYPE_LIVE_AUDIO) != 0 && (route.isBluetooth() || route.isDefault())) { try { sStatic.mAudioService.setBluetoothA2dpOn(route.isBluetooth()); sStatic.mMediaRouterService.setBluetoothA2dpOn(sStatic.mClient, route.isBluetooth()); } catch (RemoteException e) { Log.e(TAG, "Error changing Bluetooth A2DP state", e); } Loading services/core/java/com/android/server/media/MediaRouterService.java +19 −0 Original line number Diff line number Diff line Loading @@ -336,6 +336,25 @@ public final class MediaRouterService extends IMediaRouterService.Stub } } // Binder call @Override public void setBluetoothA2dpOn(IMediaRouterClient client, boolean on) { if (client == null) { throw new IllegalArgumentException("client must not be null"); } final long token = Binder.clearCallingIdentity(); try { synchronized (mLock) { mAudioService.setBluetoothA2dpOn(on); } } catch (RemoteException ex) { Slog.w(TAG, "RemoteException while calling setBluetoothA2dpOn. on=" + on); } finally { Binder.restoreCallingIdentity(token); } } // Binder call @Override public void setDiscoveryRequest(IMediaRouterClient client, Loading Loading
media/java/android/media/IMediaRouterService.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ interface IMediaRouterService { MediaRouterClientState getState(IMediaRouterClient client); boolean isPlaybackActive(IMediaRouterClient client); void setBluetoothA2dpOn(IMediaRouterClient client, boolean on); void setDiscoveryRequest(IMediaRouterClient client, int routeTypes, boolean activeScan); void setSelectedRoute(IMediaRouterClient client, String routeId, boolean explicit); void requestSetVolume(IMediaRouterClient client, String routeId, int volume); Loading
media/java/android/media/MediaRouter.java +2 −1 Original line number Diff line number Diff line Loading @@ -1070,7 +1070,8 @@ public class MediaRouter { && (types & ROUTE_TYPE_LIVE_AUDIO) != 0 && (route.isBluetooth() || route.isDefault())) { try { sStatic.mAudioService.setBluetoothA2dpOn(route.isBluetooth()); sStatic.mMediaRouterService.setBluetoothA2dpOn(sStatic.mClient, route.isBluetooth()); } catch (RemoteException e) { Log.e(TAG, "Error changing Bluetooth A2DP state", e); } Loading
services/core/java/com/android/server/media/MediaRouterService.java +19 −0 Original line number Diff line number Diff line Loading @@ -336,6 +336,25 @@ public final class MediaRouterService extends IMediaRouterService.Stub } } // Binder call @Override public void setBluetoothA2dpOn(IMediaRouterClient client, boolean on) { if (client == null) { throw new IllegalArgumentException("client must not be null"); } final long token = Binder.clearCallingIdentity(); try { synchronized (mLock) { mAudioService.setBluetoothA2dpOn(on); } } catch (RemoteException ex) { Slog.w(TAG, "RemoteException while calling setBluetoothA2dpOn. on=" + on); } finally { Binder.restoreCallingIdentity(token); } } // Binder call @Override public void setDiscoveryRequest(IMediaRouterClient client, Loading