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 import com.android.systemui.dagger.SysUISingleton
20 import com.android.systemui.qs.ui.adapter.QSSceneAdapter
21 import com.android.systemui.shade.domain.interactor.ShadeInteractor
22 import javax.inject.Inject
23 
24 @SysUISingleton
25 class QuickSettingsControllerSceneImpl
26 @Inject
27 constructor(
28     private val shadeInteractor: ShadeInteractor,
29     private val qsSceneAdapter: QSSceneAdapter,
30 ) : QuickSettingsController {
31 
32     override val expanded: Boolean
33         get() = shadeInteractor.isQsExpanded.value
34 
35     override val isCustomizing: Boolean
36         get() = qsSceneAdapter.isCustomizerShowing.value
37 
38     @Deprecated("specific to legacy touch handling")
shouldQuickSettingsInterceptnull39     override fun shouldQuickSettingsIntercept(x: Float, y: Float, yDiff: Float): Boolean {
40         throw UnsupportedOperationException()
41     }
42 
closeQsCustomizernull43     override fun closeQsCustomizer() {
44         qsSceneAdapter.requestCloseCustomizer()
45     }
46 
47     @Deprecated("specific to legacy split shade")
closeQsnull48     override fun closeQs() {
49         // Do nothing
50     }
51 
52     @Deprecated("specific to legacy DebugDrawable")
calculateNotificationsTopPaddingnull53     override fun calculateNotificationsTopPadding(
54         isShadeExpanding: Boolean,
55         keyguardNotificationStaticPadding: Int,
56         expandedFraction: Float
57     ): Float {
58         throw UnsupportedOperationException()
59     }
60 
61     @Deprecated("specific to legacy DebugDrawable")
calculatePanelHeightExpandednull62     override fun calculatePanelHeightExpanded(stackScrollerPadding: Int): Int {
63         throw UnsupportedOperationException()
64     }
65 }
66