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

Commit 6af766ae authored by Franciszek Juras's avatar Franciszek Juras
Browse files

[Flexiglass] Enable closing the shade with back button

Add Back action to shade actions view model.
This enables closing the shade with back button
as in non-flexiglass implementation.

Fixes: 430910634
Test: Back global actions closes the shade
Test: `adb shell input keyevent 4` closes the shade
Flag: com.android.systemui.scene_container
Change-Id: I4d33f66f092e66d943e369ed1d781b990a9e6f06
parent d917e7b4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.shade.ui.viewmodel

import com.android.compose.animation.scene.Back
import com.android.compose.animation.scene.Swipe
import com.android.compose.animation.scene.UserAction
import com.android.compose.animation.scene.UserActionResult
@@ -63,6 +64,7 @@ constructor(
                                ToSplitShade.takeIf { shadeMode is ShadeMode.Split },
                            ),
                        )
                        set(Back, UserActionResult(backScene))
                    }

                    // TODO(b/330200163) Add an else to be able to collapse the shade while