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

Commit 4be34c9a authored by Michael Mikhail's avatar Michael Mikhail Committed by Android (Google) Code Review
Browse files

Revert "Add setting for volume dialog timeout"

Revert submission 24758056-config-to-increase-timeout

Reason for revert: b/302501993

Reverted changes: /q/submissionid:24758056-config-to-increase-timeout

Change-Id: I8d1a14b247dbab087b26b22892a278181bc9a8ed
parent 556691b2
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -11091,12 +11091,6 @@ public final class Settings {
        @Readable
        public static final String BLUETOOTH_ON_WHILE_DRIVING = "bluetooth_on_while_driving";
        /**
         * Volume dialog timeout in ms.
         * @hide
         */
        public static final String VOLUME_DIALOG_DISMISS_TIMEOUT = "volume_dialog_dismiss_timeout";
        /**
         * What behavior should be invoked when the volume hush gesture is triggered
         * One of VOLUME_HUSH_OFF, VOLUME_HUSH_VIBRATE, VOLUME_HUSH_MUTE.
+0 −1
Original line number Diff line number Diff line
@@ -143,7 +143,6 @@ public class SecureSettings {
        Settings.Secure.SCREENSAVER_ACTIVATE_ON_SLEEP,
        Settings.Secure.SCREENSAVER_HOME_CONTROLS_ENABLED,
        Settings.Secure.SHOW_FIRST_CRASH_DIALOG_DEV_OPTION,
        Settings.Secure.VOLUME_DIALOG_DISMISS_TIMEOUT,
        Settings.Secure.VOLUME_HUSH_GESTURE,
        Settings.Secure.MANUAL_RINGER_TOGGLE_COUNT,
        Settings.Secure.LOW_POWER_WARNING_ACKNOWLEDGED,
+0 −1
Original line number Diff line number Diff line
@@ -212,7 +212,6 @@ public class SecureSettingsValidators {
        VALIDATORS.put(Secure.SCREENSAVER_ACTIVATE_ON_SLEEP, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.SCREENSAVER_HOME_CONTROLS_ENABLED, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.SHOW_FIRST_CRASH_DIALOG_DEV_OPTION, BOOLEAN_VALIDATOR);
        VALIDATORS.put(Secure.VOLUME_DIALOG_DISMISS_TIMEOUT, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(Secure.VOLUME_HUSH_GESTURE, NON_NEGATIVE_INTEGER_VALIDATOR);
        VALIDATORS.put(
                Secure.ENABLED_NOTIFICATION_LISTENERS,
+3 −11
Original line number Diff line number Diff line
@@ -135,7 +135,6 @@ import com.android.systemui.statusbar.policy.DevicePostureController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.util.AlphaTintDrawableWrapper;
import com.android.systemui.util.RoundedCornerProgressDrawable;
import com.android.systemui.util.settings.SecureSettings;

import java.io.PrintWriter;
import java.util.ArrayList;
@@ -305,8 +304,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
    private @DevicePostureController.DevicePostureInt int mDevicePosture;
    private int mOrientation;
    private final FeatureFlags mFeatureFlags;
    private final SecureSettings mSecureSettings;
    private int mDialogTimeoutMillis;

    public VolumeDialogImpl(
            Context context,
@@ -323,8 +320,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
            DevicePostureController devicePostureController,
            Looper looper,
            DumpManager dumpManager,
            FeatureFlags featureFlags,
            SecureSettings secureSettings) {
            FeatureFlags featureFlags) {
        mFeatureFlags = featureFlags;
        mContext =
                new ContextThemeWrapper(context, R.style.volume_dialog_theme);
@@ -355,8 +351,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
        mUseBackgroundBlur =
            mContext.getResources().getBoolean(R.bool.config_volumeDialogUseBackgroundBlur);
        mInteractionJankMonitor = interactionJankMonitor;
        mSecureSettings = secureSettings;
        mDialogTimeoutMillis = DIALOG_TIMEOUT_MILLIS;

        dumpManager.registerDumpable("VolumeDialogImpl", this);

@@ -521,8 +515,6 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
        mDialog.setContentView(R.layout.volume_dialog);
        mDialogView = mDialog.findViewById(R.id.volume_dialog);
        mDialogView.setAlpha(0);
        mDialogTimeoutMillis = mSecureSettings.getInt(Settings.Secure.VOLUME_DIALOG_DISMISS_TIMEOUT,
                DIALOG_TIMEOUT_MILLIS);
        mDialog.setCanceledOnTouchOutside(true);
        mDialog.setOnShowListener(dialog -> {
            mDialogView.getViewTreeObserver().addOnComputeInternalInsetsListener(this);
@@ -535,7 +527,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
                    .alpha(1)
                    .translationX(0)
                    .setDuration(mDialogShowAnimationDurationMs)
                    .setListener(getJankListener(getDialogView(), TYPE_SHOW, mDialogTimeoutMillis))
                    .setListener(getJankListener(getDialogView(), TYPE_SHOW, DIALOG_TIMEOUT_MILLIS))
                    .setInterpolator(new SystemUIInterpolators.LogDecelerateInterpolator())
                    .withEndAction(() -> {
                        if (!Prefs.getBoolean(mContext, Prefs.Key.TOUCHED_RINGER_TOGGLE, false)) {
@@ -1522,7 +1514,7 @@ public class VolumeDialogImpl implements VolumeDialog, Dumpable,
                    AccessibilityManager.FLAG_CONTENT_TEXT
                            | AccessibilityManager.FLAG_CONTENT_CONTROLS);
        }
        return mAccessibilityMgr.getRecommendedTimeoutMillis(mDialogTimeoutMillis,
        return mAccessibilityMgr.getRecommendedTimeoutMillis(DIALOG_TIMEOUT_MILLIS,
                AccessibilityManager.FLAG_CONTENT_CONTROLS);
    }

+2 −5
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@ import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.DevicePostureController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import com.android.systemui.util.settings.SecureSettings;
import com.android.systemui.volume.CsdWarningDialog;
import com.android.systemui.volume.VolumeComponent;
import com.android.systemui.volume.VolumeDialogComponent;
@@ -64,8 +63,7 @@ public interface VolumeModule {
            CsdWarningDialog.Factory csdFactory,
            DevicePostureController devicePostureController,
            DumpManager dumpManager,
            FeatureFlags featureFlags,
            SecureSettings secureSettings) {
            FeatureFlags featureFlags) {
        VolumeDialogImpl impl = new VolumeDialogImpl(
                context,
                volumeDialogController,
@@ -81,8 +79,7 @@ public interface VolumeModule {
                devicePostureController,
                Looper.getMainLooper(),
                dumpManager,
                featureFlags,
                secureSettings);
                featureFlags);
        impl.setStreamImportant(AudioManager.STREAM_SYSTEM, false);
        impl.setAutomute(true);
        impl.setSilentMode(false);
Loading