History log of /frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ee4926b3033899028886c7407f75bcf55e708192 25-Jul-2017 Conrad Chen <conradchen@google.com> MediaRouter: Fix race condition between selecting routes

The bluetooth route updating in the framework MediaRouter is notified
from AIDL, which would happen in a random thread. And in support
library, the synchronizing of selected route is done with runnable
posting. Therefore, there's a possibility that the bluetooth route is
added in-between sync runnable is posted but not yet executed, which
might cause incorrect synchronization of the selected route that
overrides the newly selected bluetooth route.

Removes sync messages for route selected when a system route is selected
to fix the issue.

Test: ./gradlew support-mediarouter-v7:connectedCheck
Test: ./gradlew :support-v7-demos:installDebug
Bug: 63907134
Change-Id: I733b00c05722b2a29cb72a2eceb8dcf0db4c8e4f
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
98ec0d5b378c8417156037af6389e90f0074a26e 30-Mar-2017 Aurimas Liutikas <aurimas@google.com> Clean up an assortment of Error-Prone warnings.

Test: ./gradlew assembleError prone still works (and now with fewer warnings TM)
Change-Id: I9e0af18b49a3eff1dd7ac8edc5a2873f93bb844e
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
c69882cb9b130902c1554ef5d3e3b06d776cd796 05-Mar-2017 Alan Viverette <alanv@google.com> Re-enable lint enforcement, fix remaining lint issues

Bug: 29630077
Test: ./gradlew lint
Change-Id: Ied1e4b1c33ba158d6bfab5439497ee4fc8284a8f
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
6adc8ba4e18a8b97b0c6719975d7259f7a2500fe 02-Feb-2017 Sungsoo <sungsoo@google.com> MediaRouter: Fix syncSystemRoutes behavior

- Use a different approach to check whether the audio is routed to
bluetooth or not.
- Do not select other routes instead of the bluetooth route and
the default route.
- Uses isSystemLiveAudioOnlyRoute instead of isSystemBluetoothRoute.

Bug: 33791300, Bug: 34645668
Test: Manual with Support7Demos
Change-Id: Id2f798c33b4cef687e930cc990db42f6f351700b
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
c0b44f78f248e321d913db6077bf9a55976d7319 07-Oct-2016 Sungsoo <sungsoo@google.com> MediaRouter: Synchronize route selecting information

If the selected route of an application was a system media route such
as the device speaker, a wired headset, or a bluetooth speaker, and
the selected route is changed by other processes, no callback could
be called in API 24 and before, and once it happens, getSelectedRoute()
could return a wrong value and selectRoute() could be no-op.

This CL ensures that getSelectedRoute() always returns the currently
selected route and selectRoute() works.

Bug: 31921702
Test: Support7Demos on API 24
Change-Id: I0edcbe4d9f2fe42e0fc6ba78802320eaa24fe24d
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
d38d8790c68d4d82a278d42e7f2a1382d005c637 26-Sep-2016 Sungsoo <sungsoo@google.com> MediaRouter: Make getSelectedRoute return the recent infomation

Bug: 28517884, Bug: 31398128
Test: Checked with Support7Demos app
Change-Id: I4c7667866f13e551913b84809a622e3963ba9b9b
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
e2c6a94b6e4aab502f9b88dd3ff664bd90b25839 25-Aug-2016 Aurimas Liutikas <aurimas@google.com> Remove all the extra accessor methods added by javac in support-mediarouter.

Change private methods to be package protected to avoid extra methods
that get added to be able to access them from inner classes.

This CL saves 143 methods in our jar.

Bug: 31075707
Change-Id: Iddd66c7f04ae9522792a889a59b3ae7629b2983c
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
96d4428ba99ad068679fca129e179e8187770d75 10-Nov-2015 Insun Kang <insun@google.com> MediaRouter: Let SystemMRP use a new framework API of v24

Bug: 24777080
Change-Id: I63d896f5cbee206b569a750899626fed7d8140a0
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
adf0f4a217e14894af07dfa9f46cad7d98b8a7f4 07-Nov-2013 Jeff Brown <jeffbrown@google.com> Use the full component name to construct route ids.

Provide better disambiguation when a package contains multiple
route providers by using the full component name in the route id.

Also fix a bug handling package updates.

Bug: 11257292
Change-Id: Ice4fee742d73e2e979f2059b89cc4f4d971e0947
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
19e77645aa6ce65b466d570375b36e2428f170b3 23-Aug-2013 Jeff Brown <jeffbrown@google.com> Support changing volume of system routes.

Bug: 10346194
Change-Id: I0751f6bbc0cfb80ea136c7a4e467041ba2ea16db
(cherry picked from commit f4904a4ec8e9d616cfe2cdbe1bffce95cf8f82cc)
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
cb63b6ecac9786891514f241dec71695f09d3efb 01-Jun-2013 Jeff Brown <jeffbrown@google.com> Add unique id to routes.

Route unique ids are stable identifiers that applications can use
for various purposes such as remembering route selections or
communicating with services.

Bug: 9210033
Change-Id: I4519f6f639346b8981f02fb870e64becca291b4c
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
d11aa1784335270b8d85e385f2c8be79ee6a586c 31-May-2013 Jeff Brown <jeffbrown@google.com> Remove isActiveScanRequired().

This flag was originally added to support media route providers
that are unable to discover media routes passively. However, this
would be true in practice for most media route providers since
they will usually need to poll the network periodically to find
new routes.

Previously we did not have a good way to tell when discovery was
really needed so we forced these providers to rely on active scans
instead. Unfortunately this meant that the MediaRouterButton needed
to be visible all of the time.

Now that we have CALLBACK_FLAG_REQUEST_DISCOVERY, we can be more
conservative about when discovery occurs. In practice, discovery
will only happen when an application that uses media router is in
the foreground. So it's ok for providers to do some moderate work
during normal discovery and we don't need to force them to rely
exclusively on active scans anymore.

We also remove getDiscoverableControlFilters() since it was only
needed for the case where active scans were required.

Note that we still do perform active scans when the chooser dialog
is open. However, we don't allow providers to require them.
This even works for Wifi Display because the system already knows
which displays have been paired so it doesn't require active scans
to decide whether to advertise those routes (although it does
require active scans to discover whether they are really available).

Bug: 9210033
Change-Id: I69adaf42fb461ee2b564e3605f921d23b6b5c7be
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
f03da4a9e6cc02251c2f804eb6f25da61821d6a7 31-May-2013 Jeff Brown <jeffbrown@google.com> Add CALLBACK_FLAG_REQUEST_DISCOVERY.

This change is designed to reduce the network discovery overhead
and memory footprint of the media router.

Make the media router more conservative about when it binds to
media route providers and performs discovery. It will now
only perform discovery if the application has specified
CALLBACK_FLAG_REQUEST_DISCOVERY or CALLBACK_FLAG_PERFORM_ACTIVE_SCAN.
Furthermore, it will only bind to media route provider services
while discovery is requested or while the app has selected
a route that belongs to the provider. It will automatically
unbind when these conditions no longer hold true to allow the
system to reclaim memory used by the MRP service process.

Added a MediaRouteDiscoveryFragment to make it a bit easier to
manage the lifecycle of media router callbacks.

Bug: 9210033
Change-Id: I9e7399022d51eb6db3ac79f843ccfa5aba3a8762
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
3d4c9459ed77f732dd3ba602713af6ebf9280c8c 21-May-2013 Jeff Brown <jeffbrown@google.com> Streamline media router API.

Merge progress and status and remove ACTION_GET_PROGRESS.

Add a new MediaItemStatus object to ensure that apps package the
status information correctly into the Bundle and to remove
possible ambiguity about the interpretation of each field.

Add EXTRA_ITEM_STATUS as a standard output result from
most requests include ACTION_PLAY, ACTION_PAUSE, etc.

Add a timestamp to the status object.

Add a mechanism for returning an error string from failed
media control requests.

Add a unique prefix to all mediarouter library resources
to make conflicts with application resources less likely.

Bug: 8175766
Change-Id: Ifca759424125ca62e8a72d35068dd3cc045d21ad
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
d63957d28aaabcec588b8cde12eac16414783aeb 16-May-2013 Jeff Brown <jeffbrown@google.com> Replace route status with route description.

Bug: 8175766
Change-Id: I694e3d78cd6a80ecb277b5d950b52d9401a8736c
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
55b361aea868e53e848bc45af3a55ae43e7871c3 16-May-2013 Jeff Brown <jeffbrown@google.com> Remove route icons from the API and the UI.

Bug: 8175766
Change-Id: Ic376cb99455fff1e48aa7d3243365aa7cb94659b
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
11417b1cfde8f1749905f2d735623af9214148af 27-Apr-2013 Jeff Brown <jeffbrown@google.com> Add media router picker UI.

Introduced the concept of a MediaRouteSelector which is the means
by which an application states the route capabilities of routes
that it would like to discover.

Added selectors to the addCallback method along with several
other methods to assist with discovery. Callbacks can specify
flags to perform active scans of routes or to disable filtering
of route events.

Added a workaround to scan for wifi displays on JB MR1.

Refactored the route descriptor objects to use the builder pattern
instead of simply documenting that they should be immutable
since several developers have already tripped over this.

The UI is feature complete but not final.

Bug: 8175766
Change-Id: I54ebb7488222746b0c07292e65b9ded1b9d720fa
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
f6a2eb6ce9fef191df8368681ed5f825dcd24340 19-Apr-2013 Jeff Brown <jeffbrown@google.com> Tolerate user routes with null names.

By tolerate, I mean don't crash. However these routes will be
considered invalid and discarded by the media router (with a
log message).

Bug: 8175766
Change-Id: Iedbc36beca3e2ded1794247fbd7e6819da233433
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
129abf73ce9be1bc172b945263c7975ad1a3006f 23-Mar-2013 Jeff Brown <jeffbrown@google.com> Define some new media control intents.

Also rename the methods of RouteController to emphasize the
fact that they are intended to be overridden by the
implementation.

Add a concept of a stream id.

Change-Id: I84c55340914c7245dcf8ab66911adcb725aec10e
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java
b507e525a61ed761eecfc2eaaf19af7e8db5dca5 20-Mar-2013 Jeff Brown <jeffbrown@google.com> Move support library media router to v7 package.

Resolved some TODOs related to missing resources.

Bug: 8175766
Change-Id: I57632d0a961de58a5dd53e889b4fd39832b5fba0
/frameworks/support/v7/mediarouter/src/android/support/v7/media/SystemMediaRouteProvider.java