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

Commit 96691aa2 authored by Jagrut Desai's avatar Jagrut Desai
Browse files

Stashing Persistent Taskbar Background for ime invocation

Test: Manual
Bug: 308175076
Flag: LEGACY ENABLE_TASKBAR_PINNING DISABLED
Change-Id: Ic1091f6493125b123fdd6210d6904f9b175897ee
parent 24231d99
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.