Provide 0 insets to VoiceInteractionWindow in gesture nav

Test: Invoke assistant on tablet on both geture nav and 3 button mode;
In gesture nav mode: assistant shows at the very bottom of the screen,
layered on top of the taskbar background (in z order)
In 3 button mode: assistant shows right above the taskbar, which only
shows the 3 buttons (no taskbar icons) while assistant is showing
Fixes: 225200928

Change-Id: I2fbc05e696b58e8801e704092aa2741cb57c05c4
diff --git a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
index dc5c22d..48fde8f 100644
--- a/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
+++ b/quickstep/src/com/android/launcher3/taskbar/TaskbarInsetsController.kt
@@ -22,6 +22,7 @@
 import android.view.InsetsState
 import android.view.WindowManager
 import android.view.WindowManager.LayoutParams.TYPE_INPUT_METHOD
+import android.view.WindowManager.LayoutParams.TYPE_VOICE_INTERACTION
 import com.android.launcher3.AbstractFloatingView
 import com.android.launcher3.AbstractFloatingView.TYPE_TASKBAR_ALL_APPS
 import com.android.launcher3.DeviceProfile
@@ -88,11 +89,17 @@
             }
         }
 
-        var imeInsetsSize = Insets.of(0, 0, 0, taskbarHeightForIme)
-        var insetsSizeOverride = arrayOf(
+        val imeInsetsSize = Insets.of(0, 0, 0, taskbarHeightForIme)
+        // Use 0 insets for the VoiceInteractionWindow (assistant) when gesture nav is enabled.
+        val visInsetsSize = Insets.of(0, 0, 0, if (context.isGestureNav) 0 else tappableHeight)
+        val insetsSizeOverride = arrayOf(
             InsetsFrameProvider.InsetsSizeOverride(
                 TYPE_INPUT_METHOD,
                 imeInsetsSize
+            ),
+            InsetsFrameProvider.InsetsSizeOverride(
+                TYPE_VOICE_INTERACTION,
+                visInsetsSize
             )
         )
         for (provider in windowLayoutParams.providedInsets) {
@@ -153,7 +160,8 @@
                     + " insetsSize=" + provider.insetsSize)
             if (provider.insetsSizeOverrides != null) {
                 pw.print(" insetsSizeOverrides={")
-                for (overrideSize in provider.insetsSizeOverrides) {
+                for ((i, overrideSize) in provider.insetsSizeOverrides.withIndex()) {
+                    if (i > 0) pw.print(", ")
                     pw.print(overrideSize)
                 }
                 pw.print("})")