From 8cdf650e22e44cceb0543d00053909a55575d90a Mon Sep 17 00:00:00 2001 From: mattsziklay Date: Mon, 28 Oct 2024 23:07:21 -0700 Subject: Set input layers to GONE rather than INVISIBLE. Input layers should not be present at all before a single task has been opened. Bug: 375704692 Test: Manual Flag: com.android.window.flags.enable_handle_input_fix Change-Id: I3993511af7bdb351c87d986cc7bc2a6b6a5b6c41 --- .../android/wm/shell/windowdecor/DesktopStatusBarInputLayerSupplier.kt | 2 +- .../com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopStatusBarInputLayerSupplier.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopStatusBarInputLayerSupplier.kt index 025bb403ec8b..9c5215d1249c 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopStatusBarInputLayerSupplier.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopStatusBarInputLayerSupplier.kt @@ -66,7 +66,7 @@ class DesktopStatusBarInputLayerSupplier( lp.inputFeatures = WindowManager.LayoutParams.INPUT_FEATURE_SPY lp.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE val view = View(context) - view.visibility = View.INVISIBLE + view.visibility = View.GONE return AdditionalSystemViewContainer( WindowManagerWrapper( context.getSystemService(WindowManager::class.java) diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt index b43a9839f042..c4e49466343e 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/viewholder/AppHandleViewHolder.kt @@ -131,7 +131,7 @@ internal class AppHandleViewHolder( } // Remove the old input layer when changing to a new one. if (statusBarInputLayer != null) detachStatusBarInputLayer() - if (statusBarLayer.view.visibility == View.INVISIBLE) { + if (statusBarLayer.view.visibility == View.GONE) { statusBarLayer.view.visibility = View.VISIBLE } statusBarInputLayer = statusBarLayer -- cgit v1.2.3-59-g8ed1b