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
|