From a40863be3a54bc1796a54a169a80dc55b61273a9 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Wed, 29 Sep 2021 00:02:39 -0700 Subject: [PATCH] Account for per-edge cutout for system gestures - Currently, the start threshold for all edges is determined by the status bar size in the current orientation. On devices with notches, the device overlays override the status bar height to include the cutout size, which results in a large threshold on all sides which causes touch issues with games (especially now that the game dashboard overlay shows with the bars). Instead, we can use a standard threshold size for all edges and only expand to account for cutouts on each edge respectively. Bug: 195794974 Test: Without cutout, portrait/landscape app use default threshold With cutout, only the edge with the cutout has a non-default threshold Change-Id: Iff7fc98b4fcbb9b78fd5b22bcc07357d7171a9f9 --- core/res/res/values/dimens.xml | 3 + core/res/res/values/symbols.xml | 1 + .../com/android/server/wm/DisplayPolicy.java | 1 + .../SystemGesturesPointerEventListener.java | 71 +++++++++++++------ 4 files changed, 56 insertions(+), 20 deletions(-) diff --git a/core/res/res/values/dimens.xml b/core/res/res/values/dimens.xml index 2baed4359ff64..a666a5b4b7960 100644 --- a/core/res/res/values/dimens.xml +++ b/core/res/res/values/dimens.xml @@ -58,6 +58,9 @@ 12dp + + 24dp