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

Commit 06015461 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove systemui from controlling stabilization flag"

parents 472c6e81 b997ee14
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
@@ -20,12 +20,10 @@ import static android.view.WindowManagerPolicyConstants.NAV_BAR_LEFT;
import static android.view.WindowManagerPolicyConstants.NAV_BAR_RIGHT;

import static com.android.systemui.shared.system.NavigationBarCompat.HIT_TARGET_NONE;
import static com.android.systemui.statusbar.phone.NavigationPrototypeController.PROTOTYPE_ENABLED;

import android.annotation.NonNull;
import android.content.Context;
import android.graphics.Canvas;
import android.provider.Settings;
import android.view.MotionEvent;

import com.android.systemui.recents.OverviewProxyService;
@@ -34,10 +32,6 @@ import com.android.systemui.recents.OverviewProxyService;
 * A gesture action that would be triggered and reassigned by {@link QuickStepController}
 */
public abstract class NavigationGestureAction {
    private static final String ENABLE_TASK_STABILIZER_FLAG = "ENABLE_TASK_STABILIZER";

    static private boolean sLastTaskStabilizationFlag;

    protected final NavigationBarView mNavigationBarView;
    protected final OverviewProxyService mProxySender;

@@ -50,9 +44,6 @@ public abstract class NavigationGestureAction {
            @NonNull OverviewProxyService service) {
        mNavigationBarView = navigationBarView;
        mProxySender = service;
        sLastTaskStabilizationFlag = Settings.Global.getInt(
                mNavigationBarView.getContext().getContentResolver(),
                ENABLE_TASK_STABILIZER_FLAG, 0) != 0;
    }

    /**
@@ -82,15 +73,6 @@ public abstract class NavigationGestureAction {
     */
    public void startGesture(MotionEvent event) {
        mIsActive = true;

        // Tell launcher that this action requires a stable task list or not
        boolean flag = requiresStableTaskList();
        if (getGlobalBoolean(PROTOTYPE_ENABLED) && flag != sLastTaskStabilizationFlag) {
            Settings.Global.putInt(mNavigationBarView.getContext().getContentResolver(),
                    ENABLE_TASK_STABILIZER_FLAG, flag ? 1 : 0);
            sLastTaskStabilizationFlag = flag;
        }

        onGestureStart(event);
    }

@@ -163,13 +145,6 @@ public abstract class NavigationGestureAction {
     */
    public abstract boolean isEnabled();

    /**
     * @return action requires a stable task list from launcher
     */
    protected boolean requiresStableTaskList() {
        return false;
    }

    protected void onDarkIntensityChange(float intensity) {
    }

+0 −1
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@ public class NavigationPrototypeController extends ContentObserver {

    private final String GESTURE_MATCH_SETTING = "quickstepcontroller_gesture_match_map";
    public static final String NAV_COLOR_ADAPT_ENABLE_SETTING = "navbar_color_adapt_enable";
    public static final String PROTOTYPE_ENABLED = "prototype_enabled";

    @Retention(RetentionPolicy.SOURCE)
    @IntDef({ACTION_DEFAULT, ACTION_QUICKSTEP, ACTION_QUICKSCRUB, ACTION_BACK,
+0 −4
Original line number Diff line number Diff line
@@ -47,10 +47,6 @@ public class QuickStepAction extends NavigationGestureAction {
        return mNavigationBarView.isQuickStepSwipeUpEnabled();
    }

    protected boolean requiresStableTaskList() {
        return true;
    }

    @Override
    public void onGestureStart(MotionEvent event) {
        try {