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

Commit 6bc98141 authored by Matthew Ng's avatar Matthew Ng
Browse files

Remove the navigation swipe down for expanding notifications gesture

Test: manual
Bug: 128949244
Bug: 128937316
Bug: 112934365
Change-Id: I0d32dadbe8944b68282f6a1f81d7e90c76f0b8ee
parent f80f50d9
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -182,7 +182,6 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
    private NavigationBackAction mBackAction;
    private QuickSwitchAction mQuickSwitchAction;
    private NavigationAssistantAction mAssistantAction;
    private NavigationNotificationPanelAction mNotificationPanelAction;

    private NavigationBarEdgePanel mLeftEdgePanel;
    private NavigationBarEdgePanel mRightEdgePanel;
@@ -475,10 +474,6 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
            mAssistantAction = new NavigationAssistantAction(this, mOverviewProxyService,
                    assistManager);
        }
        if (mNotificationPanelAction == null) {
            mNotificationPanelAction = new NavigationNotificationPanelAction(this,
                    mOverviewProxyService, panel);
        }
        if (mGestureHelper instanceof QuickStepController) {
            ((QuickStepController) mGestureHelper).setComponents(this);
            updateNavigationGestures();
@@ -517,8 +512,6 @@ public class NavigationBarView extends FrameLayout implements PluginListener<Nav
                return mQuickSwitchAction;
            case NavigationPrototypeController.ACTION_ASSISTANT:
                return mAssistantAction;
            case NavigationPrototypeController.ACTION_EXPAND_NOTIFICATION:
                return mNotificationPanelAction;
            case NavigationPrototypeController.ACTION_NOTHING:
                return null;
            default:
+0 −50
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.systemui.statusbar.phone;

import android.annotation.NonNull;
import android.view.MotionEvent;

import com.android.systemui.recents.OverviewProxyService;

/**
 * Triggers notification panel to be expanded when executed
 */
public class NavigationNotificationPanelAction extends NavigationGestureAction {
    private final NotificationPanelView mPanelView;

    public NavigationNotificationPanelAction(@NonNull NavigationBarView navigationBarView,
            @NonNull OverviewProxyService service, @NonNull NotificationPanelView panelView) {
        super(navigationBarView, service);
        mPanelView = panelView;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }

    @Override
    public boolean disableProxyEvents() {
        return true;
    }

    @Override
    public void onGestureStart(MotionEvent event) {
        mPanelView.expand(true);
    }
}
+1 −2
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ public class NavigationPrototypeController extends ContentObserver {

    @Retention(RetentionPolicy.SOURCE)
    @IntDef({ACTION_DEFAULT, ACTION_QUICKSTEP, ACTION_QUICKSCRUB, ACTION_BACK,
            ACTION_QUICKSWITCH, ACTION_NOTHING, ACTION_ASSISTANT, ACTION_EXPAND_NOTIFICATION})
            ACTION_QUICKSWITCH, ACTION_NOTHING, ACTION_ASSISTANT})
    @interface GestureAction {}
    static final int ACTION_DEFAULT = 0;
    static final int ACTION_QUICKSTEP = 1;
@@ -56,7 +56,6 @@ public class NavigationPrototypeController extends ContentObserver {
    static final int ACTION_QUICKSWITCH = 4;
    static final int ACTION_NOTHING = 5;
    static final int ACTION_ASSISTANT = 6;
    static final int ACTION_EXPAND_NOTIFICATION = 7;

    private OnPrototypeChangedListener mListener;