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

Commit 40221e0d authored by Coco Duan's avatar Coco Duan Committed by Android (Google) Code Review
Browse files

Merge "Reshow glanceable hub after exiting the edit mode" into main

parents 41a1c4af 34c0e692
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ fun CommunalContainer(
) {
    val currentScene: SceneKey by
        viewModel.currentScene
            .transform<CommunalSceneKey, SceneKey> { value -> value.toTransitionSceneKey() }
            .transform { value -> emit(value.toTransitionSceneKey()) }
            .collectAsState(TransitionSceneKey.Blank)
    val sceneTransitionLayoutState = remember { SceneTransitionLayoutState(currentScene) }
    // Don't show hub mode UI if keyguard is present. This is important since we're in the shade,
+9 −2
Original line number Diff line number Diff line
@@ -19,7 +19,9 @@ package com.android.systemui.communal.widgets
import android.appwidget.AppWidgetProviderInfo
import android.content.Intent
import android.os.Bundle
import android.os.RemoteException
import android.util.Log
import android.view.IWindowManager
import androidx.activity.ComponentActivity
import androidx.activity.result.ActivityResultLauncher
import androidx.activity.result.contract.ActivityResultContracts.StartActivityForResult
@@ -34,6 +36,7 @@ class EditWidgetsActivity
constructor(
    private val communalViewModel: CommunalEditModeViewModel,
    private val communalInteractor: CommunalInteractor,
    private var windowManagerService: IWindowManager? = null,
) : ComponentActivity() {
    companion object {
        /**
@@ -77,8 +80,12 @@ constructor(
                )
            },
            onEditDone = {
                // TODO(b/315154364): in a separate change, lock the device and transition to GH
                try {
                    checkNotNull(windowManagerService).lockNow(/* options */ null)
                    finish()
                } catch (e: RemoteException) {
                    Log.e(TAG, "Couldn't lock the device as WindowManager is dead.")
                }
            }
        )
    }