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

Commit aa843dc5 authored by Shuming Hao's avatar Shuming Hao
Browse files

Hide app handle split button on external display

Hide the entry point to unblock teamfood until the CUJ is supported on
external display.

Bug: 409136446
Test: manual
Flag: EXEMPT BUG FIX
Change-Id: I951a10b08ac9c0c080ff24fe3d55e3b548e5aa20
parent 206f61e7
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@
            style="@style/DesktopModeHandleMenuWindowingButton"/>

        <Space
            android:id="@+id/split_screen_button_space"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:layout_weight="1"/>
+11 −0
Original line number Diff line number Diff line
@@ -29,6 +29,7 @@ import android.graphics.Point
import android.graphics.PointF
import android.graphics.Rect
import android.os.Bundle
import android.view.Display.DEFAULT_DISPLAY
import android.view.LayoutInflater
import android.view.MotionEvent
import android.view.MotionEvent.ACTION_OUTSIDE
@@ -551,6 +552,9 @@ class HandleMenu(
        private val splitscreenBtn = windowingPill.requireViewById<ImageButton>(
            R.id.split_screen_button
        )
        private val splitscreenBtnSpace = windowingPill.requireViewById<Space>(
            R.id.split_screen_button_space
        )
        private val floatingBtn = windowingPill.requireViewById<ImageButton>(R.id.floating_button)
        private val floatingBtnSpace = windowingPill.requireViewById<Space>(
            R.id.floating_button_space
@@ -822,6 +826,13 @@ class HandleMenu(
                floatingBtnSpace.visibility = View.GONE
            }

            // TODO: b/362720126 - remove this check after entering split screen from handle menu
            //  is supported on external display.
            if (taskInfo.displayId != DEFAULT_DISPLAY) {
                splitscreenBtn.visibility = View.GONE
                splitscreenBtnSpace.visibility = View.GONE
            }

            fullscreenBtn.isSelected = taskInfo.isFullscreen
            fullscreenBtn.isEnabled = !taskInfo.isFullscreen
            fullscreenBtn.imageTintList = style.windowingButtonColor