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

Commit fd3de1cc authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix issue with edit mode being dismissed immediately" into main

parents 8fd56c62 5a9d75f6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1013,6 +1013,7 @@
            android:autoRemoveFromRecents="true"
            android:launchMode="singleTop"
            android:showForAllUsers="true"
            android:turnScreenOn="true"
            android:exported="false">
        </activity>

+6 −1
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.MaterialTheme
import androidx.compose.ui.Modifier
import androidx.lifecycle.lifecycleScope
import com.android.app.tracing.coroutines.launchTraced as launch
import com.android.compose.theme.PlatformTheme
import com.android.internal.logging.UiEventLogger
import com.android.systemui.Flags.communalEditWidgetsActivityFinishFix
@@ -44,6 +45,7 @@ import com.android.systemui.communal.ui.compose.CommunalHub
import com.android.systemui.communal.ui.view.layout.sections.CommunalAppWidgetSection
import com.android.systemui.communal.ui.viewmodel.CommunalEditModeViewModel
import com.android.systemui.communal.util.WidgetPickerIntentUtils.getWidgetExtraFromIntent
import com.android.systemui.keyguard.domain.interactor.KeyguardInteractor
import com.android.systemui.keyguard.shared.model.KeyguardState
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.core.Logger
@@ -52,13 +54,13 @@ import com.android.systemui.scene.shared.flag.SceneContainerFlag
import com.android.systemui.settings.UserTracker
import javax.inject.Inject
import kotlinx.coroutines.flow.first
import com.android.app.tracing.coroutines.launchTraced as launch

/** An Activity for editing the widgets that appear in hub mode. */
class EditWidgetsActivity
@Inject
constructor(
    private val communalViewModel: CommunalEditModeViewModel,
    private val keyguardInteractor: KeyguardInteractor,
    private var windowManagerService: IWindowManager? = null,
    private val uiEventLogger: UiEventLogger,
    private val widgetConfiguratorFactory: WidgetConfigurationController.Factory,
@@ -223,6 +225,9 @@ constructor(
                    communalViewModel.currentScene.first { it == CommunalScenes.Blank }
                }

                // Wait for dream to exit, if we were previously dreaming.
                keyguardInteractor.isDreaming.first { !it }

                communalViewModel.setEditModeState(EditModeState.SHOWING)

                // Inform the ActivityController that we are now fully visible.