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

Commit 60b54a94 authored by Rick C's avatar Rick C
Browse files

Quick Settings Pulldown: Left or Right side option (1/2)

Patch set 2 : Fix defaults from upgrading
Patch set 3 : Change percentages

Change-Id: I1f74043865e2670430da7c90ddc8aacc8e5267be
parent eecb674d
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -31,7 +31,8 @@ import com.android.systemui.statusbar.GestureRecorder;

public class NotificationPanelView extends PanelView {

    private static final float STATUS_BAR_SETTINGS_FLIP_PERCENTAGE = 0.3f;
    private static final float STATUS_BAR_SETTINGS_LEFT_PERCENTAGE = 0.8f;
    private static final float STATUS_BAR_SETTINGS_RIGHT_PERCENTAGE = 0.2f;

    private Drawable mHandleBar;
    private float mHandleBarHeight;
@@ -99,9 +100,13 @@ public class NotificationPanelView extends PanelView {
            switch (event.getActionMasked()) {
                case MotionEvent.ACTION_DOWN:
                    mOkToFlip = getExpandedHeight() == 0;
                    if (event.getX(0) > getWidth() * (1.0f - STATUS_BAR_SETTINGS_FLIP_PERCENTAGE) &&
                    if (event.getX(0) > getWidth() * (1.0f - STATUS_BAR_SETTINGS_RIGHT_PERCENTAGE) &&
                            Settings.System.getInt(getContext().getContentResolver(),
                                    Settings.System.QS_QUICK_PULLDOWN, 0) != 0) {
                                    Settings.System.QS_QUICK_PULLDOWN, 0) == 1) {
                        flip = true;
                    } else if (event.getX(0) < getWidth() * (1.0f - STATUS_BAR_SETTINGS_LEFT_PERCENTAGE) &&
                            Settings.System.getInt(getContext().getContentResolver(),
                                    Settings.System.QS_QUICK_PULLDOWN, 0) == 2) {
                        flip = true;
                    }
                    break;