1 /* 2 * Copyright (C) 2023 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 android.view.MotionEvent 20 import com.android.systemui.dagger.SysUISingleton 21 import javax.inject.Inject 22 23 /** Empty implementation of ShadeController for variants of Android without shades. */ 24 @SysUISingleton 25 open class ShadeControllerEmptyImpl @Inject constructor() : ShadeController { isShadeEnablednull26 override fun isShadeEnabled() = false 27 override fun start() {} instantExpandShadenull28 override fun instantExpandShade() {} instantCollapseShadenull29 override fun instantCollapseShade() {} animateCollapseShadenull30 override fun animateCollapseShade( 31 flags: Int, 32 force: Boolean, 33 delayed: Boolean, 34 speedUpFactor: Float 35 ) {} collapseWithDurationnull36 override fun collapseWithDuration(animationDuration: Int) {} animateExpandShadenull37 override fun animateExpandShade() {} animateExpandQsnull38 override fun animateExpandQs() {} postAnimateCollapseShadenull39 override fun postAnimateCollapseShade() {} postAnimateForceCollapseShadenull40 override fun postAnimateForceCollapseShade() {} postAnimateExpandQsnull41 override fun postAnimateExpandQs() {} cancelExpansionAndCollapseShadenull42 override fun cancelExpansionAndCollapseShade() {} closeShadeIfOpennull43 override fun closeShadeIfOpen(): Boolean { 44 return false 45 } isShadeFullyOpennull46 override fun isShadeFullyOpen(): Boolean { 47 return false 48 } isExpandingOrCollapsingnull49 override fun isExpandingOrCollapsing(): Boolean { 50 return false 51 } postOnShadeExpandednull52 override fun postOnShadeExpanded(action: Runnable?) {} addPostCollapseActionnull53 override fun addPostCollapseAction(action: Runnable?) {} collapseShadenull54 override fun collapseShade() {} collapseShadenull55 override fun collapseShade(animate: Boolean) {} collapseOnMainThreadnull56 override fun collapseOnMainThread() {} collapseShadeForActivityStartnull57 override fun collapseShadeForActivityStart() {} makeExpandedInvisiblenull58 override fun makeExpandedInvisible() {} makeExpandedVisiblenull59 override fun makeExpandedVisible(force: Boolean) {} isExpandedVisiblenull60 override fun isExpandedVisible(): Boolean { 61 return false 62 } onStatusBarTouchnull63 override fun onStatusBarTouch(event: MotionEvent?) {} onLaunchAnimationCancellednull64 override fun onLaunchAnimationCancelled(isLaunchForActivity: Boolean) {} onLaunchAnimationEndnull65 override fun onLaunchAnimationEnd(launchIsFullScreen: Boolean) {} performHapticFeedbacknull66 override fun performHapticFeedback(constant: Int) {} 67 } 68