1 /* 2 * Copyright (C) 2024 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.systemui.shade.domain.interactor 18 19 /** Allows the back action to interact with the shade. */ 20 interface ShadeBackActionInteractor { 21 /** 22 * Animate QS collapse by flinging it. If QS is expanded, it will collapse into QQS and stop. If 23 * in split shade, it will collapse the whole shade. 24 * 25 * @param fullyCollapse Do not stop when QS becomes QQS. Fling until QS isn't visible anymore. 26 */ animateCollapseQsnull27 fun animateCollapseQs(fullyCollapse: Boolean) 28 29 /** Returns whether the shade can be collapsed. */ 30 fun canBeCollapsed(): Boolean 31 32 /** 33 * Close the keyguard user switcher if it is open and capable of closing. 34 * 35 * Has no effect if user switcher isn't supported, if the user switcher is already closed, or if 36 * the user switcher uses "simple" mode. The simple user switcher cannot be closed. 37 * 38 * @return true if the keyguard user switcher was open, and is now closed 39 */ 40 @Deprecated("Only supported by very old devices that will not adopt scenes.") 41 fun closeUserSwitcherIfOpen(): Boolean 42 43 /** Called when Back gesture has been committed (i.e. a back event has definitely occurred) */ 44 fun onBackPressed() 45 46 /** Sets progress of the predictive back animation. */ 47 @Deprecated("According to b/318376223, shade predictive back is not be supported.") 48 fun onBackProgressed(progressFraction: Float) 49 } 50