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

Commit 05d1a6db authored by a.derendyaev's avatar a.derendyaev Committed by Bruno Martins
Browse files

SystemUI: runtime configurable audio panel location



* Updates for twelve (bgcngm / Arian)
  * Adapt to new UI

* Updates for eleven (LuK1337):
  * Disable on TVs
  * Simplify changes once again.

* Updates for ten (sam3000):
  * Squash in tuner service settings reset blacklist.
  * Remove layout xml changes that aren't needed.
  * Apply slide in/out animations to landscape too
    (they work fine).
  * Few other simplifications.

* Placement is now determined at runtime by a lineage setting.
  Use TunerService to track settings change.
  Various cleanup and fix formatting.
  Fixed left/right gravity on expand arrow and ringer.
  Fix commit author.
  (sam3000)

This is a squashed and adapted commit of the following patches:

----

  From cf187bd54fbd807e16b0ac3593e839008efd302e Mon Sep 17 00:00:00 2001
  From: "a.derendyaev" <a.derendyaev@magdv.com>
  Date: Wed, 19 Dec 2018 21:57:45 +0800
  Subject: [PATCH] SystemUI: allow devices override audio panel location

  Some devices have volume buttons on left side and it not fancy if volume panel will be at right side.
  You can override panel location using overlay for SystemUI:

  <!-- Allow devices override audio panel location to the left side -->
  <bool name="config_audioPanelOnLeftSide">true</bool>

  Change-Id: I8a2302867010b0e6a02efa68df57e534ce7bbf46
  Signed-off-by: default avatarJagrav Naik <jagravnaik0@gmail.com>
  Signed-off-by: default avatarAnirudh Gupta <anirudhgupta109@gmail.com>

----

  From 9d0ff1efd26961a4f14d0821f50ebe80c2a65ff9 Mon Sep 17 00:00:00 2001
  From: Alex Cruz <alex@dirtyunicorns.com>
  Date: Fri, 21 Dec 2018 22:08:52 -0600
  Subject: [PATCH] Volume panel: Do the same with less

  Use common volume_dialog layout for both left- and right-aligned panel

  [@TheDorkKnightRises - POSP]
  - Tweak padding values to make them uniform across both alignments
  - Remove redundant comment

  Change-Id: If41456f71ffd18466166e7b4120ff34d9e6f5a46
  Signed-off-by: default avatarJosh Fox (XlxFoXxlX) <joshfox87@gmail.com>

----

Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Sun Jun 9 13:33:05 2019 -0700

    SystemUI: Blacklist volume panel on left setting from tuner reset

    Change-Id: I47ddb3b818cfa3548fef42fa686d0991e2a35605

Author: programminghoch10 <hoch10@kabelbw.de>
Date:   Mon Jul 12 17:55:28 2021 +0200

    SystemUI: VolumeDialogImpl: Fix volume panel permanently visible

    * The Volume Panel is permanently visible when changing the panel side while the panel is open until SystemUI is restarted
    * This change removes the Panel View when changing the panel side

    Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/3482

    Change-Id: Ic3ca5a196315e96024121c995cc6282fb74f6e4c

Change-Id: If22c97eb1ce4cfb13396d182d90786f4b7acaee7
parent edaf4952
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -25,14 +25,14 @@
    android:background="@android:color/transparent"
    android:theme="@style/volume_dialog_theme">

    <!-- right-aligned to be physically near volume button -->
    <LinearLayout
        android:id="@+id/volume_dialog"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="right"
        android:layout_gravity="right"
        android:layout_marginRight="@dimen/volume_dialog_panel_transparent_padding_right"
        android:paddingLeft="@dimen/volume_dialog_panel_transparent_padding_horizontal"
        android:paddingRight="@dimen/volume_dialog_panel_transparent_padding_horizontal"
        android:orientation="vertical"
        android:clipToPadding="false"
        android:clipChildren="false">
@@ -147,6 +147,7 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom | right"
        android:layout_marginRight="@dimen/volume_tool_tip_right_margin"/>
        android:layout_marginLeft="@dimen/volume_tool_tip_horizontal_margin"
        android:layout_marginRight="@dimen/volume_tool_tip_horizontal_margin"/>

</FrameLayout>
 No newline at end of file
+4 −3
Original line number Diff line number Diff line
@@ -25,14 +25,14 @@
    android:clipToPadding="false"
    android:theme="@style/volume_dialog_theme">

    <!-- right-aligned to be physically near volume button -->
    <LinearLayout
        android:id="@+id/volume_dialog"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="right"
        android:layout_gravity="right"
        android:layout_marginRight="@dimen/volume_dialog_panel_transparent_padding_right"
        android:paddingLeft="@dimen/volume_dialog_panel_transparent_padding_horizontal"
        android:paddingRight="@dimen/volume_dialog_panel_transparent_padding_horizontal"
        android:orientation="vertical"
        android:clipToPadding="false"
        android:clipChildren="false">
@@ -146,6 +146,7 @@
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom | right"
        android:layout_marginRight="@dimen/volume_tool_tip_right_margin"/>
        android:layout_marginLeft="@dimen/volume_tool_tip_horizontal_margin"
        android:layout_marginRight="@dimen/volume_tool_tip_horizontal_margin"/>

</FrameLayout>
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -392,7 +392,7 @@

    <dimen name="brightness_mirror_height">48dp</dimen>

    <dimen name="volume_dialog_panel_transparent_padding_right">8dp</dimen>
    <dimen name="volume_dialog_panel_transparent_padding_horizontal">8dp</dimen>

    <dimen name="volume_dialog_panel_transparent_padding">20dp</dimen>

@@ -431,7 +431,7 @@

    <dimen name="volume_dialog_background_blur_radius">0dp</dimen>

    <dimen name="volume_tool_tip_right_margin">76dp</dimen>
    <dimen name="volume_tool_tip_horizontal_margin">76dp</dimen>

    <dimen name="volume_tool_tip_arrow_corner_radius">2dp</dimen>

+144 −33
Original line number Diff line number Diff line
@@ -124,9 +124,12 @@ import com.android.systemui.plugins.VolumeDialogController.StreamState;
import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.tuner.TunerService;
import com.android.systemui.util.AlphaTintDrawableWrapper;
import com.android.systemui.util.RoundedCornerProgressDrawable;

import lineageos.providers.LineageSettings;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
@@ -144,6 +147,9 @@ public class VolumeDialogImpl implements VolumeDialog,
        ViewTreeObserver.OnComputeInternalInsetsListener {
    private static final String TAG = Util.logTag(VolumeDialogImpl.class);

    private static final String VOLUME_PANEL_ON_LEFT =
            "lineagesecure:" + LineageSettings.Secure.VOLUME_PANEL_ON_LEFT;

    private static final long USER_ATTEMPT_GRACE_PERIOD = 1000;
    private static final int UPDATE_ANIMATION_DURATION = 80;

@@ -267,6 +273,10 @@ public class VolumeDialogImpl implements VolumeDialog,
    private boolean mHasSeenODICaptionsTooltip;
    private ViewStub mODICaptionsTooltipViewStub;
    private View mODICaptionsTooltipView = null;
    private TunerService mTunerService;

    // Volume panel placement left or right
    private boolean mVolumePanelOnLeft;

    private final boolean mUseBackgroundBlur;
    private Consumer<Boolean> mCrossWindowBlurEnabledListener;
@@ -284,6 +294,7 @@ public class VolumeDialogImpl implements VolumeDialog,
            ConfigurationController configurationController,
            MediaOutputDialogFactory mediaOutputDialogFactory,
            ActivityStarter activityStarter,
            TunerService tunerService,
            InteractionJankMonitor interactionJankMonitor) {
        mContext =
                new ContextThemeWrapper(context, R.style.volume_dialog_theme);
@@ -295,6 +306,7 @@ public class VolumeDialogImpl implements VolumeDialog,
        mConfigurationController = configurationController;
        mMediaOutputDialogFactory = mediaOutputDialogFactory;
        mActivityStarter = activityStarter;
        mTunerService = tunerService;
        mShowActiveStreamOnly = showActiveStreamOnly();
        mHasSeenODICaptionsTooltip =
                Prefs.getBoolean(context, Prefs.Key.HAS_SEEN_ODI_CAPTIONS_TOOLTIP, false);
@@ -322,6 +334,10 @@ public class VolumeDialogImpl implements VolumeDialog,
            };
        }

        if (!mShowActiveStreamOnly) {
            mTunerService.addTunable(mTunable, VOLUME_PANEL_ON_LEFT);
        }

        initDimens();
    }

@@ -377,8 +393,8 @@ public class VolumeDialogImpl implements VolumeDialog,
        final int[] locInWindow = new int[2];
        view.getLocationInWindow(locInWindow);

        float x = locInWindow[0];
        float y = locInWindow[1];
        float xExtraSize = 0;
        float yExtraSize = 0;

        // The ringer and rows container has extra height at the top to fit the expanded ringer
        // drawer. This area should not be touchable unless the ringer drawer is open.
@@ -386,19 +402,28 @@ public class VolumeDialogImpl implements VolumeDialog,
        // are multiple rows they are touchable.
        if (view == mTopContainer && !mIsRingerDrawerOpen) {
            if (!isLandscape()) {
                y += getRingerDrawerOpenExtraSize();
                yExtraSize = getRingerDrawerOpenExtraSize();
            } else if (getRingerDrawerOpenExtraSize() > getVisibleRowsExtraSize()) {
                x += (getRingerDrawerOpenExtraSize() - getVisibleRowsExtraSize());
                xExtraSize = (getRingerDrawerOpenExtraSize() - getVisibleRowsExtraSize());
            }
        }

        if (mVolumePanelOnLeft) {
            mTouchableRegion.op(
                (int) x,
                (int) y,
                    locInWindow[0],
                    locInWindow[1] + (int) yExtraSize,
                    locInWindow[0] + view.getWidth() - (int) xExtraSize,
                    locInWindow[1] + view.getHeight(),
                    Region.Op.UNION);
        } else {
            mTouchableRegion.op(
                    locInWindow[0] + (int) xExtraSize,
                    locInWindow[1] + (int) yExtraSize,
                    locInWindow[0] + view.getWidth(),
                    locInWindow[1] + view.getHeight(),
                    Region.Op.UNION);
        }
    }

    private void initDialog(int lockTaskModeState) {
        mDialog = new CustomDialog(mContext);
@@ -426,6 +451,10 @@ public class VolumeDialogImpl implements VolumeDialog,
        lp.setTitle(VolumeDialogImpl.class.getSimpleName());
        lp.windowAnimations = -1;
        lp.gravity = mContext.getResources().getInteger(R.integer.volume_dialog_gravity);
        if (!mShowActiveStreamOnly) {
            lp.gravity &= ~(Gravity.LEFT | Gravity.RIGHT);
            lp.gravity |= mVolumePanelOnLeft ? Gravity.LEFT : Gravity.RIGHT;
        }
        mWindow.setAttributes(lp);
        mWindow.setLayout(WRAP_CONTENT, WRAP_CONTENT);

@@ -436,7 +465,8 @@ public class VolumeDialogImpl implements VolumeDialog,
        mDialog.setOnShowListener(dialog -> {
            mDialogView.getViewTreeObserver().addOnComputeInternalInsetsListener(this);
            if (!shouldSlideInVolumeTray()) {
                mDialogView.setTranslationX(mDialogView.getWidth() / 2.0f);
                mDialogView.setTranslationX(
                        getTranslationForPanelLocation() * mDialogView.getWidth() / 2.0f);
            }
            mDialogView.setAlpha(0);
            mDialogView.animate()
@@ -569,6 +599,34 @@ public class VolumeDialogImpl implements VolumeDialog,
        mSettingsView = mDialog.findViewById(R.id.settings_container);
        mSettingsIcon = mDialog.findViewById(R.id.settings);

        if (mVolumePanelOnLeft) {
            if (mRingerAndDrawerContainer != null) {
                mRingerAndDrawerContainer.setLayoutDirection(LAYOUT_DIRECTION_RTL);
            }

            ViewGroup container = mDialog.findViewById(R.id.volume_dialog_container);
            setGravity(container, Gravity.LEFT);
            setLayoutGravity(container, Gravity.LEFT);

            setGravity(mDialogView, Gravity.LEFT);
            setLayoutGravity(mDialogView, Gravity.LEFT);

            setGravity((ViewGroup) mTopContainer, Gravity.LEFT);

            setLayoutGravity(mSelectedRingerContainer, Gravity.BOTTOM | Gravity.LEFT);

            setLayoutGravity(mRingerDrawerNewSelectionBg, Gravity.BOTTOM | Gravity.LEFT);

            setGravity(mRinger, Gravity.LEFT);
            setLayoutGravity(mRinger, Gravity.BOTTOM | Gravity.LEFT);

            setGravity(mDialogRowsViewContainer, Gravity.LEFT);
            setLayoutGravity(mDialogRowsViewContainer, Gravity.LEFT);

            setGravity(mODICaptionsView, Gravity.LEFT);
            setLayoutGravity(mODICaptionsView, Gravity.LEFT);
        }

        if (mRows.isEmpty()) {
            if (!AudioSystem.isSingleVolume(mContext)) {
                addRow(STREAM_ACCESSIBILITY, R.drawable.ic_volume_accessibility,
@@ -619,6 +677,40 @@ public class VolumeDialogImpl implements VolumeDialog,
        mRingerCount = mShowVibrate ? 3 : 2;
    }

    // Helper to set gravity.
    private void setGravity(ViewGroup viewGroup, int gravity) {
        if (viewGroup instanceof LinearLayout) {
            ((LinearLayout) viewGroup).setGravity(gravity);
        }
    }

    // Helper to set layout gravity.
    private void setLayoutGravity(ViewGroup viewGroup, int gravity) {
        if (viewGroup != null) {
            Object obj = viewGroup.getLayoutParams();
            if (obj instanceof FrameLayout.LayoutParams) {
                ((FrameLayout.LayoutParams) obj).gravity = gravity;
            } else if (obj instanceof LinearLayout.LayoutParams) {
                ((LinearLayout.LayoutParams) obj).gravity = gravity;
            }
        }
    }

    private final TunerService.Tunable mTunable = new TunerService.Tunable() {
        @Override
        public void onTuningChanged(String key, String newValue) {
            if (VOLUME_PANEL_ON_LEFT.equals(key)) {
                final boolean volumePanelOnLeft = TunerService.parseIntegerSwitch(newValue, false);
                if (mVolumePanelOnLeft != volumePanelOnLeft) {
                    mVolumePanelOnLeft = volumePanelOnLeft;
                    mHandler.post(() -> {
                        mControllerCallbackH.onConfigurationChanged();
                    });
                }
            }
        }
    };

    protected ViewGroup getDialogView() {
        return mDialogView;
    }
@@ -829,6 +921,12 @@ public class VolumeDialogImpl implements VolumeDialog,
                    mDialogView.getPaddingTop(),
                    mDialogView.getPaddingRight(),
                    mDialogView.getPaddingBottom() + getRingerDrawerOpenExtraSize());
        } else if (mVolumePanelOnLeft) {
            mDialogView.setPadding(
                    mDialogView.getPaddingLeft(),
                    mDialogView.getPaddingTop(),
                    mDialogView.getPaddingRight() + getRingerDrawerOpenExtraSize(),
                    mDialogView.getPaddingBottom());
        } else {
            mDialogView.setPadding(
                    mDialogView.getPaddingLeft() + getRingerDrawerOpenExtraSize(),
@@ -898,15 +996,22 @@ public class VolumeDialogImpl implements VolumeDialog,
    }

    /**
     * Translation to apply form the origin (either top or left) to overlap the selection background
     * with the given mode in the drawer.
     * Translation to apply form the origin (either top or left/right) to overlap the selection
     * background with the given mode in the drawer.
     */
    private float getTranslationInDrawerForRingerMode(int mode) {
        return mode == RINGER_MODE_VIBRATE
        return (mode == RINGER_MODE_VIBRATE
                ? -mRingerDrawerItemSize * 2
                : mode == RINGER_MODE_SILENT
                        ? -mRingerDrawerItemSize
                        : 0;
                        : 0)
                * (isLandscape()
                        ? getTranslationForPanelLocation()
                        : 1);
    }

    private float getTranslationForPanelLocation() {
        return mVolumePanelOnLeft ? -1 : 1;
    }

    /** Animates in the ringer drawer. */
@@ -937,12 +1042,13 @@ public class VolumeDialogImpl implements VolumeDialog,
                    getTranslationInDrawerForRingerMode(mState.ringerModeInternal));
        }

        // Move the drawer so that the top/rightmost ringer choice overlaps with the selected ringer
        // Move the drawer so that the top/outmost ringer choice overlaps with the selected ringer
        // icon.
        if (!isLandscape()) {
            mRingerDrawerContainer.setTranslationY(mRingerDrawerItemSize * (mRingerCount - 1));
        } else {
            mRingerDrawerContainer.setTranslationX(mRingerDrawerItemSize * (mRingerCount - 1));
            mRingerDrawerContainer.setTranslationX(
                    getTranslationForPanelLocation() * mRingerDrawerItemSize * (mRingerCount - 1));
        }
        mRingerDrawerContainer.setAlpha(0f);
        mRingerDrawerContainer.setVisibility(VISIBLE);
@@ -1024,7 +1130,7 @@ public class VolumeDialogImpl implements VolumeDialog,
                    .start();
        } else {
            mRingerDrawerContainer.animate()
                    .translationX(mRingerDrawerItemSize * 2)
                    .translationX(getTranslationForPanelLocation() * mRingerDrawerItemSize * 2)
                    .start();
        }

@@ -1397,7 +1503,9 @@ public class VolumeDialogImpl implements VolumeDialog,

                    hideRingerDrawer();
                }, 50));
        if (!shouldSlideInVolumeTray()) animator.translationX(mDialogView.getWidth() / 2.0f);
        if (!shouldSlideInVolumeTray()) {
            animator.translationX(getTranslationForPanelLocation() * mDialogView.getWidth() / 2.0f);
        }
        animator.setListener(getJankListener(getDialogView(), TYPE_DISMISS,
                mDialogHideAnimationDurationMs)).start();
        checkODICaptionsTooltip(true);
@@ -1458,8 +1566,10 @@ public class VolumeDialogImpl implements VolumeDialog,
            trimObsoleteH();
        }

        boolean isOutmostIndexMax = mVolumePanelOnLeft ? isRtl() : !isRtl();

        // Index of the last row that is actually visible.
        int rightmostVisibleRowIndex = !isRtl() ? -1 : Short.MAX_VALUE;
        int outmostVisibleRowIndex = isOutmostIndexMax ? -1 : Short.MAX_VALUE;

        // apply changes to all rows
        for (final VolumeRow row : mRows) {
@@ -1468,14 +1578,11 @@ public class VolumeDialogImpl implements VolumeDialog,
            Util.setVisOrGone(row.view, shouldBeVisible);

            if (shouldBeVisible && mRingerAndDrawerContainerBackground != null) {
                // For RTL, the rightmost row has the lowest index since child views are laid out
                // For RTL, the outmost row has the lowest index since child views are laid out
                // from right to left.
                rightmostVisibleRowIndex =
                        !isRtl()
                                ? Math.max(rightmostVisibleRowIndex,
                                mDialogRowsView.indexOfChild(row.view))
                                : Math.min(rightmostVisibleRowIndex,
                                        mDialogRowsView.indexOfChild(row.view));
                outmostVisibleRowIndex = isOutmostIndexMax
                        ? Math.max(outmostVisibleRowIndex, mDialogRowsView.indexOfChild(row.view))
                        : Math.min(outmostVisibleRowIndex, mDialogRowsView.indexOfChild(row.view));

                // Add spacing between each of the visible rows - we'll remove the spacing from the
                // last row after the loop.
@@ -1483,7 +1590,7 @@ public class VolumeDialogImpl implements VolumeDialog,
                if (layoutParams instanceof LinearLayout.LayoutParams) {
                    final LinearLayout.LayoutParams linearLayoutParams =
                            ((LinearLayout.LayoutParams) layoutParams);
                    if (!isRtl()) {
                    if (isOutmostIndexMax) {
                        linearLayoutParams.setMarginEnd(mRingerRowsPadding);
                    } else {
                        linearLayoutParams.setMarginStart(mRingerRowsPadding);
@@ -1501,8 +1608,8 @@ public class VolumeDialogImpl implements VolumeDialog,
            }
        }

        if (rightmostVisibleRowIndex > -1 && rightmostVisibleRowIndex < Short.MAX_VALUE) {
            final View lastVisibleChild = mDialogRowsView.getChildAt(rightmostVisibleRowIndex);
        if (outmostVisibleRowIndex > -1 && outmostVisibleRowIndex < Short.MAX_VALUE) {
            final View lastVisibleChild = mDialogRowsView.getChildAt(outmostVisibleRowIndex);
            final ViewGroup.LayoutParams layoutParams = lastVisibleChild.getLayoutParams();
            // Remove the spacing on the last row, and remove its background since the container is
            // drawing a background for this row.
@@ -2032,6 +2139,9 @@ public class VolumeDialogImpl implements VolumeDialog,
        final Rect bounds = mRingerAndDrawerContainerBackground.copyBounds();
        if (!isLandscape()) {
            bounds.top = (int) (mRingerDrawerClosedAmount * getRingerDrawerOpenExtraSize());
        } else if (mVolumePanelOnLeft) {
            bounds.right = (int) ((mDialogCornerRadius / 2) + mRingerDrawerItemSize
                    + (1f - mRingerDrawerClosedAmount) * getRingerDrawerOpenExtraSize());
        } else {
            bounds.left = (int) (mRingerDrawerClosedAmount * getRingerDrawerOpenExtraSize());
        }
@@ -2039,7 +2149,7 @@ public class VolumeDialogImpl implements VolumeDialog,
    }

    /*
     * The top container is responsible for drawing the solid color background behind the rightmost
     * The top container is responsible for drawing the solid color background behind the outmost
     * (primary) volume row. This is because the volume drawer animates in from below, initially
     * overlapping the primary row. We need the drawer to draw below the row's SeekBar, since it
     * looks strange to overlap it, but above the row's background color, since otherwise it will be
@@ -2073,8 +2183,9 @@ public class VolumeDialogImpl implements VolumeDialog,
                        ? mDialogRowsViewContainer.getTop()
                        : mDialogRowsViewContainer.getTop() - mDialogCornerRadius);

        // Set gravity to top-right, since additional rows will be added on the left.
        background.setLayerGravity(0, Gravity.TOP | Gravity.RIGHT);
        // Set gravity to top and opposite side where additional rows will be added.
        background.setLayerGravity(
                0, mVolumePanelOnLeft ? Gravity.TOP | Gravity.LEFT : Gravity.TOP | Gravity.RIGHT);

        // In landscape, the ringer drawer animates out to the left (instead of down). Since the
        // drawer comes from the right (beyond the bounds of the dialog), we should clip it so it
+3 −0
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import com.android.systemui.plugins.VolumeDialogController;
import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.tuner.TunerService;
import com.android.systemui.volume.VolumeComponent;
import com.android.systemui.volume.VolumeDialogComponent;
import com.android.systemui.volume.VolumeDialogImpl;
@@ -53,6 +54,7 @@ public interface VolumeModule {
            ConfigurationController configurationController,
            MediaOutputDialogFactory mediaOutputDialogFactory,
            ActivityStarter activityStarter,
            TunerService tunerService,
            InteractionJankMonitor interactionJankMonitor) {
        VolumeDialogImpl impl = new VolumeDialogImpl(
                context,
@@ -62,6 +64,7 @@ public interface VolumeModule {
                configurationController,
                mediaOutputDialogFactory,
                activityStarter,
                tunerService,
                interactionJankMonitor);
        impl.setStreamImportant(AudioManager.STREAM_SYSTEM, false);
        impl.setAutomute(true);
Loading