Merge "Skip drawing taskbar background in setup" into udc-dev am: e65bf2a620 am: c037eb916c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/23481079 Change-Id: Ifa93b137b2423a42b9eef7ef4c82ac2c31dd8e83 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -34,6 +34,7 @@ import com.android.launcher3.util.DisplayController
|
|||||||
/** Helps draw the taskbar background, made up of a rectangle plus two inverted rounded corners. */
|
/** Helps draw the taskbar background, made up of a rectangle plus two inverted rounded corners. */
|
||||||
class TaskbarBackgroundRenderer(context: TaskbarActivityContext) {
|
class TaskbarBackgroundRenderer(context: TaskbarActivityContext) {
|
||||||
|
|
||||||
|
private val isInSetup: Boolean = !context.isUserSetupComplete
|
||||||
private val DARK_THEME_SHADOW_ALPHA = 51f
|
private val DARK_THEME_SHADOW_ALPHA = 51f
|
||||||
private val LIGHT_THEME_SHADOW_ALPHA = 25f
|
private val LIGHT_THEME_SHADOW_ALPHA = 25f
|
||||||
|
|
||||||
@@ -137,7 +138,7 @@ class TaskbarBackgroundRenderer(context: TaskbarActivityContext) {
|
|||||||
canvas.translate(0f, leftCornerRadius)
|
canvas.translate(0f, leftCornerRadius)
|
||||||
canvas.translate(canvas.width - rightCornerRadius, -rightCornerRadius)
|
canvas.translate(canvas.width - rightCornerRadius, -rightCornerRadius)
|
||||||
canvas.drawPath(invertedRightCornerPath, paint)
|
canvas.drawPath(invertedRightCornerPath, paint)
|
||||||
} else {
|
} else if (!isInSetup) {
|
||||||
// backgroundHeight is a value from [0...maxBackgroundHeight], so we can use it as a
|
// backgroundHeight is a value from [0...maxBackgroundHeight], so we can use it as a
|
||||||
// proxy to figure out the animation progress of the stash/unstash animation.
|
// proxy to figure out the animation progress of the stash/unstash animation.
|
||||||
val progress = backgroundHeight / maxBackgroundHeight
|
val progress = backgroundHeight / maxBackgroundHeight
|
||||||
|
|||||||
Reference in New Issue
Block a user