Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80c404a4 authored by Kyunglyul Hyun's avatar Kyunglyul Hyun
Browse files

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
parent 51f286c9
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -71,6 +71,7 @@ public class CastControllerImpl implements CastController {
    public CastControllerImpl(Context context) {
    public CastControllerImpl(Context context) {
        mContext = context;
        mContext = context;
        mMediaRouter = (MediaRouter) context.getSystemService(Context.MEDIA_ROUTER_SERVICE);
        mMediaRouter = (MediaRouter) context.getSystemService(Context.MEDIA_ROUTER_SERVICE);
        mMediaRouter.setRouterGroupId(MediaRouter.MIRRORING_GROUP_ID);
        mProjectionManager = (MediaProjectionManager)
        mProjectionManager = (MediaProjectionManager)
                context.getSystemService(Context.MEDIA_PROJECTION_SERVICE);
                context.getSystemService(Context.MEDIA_PROJECTION_SERVICE);
        mProjection = mProjectionManager.getActiveProjectionInfo();
        mProjection = mProjectionManager.getActiveProjectionInfo();