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

Commit c45957f1 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Add FeatureFlag to override notificatin drag

Test: manual
Change-Id: I86d00a4fd9ee839cf0601b0ca5f47e5cdfa0fc98
parent 9a50b528
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -49,6 +49,8 @@ public class Flags {
    public static final BooleanFlag NOTIFICATION_PIPELINE_DEVELOPER_LOGGING =
            new BooleanFlag(103, false);

    public static final ResourceBooleanFlag NOTIFICATION_SHADE_DRAG =
            new ResourceBooleanFlag(104, R.bool.config_enableNotificationShadeDrag);

    /***************************************/
    // 200 - keyguard/lockscreen
+1 −0
Original line number Diff line number Diff line
@@ -780,6 +780,7 @@ public class NotificationPanelViewController extends PanelViewController {
            InteractionJankMonitor interactionJankMonitor,
            QsFrameTranslateController qsFrameTranslateController) {
        super(view,
                featureFlags,
                falsingManager,
                dozeLog,
                keyguardStateController,
+4 −2
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@ import com.android.systemui.R;
import com.android.systemui.animation.Interpolators;
import com.android.systemui.classifier.Classifier;
import com.android.systemui.doze.DozeLog;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.Flags;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.statusbar.StatusBarState;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
@@ -212,6 +214,7 @@ public abstract class PanelViewController {

    public PanelViewController(
            PanelView view,
            FeatureFlags featureFlags,
            FalsingManager falsingManager,
            DozeLog dozeLog,
            KeyguardStateController keyguardStateController,
@@ -270,8 +273,7 @@ public abstract class PanelViewController {
        mBounceInterpolator = new BounceInterpolator();
        mFalsingManager = falsingManager;
        mDozeLog = dozeLog;
        mNotificationsDragEnabled = mResources.getBoolean(
                R.bool.config_enableNotificationShadeDrag);
        mNotificationsDragEnabled = featureFlags.isEnabled(Flags.NOTIFICATION_SHADE_DRAG);
        mVibratorHelper = vibratorHelper;
        mVibrateOnOpening = mResources.getBoolean(R.bool.config_vibrateOnIconAnimation);
        mStatusBarTouchableRegionManager = statusBarTouchableRegionManager;
+2 −1
Original line number Diff line number Diff line
@@ -99,6 +99,7 @@ import com.android.systemui.controls.dagger.ControlsComponent;
import com.android.systemui.doze.DozeLog;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.flags.FeatureFlags;
import com.android.systemui.flags.Flags;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.fragments.FragmentService;
import com.android.systemui.idle.IdleHostViewController;
@@ -382,7 +383,7 @@ public class NotificationPanelViewControllerTest extends SysuiTestCase {
        mConfiguration.orientation = ORIENTATION_PORTRAIT;
        when(mResources.getDisplayMetrics()).thenReturn(mDisplayMetrics);
        mDisplayMetrics.density = 100;
        when(mResources.getBoolean(R.bool.config_enableNotificationShadeDrag)).thenReturn(true);
        when(mFeatureFlags.isEnabled(Flags.NOTIFICATION_SHADE_DRAG)).thenReturn(true);
        when(mResources.getDimensionPixelSize(R.dimen.notifications_top_padding_split_shade))
                .thenReturn(NOTIFICATION_SCRIM_TOP_PADDING_IN_SPLIT_SHADE);
        when(mResources.getDimensionPixelSize(R.dimen.qs_panel_width)).thenReturn(400);