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

Commit fc83498d authored by Santiago Seifert's avatar Santiago Seifert Committed by Android (Google) Code Review
Browse files

Merge "Add SystemMediaRoute2Provider2" into main

parents ce03a3f3 9b7a4fc8
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2544,7 +2544,10 @@ class MediaRouter2ServiceImpl {
            mServiceRef = new WeakReference<>(service);
            mUserRecord = userRecord;
            mSystemProvider =
                    new SystemMediaRoute2Provider(
                    Flags.enableMirroringInMediaRouter2()
                            ? new SystemMediaRoute2Provider2(
                                    service.mContext, UserHandle.of(userRecord.mUserId), looper)
                            : new SystemMediaRoute2Provider(
                                    service.mContext, UserHandle.of(userRecord.mUserId), looper);
            mRouteProviders.add(mSystemProvider);
            mWatcher = new MediaRoute2ProviderWatcher(service.mContext, this,
+34 −0
Original line number Diff line number Diff line
/*
 * Copyright 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.server.media;

import android.content.Context;
import android.media.MediaRoute2ProviderService;
import android.os.Looper;
import android.os.UserHandle;

/**
 * Extends {@link SystemMediaRoute2Provider} by adding system routes provided by {@link
 * MediaRoute2ProviderService provider services}.
 *
 * <p>System routes are those which can handle the system audio and/or video.
 */
/* package */ class SystemMediaRoute2Provider2 extends SystemMediaRoute2Provider {
    SystemMediaRoute2Provider2(Context context, UserHandle user, Looper looper) {
        super(context, user, looper);
    }
}