Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 986ba6ac authored by Sherry Zhou's avatar Sherry Zhou Committed by Android (Google) Code Review
Browse files

Merge "Fix smartspace disappears when unfold the device addViews, removeViews...

Merge "Fix smartspace disappears when unfold the device addViews, removeViews will be called after adding SplitshadeSmartspaceSection" into main
parents 72a61686 7c3f81f4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -30,11 +30,11 @@ import com.android.systemui.keyguard.ui.view.layout.sections.DefaultShortcutsSec
import com.android.systemui.keyguard.ui.view.layout.sections.DefaultStatusBarSection
import com.android.systemui.keyguard.ui.view.layout.sections.DefaultStatusViewSection
import com.android.systemui.keyguard.ui.view.layout.sections.KeyguardSectionsModule
import com.android.systemui.keyguard.ui.view.layout.sections.SmartspaceSection
import com.android.systemui.keyguard.ui.view.layout.sections.SplitShadeClockSection
import com.android.systemui.keyguard.ui.view.layout.sections.SplitShadeGuidelines
import com.android.systemui.keyguard.ui.view.layout.sections.SplitShadeMediaSection
import com.android.systemui.keyguard.ui.view.layout.sections.SplitShadeNotificationStackScrollLayoutSection
import com.android.systemui.keyguard.ui.view.layout.sections.SplitShadeSmartspaceSection
import com.android.systemui.util.kotlin.getOrNull
import java.util.Optional
import javax.inject.Inject
@@ -62,7 +62,7 @@ constructor(
    aodNotificationIconsSection: AodNotificationIconsSection,
    aodBurnInSection: AodBurnInSection,
    communalTutorialIndicatorSection: CommunalTutorialIndicatorSection,
    smartspaceSection: SmartspaceSection,
    smartspaceSection: SplitShadeSmartspaceSection,
    clockSection: SplitShadeClockSection,
    mediaSection: SplitShadeMediaSection,
) : KeyguardBlueprint {
+45 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.systemui.keyguard.ui.view.layout.sections

import android.content.Context
import com.android.systemui.keyguard.KeyguardUnlockAnimationController
import com.android.systemui.keyguard.ui.viewmodel.KeyguardClockViewModel
import com.android.systemui.keyguard.ui.viewmodel.KeyguardSmartspaceViewModel
import com.android.systemui.statusbar.lockscreen.LockscreenSmartspaceController
import javax.inject.Inject

/*
 * We need this class for the splitShadeBlueprint so `addViews` and `removeViews` will be called
 * when switching to and from splitShade.
 */
class SplitShadeSmartspaceSection
@Inject
constructor(
    keyguardClockViewModel: KeyguardClockViewModel,
    keyguardSmartspaceViewModel: KeyguardSmartspaceViewModel,
    context: Context,
    smartspaceController: LockscreenSmartspaceController,
    keyguardUnlockAnimationController: KeyguardUnlockAnimationController,
) :
    SmartspaceSection(
        keyguardClockViewModel,
        keyguardSmartspaceViewModel,
        context,
        smartspaceController,
        keyguardUnlockAnimationController,
    )