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

Commit f5677d69 authored by Jagrut Desai's avatar Jagrut Desai Committed by Android (Google) Code Review
Browse files

Merge "Stashing Persistent Taskbar Background for ime invocation" into main

parents e8840348 96691aa2
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ import com.android.launcher3.icons.GraphicsUtils.setColorAlphaBound
import com.android.launcher3.taskbar.TaskbarPinningController.Companion.PINNING_PERSISTENT
import com.android.launcher3.taskbar.TaskbarPinningController.Companion.PINNING_TRANSIENT
import com.android.launcher3.util.DisplayController
import kotlin.math.min

/** Helps draw the taskbar background, made up of a rectangle plus two inverted rounded corners. */
class TaskbarBackgroundRenderer(private val context: TaskbarActivityContext) {
@@ -153,9 +154,10 @@ class TaskbarBackgroundRenderer(private val context: TaskbarActivityContext) {
            // Draw the background behind taskbar content.
            canvas.drawRect(0f, 0f, canvas.width.toFloat(), persistentTaskbarHeight, paint)
        } else {
            canvas.translate(0f, canvas.height - maxPersistentTaskbarHeight)
            val persistentTaskbarHeight = min(maxPersistentTaskbarHeight, backgroundHeight)
            canvas.translate(0f, canvas.height - persistentTaskbarHeight)
            // Draw the background behind taskbar content.
            canvas.drawRect(0f, 0f, canvas.width.toFloat(), maxPersistentTaskbarHeight, paint)
            canvas.drawRect(0f, 0f, canvas.width.toFloat(), persistentTaskbarHeight, paint)
        }

        // Draw the inverted rounded corners above the taskbar.