Merge "Remove the navigation swipe down for expanding notifications gesture"
This commit is contained in:
committed by
Android (Google) Code Review
commit
04ab69cb0d
@@ -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:
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user