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 18 package com.android.systemui.keyguard.ui.view.layout.blueprints 19 20 import com.android.systemui.communal.ui.view.layout.sections.CommunalTutorialIndicatorSection 21 import com.android.systemui.dagger.SysUISingleton 22 import com.android.systemui.keyguard.shared.model.KeyguardBlueprint 23 import com.android.systemui.keyguard.shared.model.KeyguardSection 24 import com.android.systemui.keyguard.ui.view.layout.sections.AccessibilityActionsSection 25 import com.android.systemui.keyguard.ui.view.layout.sections.AodBurnInSection 26 import com.android.systemui.keyguard.ui.view.layout.sections.AodNotificationIconsSection 27 import com.android.systemui.keyguard.ui.view.layout.sections.ClockSection 28 import com.android.systemui.keyguard.ui.view.layout.sections.DefaultDeviceEntrySection 29 import com.android.systemui.keyguard.ui.view.layout.sections.DefaultIndicationAreaSection 30 import com.android.systemui.keyguard.ui.view.layout.sections.DefaultSettingsPopupMenuSection 31 import com.android.systemui.keyguard.ui.view.layout.sections.DefaultShortcutsSection 32 import com.android.systemui.keyguard.ui.view.layout.sections.DefaultStatusBarSection 33 import com.android.systemui.keyguard.ui.view.layout.sections.DefaultStatusViewSection 34 import com.android.systemui.keyguard.ui.view.layout.sections.KeyguardSectionsModule 35 import com.android.systemui.keyguard.ui.view.layout.sections.SmartspaceSection 36 import com.android.systemui.keyguard.ui.view.layout.sections.SplitShadeGuidelines 37 import com.android.systemui.keyguard.ui.view.layout.sections.SplitShadeMediaSection 38 import com.android.systemui.keyguard.ui.view.layout.sections.SplitShadeNotificationStackScrollLayoutSection 39 import com.android.systemui.util.kotlin.getOrNull 40 import java.util.Optional 41 import javax.inject.Inject 42 import javax.inject.Named 43 44 /** 45 * Split-shade layout, mostly used for larger devices like foldables and tablets when in landscape 46 * orientation. 47 */ 48 @SysUISingleton 49 @JvmSuppressWildcards 50 class SplitShadeKeyguardBlueprint 51 @Inject 52 constructor( 53 accessibilityActionsSection: AccessibilityActionsSection, 54 defaultIndicationAreaSection: DefaultIndicationAreaSection, 55 defaultDeviceEntrySection: DefaultDeviceEntrySection, 56 defaultShortcutsSection: DefaultShortcutsSection, 57 @Named(KeyguardSectionsModule.KEYGUARD_AMBIENT_INDICATION_AREA_SECTION) 58 defaultAmbientIndicationAreaSection: Optional<KeyguardSection>, 59 defaultSettingsPopupMenuSection: DefaultSettingsPopupMenuSection, 60 defaultStatusViewSection: DefaultStatusViewSection, 61 defaultStatusBarSection: DefaultStatusBarSection, 62 splitShadeNotificationStackScrollLayoutSection: SplitShadeNotificationStackScrollLayoutSection, 63 splitShadeGuidelines: SplitShadeGuidelines, 64 aodNotificationIconsSection: AodNotificationIconsSection, 65 aodBurnInSection: AodBurnInSection, 66 communalTutorialIndicatorSection: CommunalTutorialIndicatorSection, 67 clockSection: ClockSection, 68 smartspaceSection: SmartspaceSection, 69 mediaSection: SplitShadeMediaSection, 70 ) : KeyguardBlueprint { 71 override val id: String = ID 72 73 override val sections = 74 listOfNotNull( 75 accessibilityActionsSection, 76 defaultIndicationAreaSection, 77 defaultShortcutsSection, 78 defaultAmbientIndicationAreaSection.getOrNull(), 79 defaultSettingsPopupMenuSection, 80 defaultStatusViewSection, 81 defaultStatusBarSection, 82 splitShadeNotificationStackScrollLayoutSection, 83 splitShadeGuidelines, 84 aodNotificationIconsSection, 85 smartspaceSection, 86 aodBurnInSection, 87 communalTutorialIndicatorSection, 88 clockSection, 89 mediaSection, 90 defaultDeviceEntrySection, // Add LAST: Intentionally has z-order above other views. 91 ) 92 93 companion object { 94 const val ID = "split-shade" 95 } 96 } 97