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

Commit 82e6d810 authored by helen cheuk's avatar helen cheuk
Browse files

[Action Corner] Add action corner flag to DisplayWindowPropertiesRepositoryImpl

Add the flag to avoid crashing of systemUI when action corner flag is
turned on.

Bug: 419439376
Test: Tested that the app did not crash when action corner is enabled
Flag: com.android.systemui.shared.cursor_hot_corner
Change-Id: Ib99f3da6957df15142264cfd84f476c49a057893
parent 2e27b9f5
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import com.android.systemui.dagger.qualifiers.Background
import com.android.systemui.display.shared.model.DisplayWindowProperties
import com.android.systemui.res.R
import com.android.systemui.shade.shared.flag.ShadeWindowGoesAround
import com.android.systemui.shared.Flags.cursorHotCorner
import com.android.systemui.statusbar.core.StatusBarConnectedDisplays
import com.android.systemui.utils.windowmanager.WindowManagerUtils
import com.google.common.collect.HashBasedTable
@@ -63,9 +64,13 @@ constructor(
) : DisplayWindowPropertiesRepository, CoreStartable {

    init {
        check(StatusBarConnectedDisplays.isEnabled || ShadeWindowGoesAround.isEnabled) {
            "This should be instantiated only when wither StatusBarConnectedDisplays or " +
                "ShadeWindowGoesAround are enabled."
        check(
            StatusBarConnectedDisplays.isEnabled ||
                ShadeWindowGoesAround.isEnabled ||
                cursorHotCorner()
        ) {
            "This should be instantiated only when either StatusBarConnectedDisplays or " +
                "ShadeWindowGoesAround or cursorHotCorner are enabled."
        }
    }