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
This commit is contained in:
@@ -91,7 +91,8 @@ public final class MediaProjectionManagerService extends SystemService
|
|||||||
public void onStart() {
|
public void onStart() {
|
||||||
publishBinderService(Context.MEDIA_PROJECTION_SERVICE, new BinderService(),
|
publishBinderService(Context.MEDIA_PROJECTION_SERVICE, new BinderService(),
|
||||||
false /*allowIsolated*/);
|
false /*allowIsolated*/);
|
||||||
mMediaRouter.addCallback(MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY, mMediaRouterCallback);
|
mMediaRouter.addCallback(MediaRouter.ROUTE_TYPE_REMOTE_DISPLAY, mMediaRouterCallback,
|
||||||
|
MediaRouter.CALLBACK_FLAG_PASSIVE_DISCOVERY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user