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

Commit 2ff6b314 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6004599 from e0b4bb12 to rvc-release

Change-Id: I658a9266391cf3da99479713738138ed8ce9ccee
parents 9c036e97 e0b4bb12
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -197,6 +197,8 @@ public class MediaPlayerList {
    void cleanup() {
        mContext.unregisterReceiver(mPackageChangedBroadcastReceiver);

        mActivePlayerId = NO_ACTIVE_PLAYER;

        mMediaSessionManager.removeOnActiveSessionsChangedListener(mActiveSessionsChangedListener);
        mMediaSessionManager.setCallback(null, null);
        mMediaSessionManager = null;
+14 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.content.ContentResolver;
import android.content.Context;
import android.content.res.Resources;
import android.provider.Settings;
import android.util.ArrayMap;
import android.util.FeatureFlagUtils;
import android.util.Log;

@@ -42,6 +43,7 @@ import com.android.bluetooth.pan.PanService;
import com.android.bluetooth.pbap.BluetoothPbapService;
import com.android.bluetooth.pbapclient.PbapClientService;
import com.android.bluetooth.sap.SapService;
import com.android.server.SystemConfig;

import java.util.ArrayList;

@@ -112,6 +114,11 @@ public class Config {
        if (resources == null) {
            return;
        }
        SystemConfig systemConfig = SystemConfig.getInstance();
        ArrayMap<String, Boolean> componentEnabledStates = null;
        if (systemConfig != null) {
            componentEnabledStates = systemConfig.getComponentsEnabledStates(ctx.getPackageName());
        }

        ArrayList<Class> profiles = new ArrayList<>(PROFILE_SERVICES_AND_FLAGS.length);
        for (ProfileConfig config : PROFILE_SERVICES_AND_FLAGS) {
@@ -123,6 +130,13 @@ public class Config {
                supported = true;
            }

            if (componentEnabledStates != null
                    && componentEnabledStates.containsKey(config.mClass.getName())) {
                supported = componentEnabledStates.get(config.mClass.getName());
                Log.v(TAG, config.mClass.getSimpleName() + " Feature Flag set to " + supported
                        + " by components configuration");
            }

            if (supported && !isProfileDisabled(ctx, config.mMask)) {
                Log.v(TAG, "Adding " + config.mClass.getSimpleName());
                profiles.add(config.mClass);