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.ContentScope 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 @Inject constructor() : ComposableLockscreenSceneBlueprint { 36 37 override val id: String = "communal" 38 39 @Composable 40 override fun ContentScope.Content(viewModel: LockscreenContentViewModel, modifier: Modifier) { 41 LockscreenLongPress(viewModel = viewModel.touchHandling, modifier = modifier) { _ -> 42 Box(modifier.background(Color.Black)) { 43 Text( 44 text = "TODO(b/316211368): communal blueprint", 45 color = Color.White, 46 modifier = Modifier.align(Alignment.Center), 47 ) 48 } 49 } 50 } 51 } 52 53 @Module 54 interface CommunalBlueprintModule { blueprintnull55 @Binds @IntoSet fun blueprint(blueprint: CommunalBlueprint): ComposableLockscreenSceneBlueprint 56 } 57