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

Commit d68feb3f authored by Alan Huang's avatar Alan Huang
Browse files

Refer to FeatureFlagUtils.SETTINGS_VOLUME_PANEL_IN_SYSTEMUI to launch

the VolumePanel in SystemUI or in Settings

Bug: 202262476
Test: manual build and test with the feature flag on/off
Change-Id: I7206fb2afb839f05cc016ece7d29540ace8910ed
parent d6c6f586
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import android.app.KeyguardManager;
import android.content.ContentResolver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
@@ -74,6 +75,7 @@ import android.os.VibrationEffect;
import android.provider.Settings;
import android.provider.Settings.Global;
import android.text.InputFilter;
import android.util.FeatureFlagUtils;
import android.util.Log;
import android.util.Slog;
import android.util.SparseBooleanArray;
@@ -1047,7 +1049,13 @@ public class VolumeDialogImpl implements VolumeDialog,
                Events.writeEvent(Events.EVENT_SETTINGS_CLICK);
                dismissH(DISMISS_REASON_SETTINGS_CLICKED);
                mMediaOutputDialogFactory.dismiss();
                if (FeatureFlagUtils.isEnabled(mContext,
                        FeatureFlagUtils.SETTINGS_VOLUME_PANEL_IN_SYSTEMUI)) {
                    mVolumePanelFactory.create(true /* aboveStatusBar */, null);
                } else {
                    mActivityStarter.startActivity(new Intent(Settings.Panel.ACTION_VOLUME),
                            true /* dismissShade */);
                }
            });
        }
    }