From 9adff2515decff62fa8cc2232d5ca8d025d0a091 Mon Sep 17 00:00:00 2001 From: Jorge Gil Date: Mon, 20 Mar 2023 18:54:16 +0000 Subject: [PATCH] Hide windowing controls in proto1 caption menu Proto1 is a system wide mode, so entering/exiting desktop mode should be limited to the quick settings tile instead of adding windowing controls to each individual task. Also removes the logic to hide the desktop button in proto1 since that will have no effect now that its parent is the one being hidden. Bug: 272059013 Test: enter desktop mode in proto1 and proto2. Only in proto2 should the windowing controls be visible. Change-Id: Ica47a8ee14089c11e711c67abbcec46e2fb56fa0 --- libs/WindowManager/Shell/res/values/dimen.xml | 1 + .../windowdecor/DesktopModeWindowDecoration.java | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libs/WindowManager/Shell/res/values/dimen.xml b/libs/WindowManager/Shell/res/values/dimen.xml index 680ad5101366b..88ca10d205211 100644 --- a/libs/WindowManager/Shell/res/values/dimen.xml +++ b/libs/WindowManager/Shell/res/values/dimen.xml @@ -365,6 +365,7 @@ 256dp 250dp + 210dp 30dp diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java index 3c0ef965f4f56..dee804bf1e14b 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/windowdecor/DesktopModeWindowDecoration.java @@ -38,6 +38,7 @@ import android.view.MotionEvent; import android.view.SurfaceControl; import android.view.View; import android.view.ViewConfiguration; +import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import android.window.WindowContainerTransaction; @@ -70,6 +71,8 @@ public class DesktopModeWindowDecoration extends WindowDecoration mResult = new WindowDecoration.RelayoutResult<>(); @@ -242,11 +245,9 @@ public class DesktopModeWindowDecoration extends WindowDecoration