From a53f14d15a2c58c150e320cad7f4ce6ec4dd0e12 Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Tue, 12 Sep 2023 13:00:48 -0700 Subject: [PATCH] Fix wrong insets in phone mode with FLAG_HIDE_NAVBAR_WINDOW on Can't reuse the same insets object for both providedInsets and paramsForRotation. They can override each other. Bug: 274517647 Test: turn on FLAG_HIDE_NAVBAR_WINDOW and ENABLE_TASKBAR_NO_RECREATION. Make sure the insets are correct Change-Id: I8a4ab93e17bf5f4c7949678b087261344cccb1f9 --- .../com/android/launcher3/taskbar/TaskbarInsetsController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt index 12fa17c3e0..eb15cefc1e 100644 --- a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt +++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt @@ -109,7 +109,7 @@ class TaskbarInsetsController(val context: TaskbarActivityContext) : LoggableTas if (!context.isGestureNav) { if (windowLayoutParams.paramsForRotation != null) { for (layoutParams in windowLayoutParams.paramsForRotation) { - layoutParams.providedInsets = windowLayoutParams.providedInsets + layoutParams.providedInsets = getProvidedInsets(insetsRoundedCornerFlag) } } }