summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Shuming Hao <shuminghao@google.com> 2024-08-13 17:02:46 -0700
committer Shuming Hao <shuminghao@google.com> 2024-08-16 09:46:27 -0700
commitf05fc637d03cb25899733d8d85a8fe1b970ad549 (patch)
tree049cfd6be73db6e1127ca264e7cfb05a9a3f5a81
parent55590219bc6374e7a3316496a055fe281daf68e6 (diff)
Update split handle touch target size
This CL updates split devider handle region specs, which is used to calculate the touch target position and size. The region is set to 48*80, or 80*24 in portrait desktop mode to avoid colliding with the app handle. Bug: 338079912 Test: Manually Flag: EXEMPT bugfix Change-Id: Ibbf653e670ab6e481ed92e21fad775fb3a922d32
-rw-r--r--libs/WindowManager/Shell/res/values/dimen.xml5
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java5
2 files changed, 8 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/res/values/dimen.xml b/libs/WindowManager/Shell/res/values/dimen.xml
index 53ab2d56f6e6..08a746fdf867 100644
--- a/libs/WindowManager/Shell/res/values/dimen.xml
+++ b/libs/WindowManager/Shell/res/values/dimen.xml
@@ -92,8 +92,11 @@
<dimen name="docked_divider_handle_width">16dp</dimen>
<dimen name="docked_divider_handle_height">2dp</dimen>
- <dimen name="split_divider_handle_region_width">96dp</dimen>
+ <dimen name="split_divider_handle_region_width">80dp</dimen>
<dimen name="split_divider_handle_region_height">48dp</dimen>
+ <!-- The divider touch zone height is intentionally halved in portrait to avoid colliding
+ with the app handle.-->
+ <dimen name="desktop_mode_portrait_split_divider_handle_region_height">24dp</dimen>
<!-- Divider handle size for split screen -->
<dimen name="split_divider_handle_width">40dp</dimen>
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java
index 442036ff5781..e7848e27d7ed 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/common/split/DividerView.java
@@ -58,6 +58,7 @@ import com.android.internal.protolog.ProtoLog;
import com.android.wm.shell.R;
import com.android.wm.shell.protolog.ShellProtoLogGroup;
import com.android.wm.shell.shared.animation.Interpolators;
+import com.android.wm.shell.shared.desktopmode.DesktopModeStatus;
/**
* Divider for multi window splits.
@@ -228,7 +229,9 @@ public class DividerView extends FrameLayout implements View.OnTouchListener {
: R.dimen.split_divider_handle_region_width);
mHandleRegionHeight = getResources().getDimensionPixelSize(isLeftRightSplit
? R.dimen.split_divider_handle_region_width
- : R.dimen.split_divider_handle_region_height);
+ : DesktopModeStatus.canEnterDesktopMode(mContext)
+ ? R.dimen.desktop_mode_portrait_split_divider_handle_region_height
+ : R.dimen.split_divider_handle_region_height);
}
void onInsetsChanged(InsetsState insetsState, boolean animate) {