From 80c404a4f69b861dfed3b79a17f98db4475bf393 Mon Sep 17 00:00:00 2001 From: Kyunglyul Hyun Date: Fri, 24 May 2019 16:30:29 +0900 Subject: [PATCH] CastTile: Set media router group id to sync cast status Using media router group id, CastTile can sync cast status with Settings. If Settings begins/stops cast (mirrorring), CastTile can know that and Settings also knows when CastTile begins cast. Please refer ag/7669852 to how router group id can be used to synchronize cast status. Bug: 112826114 Bug: 131385091 Bug: 130345243 Test: Manually tested after applying this and ag/7708778 Change-Id: Ie7c329220eb67725515517c950ff476cbee733c0 --- .../android/systemui/statusbar/policy/CastControllerImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java index a5bb92d8e6ed5..da1ef2f0f6500 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/CastControllerImpl.java @@ -71,6 +71,7 @@ public class CastControllerImpl implements CastController { public CastControllerImpl(Context context) { mContext = context; mMediaRouter = (MediaRouter) context.getSystemService(Context.MEDIA_ROUTER_SERVICE); + mMediaRouter.setRouterGroupId(MediaRouter.MIRRORING_GROUP_ID); mProjectionManager = (MediaProjectionManager) context.getSystemService(Context.MEDIA_PROJECTION_SERVICE); mProjection = mProjectionManager.getActiveProjectionInfo();