From 6830bbd35bffc05c994aea2ea2b5c644441c06d6 Mon Sep 17 00:00:00 2001 From: Robert Horvath Date: Wed, 16 Feb 2022 15:30:15 +0100 Subject: [PATCH] Expose getPreferKeepClearForFocusDelay as TestApi This allows tests to check the behavior of automatically reporting the focused View as a keep clear area. Test: atest KeepClearRectsTests Bug: 218494300 Change-Id: I602406572a540c4b5f77164efab28376faec2701 --- core/api/test-current.txt | 1 + core/java/android/view/ViewConfiguration.java | 1 + 2 files changed, 2 insertions(+) diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 1b627b2adfc9d..e221196be6eba 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -2876,6 +2876,7 @@ package android.view { method public static int getHoverTooltipHideTimeout(); method public static int getHoverTooltipShowTimeout(); method public static int getLongPressTooltipHideTimeout(); + method public int getPreferKeepClearForFocusDelay(); } public class ViewDebug { diff --git a/core/java/android/view/ViewConfiguration.java b/core/java/android/view/ViewConfiguration.java index 5775944b4e97f..ebc409e470e90 100644 --- a/core/java/android/view/ViewConfiguration.java +++ b/core/java/android/view/ViewConfiguration.java @@ -1104,6 +1104,7 @@ public class ViewConfiguration { * clear, or -1 if Views should not set themselves as preferred to keep clear. * @hide */ + @TestApi public int getPreferKeepClearForFocusDelay() { return mPreferKeepClearForFocusDelay; }