• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 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.animation
18 
19 import android.content.Context
20 import android.util.AttributeSet
21 import android.widget.FrameLayout
22 
23 /** A [FrameLayout] that also implements [LaunchableView]. */
24 open class LaunchableFrameLayout : FrameLayout, LaunchableView {
25     private val delegate =
26         LaunchableViewDelegate(
27             this,
<lambda>null28             superSetVisibility = { super.setVisibility(it) },
29         )
30 
31     constructor(context: Context) : super(context)
32     constructor(context: Context, attrs: AttributeSet?) : super(context, attrs)
33     constructor(
34         context: Context,
35         attrs: AttributeSet?,
36         defStyleAttr: Int
37     ) : super(context, attrs, defStyleAttr)
38 
39     constructor(
40         context: Context,
41         attrs: AttributeSet?,
42         defStyleAttr: Int,
43         defStyleRes: Int
44     ) : super(context, attrs, defStyleAttr, defStyleRes)
45 
setShouldBlockVisibilityChangesnull46     override fun setShouldBlockVisibilityChanges(block: Boolean) {
47         delegate.setShouldBlockVisibilityChanges(block)
48     }
49 
setVisibilitynull50     override fun setVisibility(visibility: Int) {
51         delegate.setVisibility(visibility)
52     }
53 }
54