From e6feb7d19842c3fe0c3f45a4ddfdc430fa822ee1 Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Thu, 25 Jul 2019 20:29:07 +0200 Subject: GestureNav: Clarify javadoc in regards to exclusion limits Bug: 124518180 Test: m checkapi Change-Id: I43b0b890a763e339deb246cabf9adbf011eae088 --- core/java/android/view/View.java | 7 +++++++ core/java/android/view/WindowInsets.java | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java index bf6191ec61eb..a8bce62b3b1e 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -10556,6 +10556,13 @@ public class View implements Drawable.Callback, KeyEvent.Callback, * *

Do not modify the provided list after this method is called.

* + *

Note: the system will put a limit of 200dp on the vertical extent of the + * exclusions it takes into account. The limit does not apply while the navigation + * bar is {@link #SYSTEM_UI_FLAG_IMMERSIVE_STICKY stickily} hidden, nor to the + * {@link android.inputmethodservice.InputMethodService input method} and + * {@link Intent#CATEGORY_HOME home activity}. + *

+ * * @param rects A list of precision gesture regions that this view needs to function correctly */ public void setSystemGestureExclusionRects(@NonNull List rects) { diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java index 9340b71a5280..bcc6a552f569 100644 --- a/core/java/android/view/WindowInsets.java +++ b/core/java/android/view/WindowInsets.java @@ -35,6 +35,7 @@ import android.annotation.IntRange; import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.UnsupportedAppUsage; +import android.content.Intent; import android.graphics.Insets; import android.graphics.Rect; import android.util.SparseArray; @@ -644,6 +645,14 @@ public final class WindowInsets { * {@link View#setSystemGestureExclusionRects} outside of the * {@link #getMandatorySystemGestureInsets() mandatory system gesture insets}. * + *

Note: the system will put a limit of 200dp on the vertical extent of the + * exclusions it takes into account. The limit does not apply while the navigation + * bar is {@link View#SYSTEM_UI_FLAG_IMMERSIVE_STICKY stickily} hidden, nor to the + * {@link android.inputmethodservice.InputMethodService input method} and + * {@link Intent#CATEGORY_HOME home activity}. + *

+ * + * *

Simple taps are guaranteed to reach the window even within the system gesture insets, * as long as they are outside the {@link #getTappableElementInsets() system window insets}. * -- cgit v1.2.3-59-g8ed1b