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 18 19 interface QuickSettingsController { 20 /** Returns whether or not QuickSettings is expanded. */ 21 val expanded: Boolean 22 23 /** Returns whether or not QuickSettings is being customized. */ 24 val isCustomizing: Boolean 25 26 /** Returns Whether we should intercept a gesture to open Quick Settings. */ 27 @Deprecated("specific to legacy touch handling") shouldQuickSettingsInterceptnull28 fun shouldQuickSettingsIntercept(x: Float, y: Float, yDiff: Float): Boolean 29 30 /** Closes the Qs customizer. */ 31 fun closeQsCustomizer() 32 33 /** 34 * This method closes QS but in split shade it should be used only in special cases: to make 35 * sure QS closes when shade is closed as well. Otherwise it will result in QS disappearing from 36 * split shade 37 */ 38 @Deprecated("specific to legacy split shade") fun closeQs() 39 40 /** Calculate top padding for notifications */ 41 @Deprecated("specific to legacy DebugDrawable") 42 fun calculateNotificationsTopPadding( 43 isShadeExpanding: Boolean, 44 keyguardNotificationStaticPadding: Int, 45 expandedFraction: Float, 46 ): Float 47 48 /** Calculate height of QS panel */ 49 @Deprecated("specific to legacy DebugDrawable") 50 fun calculatePanelHeightExpanded(stackScrollerPadding: Int): Int 51 } 52