1 /*
<lambda>null2  * 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.keyguard.ui.composable.blueprint
18 
19 import androidx.compose.foundation.background
20 import androidx.compose.foundation.layout.Box
21 import androidx.compose.material3.Text
22 import androidx.compose.runtime.Composable
23 import androidx.compose.ui.Alignment
24 import androidx.compose.ui.Modifier
25 import androidx.compose.ui.graphics.Color
26 import com.android.compose.animation.scene.SceneScope
27 import com.android.systemui.keyguard.ui.composable.LockscreenLongPress
28 import com.android.systemui.keyguard.ui.viewmodel.LockscreenContentViewModel
29 import dagger.Binds
30 import dagger.Module
31 import dagger.multibindings.IntoSet
32 import javax.inject.Inject
33 
34 /** Renders the lockscreen scene when showing the communal glanceable hub. */
35 class CommunalBlueprint
36 @Inject
37 constructor(
38     private val viewModel: LockscreenContentViewModel,
39 ) : ComposableLockscreenSceneBlueprint {
40 
41     override val id: String = "communal"
42 
43     @Composable
44     override fun SceneScope.Content(modifier: Modifier) {
45         LockscreenLongPress(
46             viewModel = viewModel.longPress,
47             modifier = modifier,
48         ) { _ ->
49             Box(modifier.background(Color.Black)) {
50                 Text(
51                     text = "TODO(b/316211368): communal blueprint",
52                     color = Color.White,
53                     modifier = Modifier.align(Alignment.Center),
54                 )
55             }
56         }
57     }
58 }
59 
60 @Module
61 interface CommunalBlueprintModule {
blueprintnull62     @Binds @IntoSet fun blueprint(blueprint: CommunalBlueprint): ComposableLockscreenSceneBlueprint
63 }
64