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

Commit 1a73405f authored by Anton Potapov's avatar Anton Potapov Committed by Android (Google) Code Review
Browse files

Merge "Remove Live Captions button from the Volume Dialog when the new Volmue...

Merge "Remove Live Captions button from the Volume Dialog when the new Volmue Panel is enabled" into main
parents 96a85544 0e0bc102
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ import com.android.systemui.util.AlphaTintDrawableWrapper;
import com.android.systemui.util.RoundedCornerProgressDrawable;
import com.android.systemui.util.settings.SecureSettings;
import com.android.systemui.volume.domain.interactor.VolumePanelNavigationInteractor;
import com.android.systemui.volume.panel.shared.flag.VolumePanelFlag;
import com.android.systemui.volume.ui.binder.VolumeDialogMenuIconBinder;
import com.android.systemui.volume.ui.navigation.VolumeNavigator;

@@ -313,6 +314,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
    private final VibratorHelper mVibratorHelper;
    private final com.android.systemui.util.time.SystemClock mSystemClock;
    private final VolumeDialogMenuIconBinder mVolumeDialogMenuIconBinder;
    private final VolumePanelFlag mVolumePanelFlag;

    public VolumeDialogImpl(
            Context context,
@@ -328,6 +330,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
            CsdWarningDialog.Factory csdWarningDialogFactory,
            DevicePostureController devicePostureController,
            Looper looper,
            VolumePanelFlag volumePanelFlag,
            DumpManager dumpManager,
            Lazy<SecureSettings> secureSettings,
            VibratorHelper vibratorHelper,
@@ -366,6 +369,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
        mSecureSettings = secureSettings;
        mVolumeDialogMenuIconBinder = volumeDialogMenuIconBinder;
        mDialogTimeoutMillis = DIALOG_TIMEOUT_MILLIS;
        mVolumePanelFlag = volumePanelFlag;

        dumpManager.registerDumpable("VolumeDialogImpl", this);

@@ -1364,6 +1368,9 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
    }

    private void updateODICaptionsH(boolean isServiceComponentEnabled, boolean fromTooltip) {
        // don't show captions view when the new volume panel is enabled.
        isServiceComponentEnabled =
                isServiceComponentEnabled && !mVolumePanelFlag.canUseNewVolumePanel();
        if (mODICaptionsView != null) {
            mODICaptionsView.setVisibility(isServiceComponentEnabled ? VISIBLE : GONE);
        }
+3 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ import com.android.systemui.volume.VolumeUI;
import com.android.systemui.volume.domain.interactor.VolumePanelNavigationInteractor;
import com.android.systemui.volume.panel.dagger.VolumePanelComponent;
import com.android.systemui.volume.panel.dagger.factory.VolumePanelComponentFactory;
import com.android.systemui.volume.panel.shared.flag.VolumePanelFlag;
import com.android.systemui.volume.ui.binder.VolumeDialogMenuIconBinder;
import com.android.systemui.volume.ui.navigation.VolumeNavigator;

@@ -112,6 +113,7 @@ public interface VolumeModule {
            VolumeNavigator volumeNavigator,
            CsdWarningDialog.Factory csdFactory,
            DevicePostureController devicePostureController,
            VolumePanelFlag volumePanelFlag,
            DumpManager dumpManager,
            Lazy<SecureSettings> secureSettings,
            VibratorHelper vibratorHelper,
@@ -131,6 +133,7 @@ public interface VolumeModule {
                csdFactory,
                devicePostureController,
                Looper.getMainLooper(),
                volumePanelFlag,
                dumpManager,
                secureSettings,
                vibratorHelper,
+4 −1
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ import com.android.systemui.util.settings.FakeSettings;
import com.android.systemui.util.settings.SecureSettings;
import com.android.systemui.util.time.FakeSystemClock;
import com.android.systemui.volume.domain.interactor.VolumePanelNavigationInteractor;
import com.android.systemui.volume.panel.shared.flag.VolumePanelFlag;
import com.android.systemui.volume.ui.binder.VolumeDialogMenuIconBinder;
import com.android.systemui.volume.ui.navigation.VolumeNavigator;

@@ -119,7 +120,6 @@ public class VolumeDialogImplTest extends SysuiTestCase {
    View mDrawerNormal;
    ViewGroup mDialogRowsView;
    CaptionsToggleImageButton mODICaptionsIcon;

    private TestableLooper mTestableLooper;
    private ConfigurationController mConfigurationController;
    private int mOriginalOrientation;
@@ -151,6 +151,8 @@ public class VolumeDialogImplTest extends SysuiTestCase {
    private VolumeNavigator mVolumeNavigator;
    @Mock
    private VolumeDialogMenuIconBinder mVolumeDialogMenuIconBinder;
    @Mock
    private VolumePanelFlag mVolumePanelFlag;

    private final CsdWarningDialog.Factory mCsdWarningDialogFactory =
            new CsdWarningDialog.Factory() {
@@ -211,6 +213,7 @@ public class VolumeDialogImplTest extends SysuiTestCase {
                mCsdWarningDialogFactory,
                mPostureController,
                mTestableLooper.getLooper(),
                mVolumePanelFlag,
                mDumpManager,
                mLazySecureSettings,
                mVibratorHelper,