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

Commit 4a973505 authored by mattsziklay's avatar mattsziklay Committed by Matt Sziklay
Browse files

Do not use statusBarInputLayer in bottom stage tasks.

In the bottom task of a vertical splitscreen, the app handle is not
located in status bar bounds, and thus the statusBarInputLayer is not
needed.

Bug: 343561161
Test: Manual, drag and click handle in bottom stage.
Flag: com.android.window.flags.enable_additional_windows_above_status_bar
Change-Id: I0de150aae420d58640f46c739cf4061c10e4ecbb
parent 7f8fb20e
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.view.View.OnClickListener
import android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS
import android.view.WindowManager
import android.widget.ImageButton
import com.android.internal.policy.SystemBarUtils
import com.android.window.flags.Flags
import com.android.wm.shell.R
import com.android.wm.shell.shared.animation.Interpolators
@@ -74,6 +75,9 @@ internal class AppHandleViewHolder(
    ) {
        captionHandle.imageTintList = ColorStateList.valueOf(getCaptionHandleBarColor(taskInfo))
        this.taskInfo = taskInfo
        // If handle is not in status bar region(i.e., bottom stage in vertical split),
        // do not create an input layer
        if (position.y >= SystemBarUtils.getStatusBarHeight(context)) return
        if (!isCaptionVisible && hasStatusBarInputLayer() ) {
            disposeStatusBarInputLayer()
            return
@@ -120,7 +124,7 @@ internal class AppHandleViewHolder(
                inputManager.pilferPointers(v.viewRootImpl.inputToken)
            }
            captionHandle.dispatchTouchEvent(event)
            true
            return@setOnTouchListener true
        }
        windowManagerWrapper.updateViewLayout(view, lp)
    }