diff options
author | Jason Monk <jmonk@google.com> | 2014-10-27 19:20:02 -0400 |
---|---|---|
committer | Jason Monk <jmonk@google.com> | 2014-10-27 19:25:50 -0400 |
commit | 4444c5b27874866f18cd8f4abb8914cc17857ea7 (patch) | |
tree | 368ef60196d52926f50e3b19204fe474e17380a4 /services/core/java/com/android/server/media/projection | |
parent | 79775d4bc4fa71994942dbd1d441aa62827c34be (diff) | |
download | frameworks_base-4444c5b27874866f18cd8f4abb8914cc17857ea7.zip frameworks_base-4444c5b27874866f18cd8f4abb8914cc17857ea7.tar.gz frameworks_base-4444c5b27874866f18cd8f4abb8914cc17857ea7.tar.bz2 |
Add missing passive discovery flag
MediaProjectionManagerService had an active media callback which
was causing a service to be bound 100% of the time. Adding a
passive flag makes it only observe events, and allow the service
to only be bound when needed by apps requesting active discovery.
Bug: 18042409
Bug: 17969854
Change-Id: I1bfa6609e2aa507ee2ce227de50f0e5ae951e000
Diffstat (limited to 'services/core/java/com/android/server/media/projection')
-rw-r--r-- | services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java b/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java index cdfb656..531d20a 100644 --- a/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java +++ b/services/core/java/com/android/server/media/projection/MediaProjectionManagerService.java @@ -91,7 +91,8 @@ public final class MediaProjectionManagerService extends SystemService public void onStart() { publishBinderService(Context.MEDIA_PROJECTION_SERVICE, new BinderService(), false /*allowIsolated*/); - mMediaRouter.addCallback(MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY, mMediaRouterCallback); + mMediaRouter.addCallback(MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY, mMediaRouterCallback, + MediaRouter.CALLBACK_FLAG_PASSIVE_DISCOVERY); } @Override |