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

Commit c116193d authored by Dhina17's avatar Dhina17 Committed by Jan Altensen
Browse files

Revert "Remove Live Captions button from the Volume Dialog when the new Volmue Panel is enabled"

This reverts commit 0e0bc102.

Reason:
* Live caption is now shown in the new volume panel but we don't
  use it so it's not available to the user.
* So bring it back as like 14 on the bottom of the volume
  dialog.

Change-Id: Ia54cccf50c2b9b625d376a0a0165417f0c665184
parent d180fd72
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -148,7 +148,6 @@ import com.android.systemui.util.RoundedCornerProgressDrawable;
import com.android.systemui.util.settings.SecureSettings;
import com.android.systemui.volume.domain.interactor.VolumeDialogInteractor;
import com.android.systemui.volume.domain.interactor.VolumePanelNavigationInteractor;
import com.android.systemui.volume.panel.shared.flag.VolumePanelFlag;
import com.android.systemui.volume.ui.navigation.VolumeNavigator;

import com.google.common.collect.ImmutableList;
@@ -345,7 +344,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
    private int mDialogTimeoutMillis;
    private final VibratorHelper mVibratorHelper;
    private final com.android.systemui.util.time.SystemClock mSystemClock;
    private final VolumePanelFlag mVolumePanelFlag;
    private final VolumeDialogInteractor mInteractor;
    // Optional actions for soundDose
    private Optional<ImmutableList<CsdWarningAction>>
@@ -365,7 +363,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
            CsdWarningDialog.Factory csdWarningDialogFactory,
            DevicePostureController devicePostureController,
            Looper looper,
            VolumePanelFlag volumePanelFlag,
            DumpManager dumpManager,
            Lazy<SecureSettings> secureSettings,
            VibratorHelper vibratorHelper,
@@ -403,7 +400,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
        mVolumeNavigator = volumeNavigator;
        mSecureSettings = secureSettings;
        mDialogTimeoutMillis = DIALOG_TIMEOUT_MILLIS;
        mVolumePanelFlag = volumePanelFlag;
        mInteractor = interactor;

        dumpManager.registerDumpable("VolumeDialogImpl", this);
@@ -1594,9 +1590,6 @@ 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);
        }
+0 −3
Original line number Diff line number Diff line
@@ -44,7 +44,6 @@ import com.android.systemui.volume.domain.interactor.VolumeDialogInteractor;
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.navigation.VolumeNavigator;

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

import com.google.common.collect.ImmutableList;
@@ -124,6 +123,7 @@ public class VolumeDialogImplTest extends SysuiTestCase {
    View mDrawerNormal;
    ViewGroup mDialogRowsView;
    CaptionsToggleImageButton mODICaptionsIcon;

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

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