Files
Lawnchair/quickstep/src/com/android/quickstep/inputconsumers/NavHandleLongPressHandler.java
T
Andreas Agvard eea784aea8 Adds an flag guarded extension point for long press nav handle behavior
Bug: 282993230
Flag: ENABLE_LONG_PRESS_NAV_HANDLE disabled
Test: Manual

Change-Id: I541886cc13af1db46bc38d4e18556be99bef7713
2023-05-24 16:24:42 +02:00

45 lines
1.4 KiB
Java

/*
* Copyright (C) 2023 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.quickstep.inputconsumers;
import android.content.Context;
import com.android.launcher3.R;
import com.android.launcher3.util.ResourceBasedOverride;
/**
* Class for extending nav handle long press behavior
*/
public class NavHandleLongPressHandler implements ResourceBasedOverride {
/** Creates NavHandleLongPressHandler as specified by overrides */
public static NavHandleLongPressHandler newInstance(Context context) {
return Overrides.getObject(NavHandleLongPressHandler.class, context,
R.string.nav_handle_long_press_handler_class);
}
/**
* Called when nav handle is long pressed.
*
* @return if the long press was consumed, meaning other input consumers should receive a
* cancel event
*/
public boolean onLongPress() {
return false;
}
}