diff options
author | Xin Li <delphij@google.com> | 2024-03-06 09:30:05 -0800 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2024-03-06 09:30:05 -0800 |
commit | 7e8ae158f4a73ee580c468d71ca9a1df6f90a8cd (patch) | |
tree | bd40604eb4b00a1a0e63edfe28cb0ebe33f23029 /src/com/android/launcher3/util/BackPressHandler.java | |
parent | ded14cc2110e39408f74abac8a83e0a0f16608d2 (diff) | |
parent | 962f362912c24802026be9fe38aa0bb8e7dfa5c6 (diff) | |
download | Launcher3-7e8ae158f4a73ee580c468d71ca9a1df6f90a8cd.tar.gz |
Merge Android 14 QPR2 to AOSP main
Bug: 319669529
Merged-In: Ic9b3be62af2271286292cfaf30bda03351c1aaf6
Change-Id: I2af35abec8a5f2c046192cac6006d9cc759d93c9
Diffstat (limited to 'src/com/android/launcher3/util/BackPressHandler.java')
-rw-r--r-- | src/com/android/launcher3/util/BackPressHandler.java | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/com/android/launcher3/util/BackPressHandler.java b/src/com/android/launcher3/util/BackPressHandler.java new file mode 100644 index 0000000000..b63f648b2d --- /dev/null +++ b/src/com/android/launcher3/util/BackPressHandler.java @@ -0,0 +1,30 @@ +/* + * 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.launcher3.util; + +import android.os.Build; +import android.window.OnBackAnimationCallback; + +import androidx.annotation.RequiresApi; + +/** + * Extension of {@link OnBackAnimationCallback} that allows a check to determine + * if this callback supports handling back or not + */ +@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE) +public interface BackPressHandler extends OnBackAnimationCallback { + boolean canHandleBack(); +} |