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

Commit 8fb06b9b authored by Maryam Dehaini's avatar Maryam Dehaini Committed by Android (Google) Code Review
Browse files

Merge "Add config to remove status bar input layer" into main

parents 2eb4cdbe 38a50749
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -191,4 +191,9 @@
    <string-array name="desktop_windowing_app_handle_education_allowlist_apps"></string-array>
    <!-- Apps that can trigger Desktop Windowing App-To-Web Education -->
    <string-array name="desktop_windowing_app_to_web_education_allowlist_apps"></string-array>

    <!-- Whether the status bar input layer should be removed.
         TODO: b/444730302 - remove config once status bar input layer can be removed for all
          devices. -->
    <bool name="config_removeStatusBarInputLayer">true</bool>
</resources>
+7 −3
Original line number Diff line number Diff line
@@ -100,12 +100,16 @@ class AppHandleViewHolder(
    // above the status bar. The purpose of this View is to receive input intended for
    // captionHandle.
    private var statusBarInputLayer: AdditionalSystemViewContainer? = null
    // TODO: b/444730302 - remove config once status bar input layer can be removed for all devices
    private val shouldAddStatusBarInputLayer =
        !DesktopExperienceFlags.ENABLE_REMOVE_STATUS_BAR_INPUT_LAYER.isTrue ||
            !context.resources.getBoolean(R.bool.config_removeStatusBarInputLayer)

    init {
        captionView.setOnTouchListener(onCaptionTouchListener)
        captionHandle.setOnTouchListener(onCaptionTouchListener)
        captionHandle.setOnClickListener(onCaptionButtonClickListener)
        if (DesktopExperienceFlags.ENABLE_REMOVE_STATUS_BAR_INPUT_LAYER.isTrue) {
        if (!shouldAddStatusBarInputLayer) {
            ViewCompat.replaceAccessibilityAction(
                captionHandle,
                AccessibilityActionCompat.ACTION_CLICK,
@@ -158,7 +162,7 @@ class AppHandleViewHolder(
        }
        this.taskInfo = taskInfo
        if (
            DesktopExperienceFlags.ENABLE_REMOVE_STATUS_BAR_INPUT_LAYER.isTrue &&
            !shouldAddStatusBarInputLayer &&
                DesktopExperienceFlags.ENABLE_APP_HANDLE_POSITION_REPORTING.isTrue
        ) {
            return
@@ -297,7 +301,7 @@ class AppHandleViewHolder(
    fun disposeStatusBarInputLayer() {
        if (
            !statusBarInputLayerExists ||
                (DesktopExperienceFlags.ENABLE_REMOVE_STATUS_BAR_INPUT_LAYER.isTrue &&
                (!shouldAddStatusBarInputLayer &&
                    DesktopExperienceFlags.ENABLE_APP_HANDLE_POSITION_REPORTING.isTrue)
        ) {
            return