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 { 26 override fun start() {} 27 override fun instantExpandShade() {} 28 override fun instantCollapseShade() {} 29 override fun animateCollapseShade( 30 flags: Int, 31 force: Boolean, 32 delayed: Boolean, 33 speedUpFactor: Float 34 ) {} 35 override fun animateExpandShade() {} 36 override fun animateExpandQs() {} 37 override fun postAnimateCollapseShade() {} 38 override fun postAnimateForceCollapseShade() {} 39 override fun postAnimateExpandQs() {} 40 override fun cancelExpansionAndCollapseShade() {} 41 override fun closeShadeIfOpen(): Boolean { 42 return false 43 } 44 override fun isKeyguard(): Boolean { 45 return false 46 } 47 override fun isShadeFullyOpen(): Boolean { 48 return false 49 } 50 override fun isExpandingOrCollapsing(): Boolean { 51 return false 52 } 53 override fun postOnShadeExpanded(action: Runnable?) {} 54 override fun addPostCollapseAction(action: Runnable?) {} 55 override fun runPostCollapseRunnables() {} 56 override fun collapseShade(): Boolean { 57 return false 58 } 59 override fun collapseShade(animate: Boolean) {} 60 override fun collapseOnMainThread() {} 61 override fun makeExpandedInvisible() {} 62 override fun makeExpandedVisible(force: Boolean) {} 63 override fun isExpandedVisible(): Boolean { 64 return false 65 } 66 override fun onStatusBarTouch(event: MotionEvent?) {} 67 override fun onLaunchAnimationCancelled(isLaunchForActivity: Boolean) {} 68 override fun onLaunchAnimationEnd(launchIsFullScreen: Boolean) {} 69 } 70