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

Commit 1b51a389 authored by Yuichiro Hanada's avatar Yuichiro Hanada
Browse files

Remove redundant fields

lightColors and darkColors are not needed because it's already
calculated in DecorThemeUtil.
This is a pure clean up and should not change any behavior.

Bug: 395554213
Test: WMShellUnitTest
Flag: EXEMPT small clean up
Change-Id: I825bdbd92d6ce6d092e184a77a81c1f82e47dd49
parent e1d45bfe
Loading
Loading
Loading
Loading
+1 −10
Original line number Diff line number Diff line
@@ -23,12 +23,9 @@ import android.os.Trace
import android.view.Display
import android.view.SurfaceControl
import android.window.TaskConstants
import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.ui.graphics.toArgb
import com.android.wm.shell.RootTaskDisplayAreaOrganizer
import com.android.wm.shell.windowdecor.common.DecorThemeUtil
import com.android.wm.shell.windowdecor.common.Theme

/**
 * Represents the indicator surface that visualizes the current position of a dragged window during
@@ -49,8 +46,6 @@ class MultiDisplayDragMoveIndicatorSurface(
    private var veilSurface: SurfaceControl? = null

    private val decorThemeUtil = DecorThemeUtil(context)
    private val lightColors = dynamicLightColorScheme(context)
    private val darkColors = dynamicDarkColorScheme(context)

    init {
        Trace.beginSection("DragIndicatorSurface#init")
@@ -89,11 +84,7 @@ class MultiDisplayDragMoveIndicatorSurface(
        displayId: Int,
        bounds: Rect,
    ) {
        val backgroundColor =
            when (decorThemeUtil.getAppTheme(taskInfo)) {
                Theme.LIGHT -> lightColors.surfaceContainer
                Theme.DARK -> darkColors.surfaceContainer
            }
        val backgroundColor = decorThemeUtil.getColorScheme(taskInfo).surfaceContainer
        val veil = veilSurface ?: return
        isVisible = true