History log of /frameworks/support/v7/mediarouter/src/android/support/v7/app/MediaRouteDiscoveryFragment.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fb81e09002d1d611168b204fc50d259fc15f27b2 06-Aug-2014 Jeff Brown <jeffbrown@google.com> Disable passive discovery on low-RAM devices.

On low-RAM devices, passive discovery has a significant impact on
system performance because it causes many media route provider services
to be started and kept running for as long as the application requests
discovery (usually the whole time it is in the foreground).

To mitigate this issue, the CALLBACK_FLAG_REQUEST_DISCOVERY flag is
now ignored on low-RAM devices. Also, isRouteAvailable may return
true in cases where it is possible for a route to be discovered
even if one hasn't been found yet. These two changes have the effect
of causing the MediaRouteButton to always be shown on low-RAM
devices. When the user clicks on this button, active discovery will be
performed as usual.

Added CALLBACK_FLAG_FORCE_DISCOVERY and AVAILABILITY_FLAG_REQUIRE_MATCH
to allow an application to request the old behavior if necessary.
Also added a bunch of docs to explain why applications really shouldn't
do that.

Bug: 15191337
Change-Id: I4d742ea4569c977eb9b89277c57a72ec3a4fce41
/frameworks/support/v7/mediarouter/src/android/support/v7/app/MediaRouteDiscoveryFragment.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/app/MediaRouteDiscoveryFragment.java