summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Rosky <erosky@google.com>2018-03-22 19:37:50 -0700
committerEvan Rosky <erosky@google.com>2018-03-22 19:37:50 -0700
commite1a0b347a0719530f53f078da2486774e0770c67 (patch)
tree03a7f9253f2eaaeafbc0214547bb9a9a71f13a50
parent4e561f83cbfc1c05955f724db73c72366ad816eb (diff)
Added TestApi for default focus highlight
Bug: 62864111 Test: View_DefaultFocusHighlightTest Change-Id: I2a74de3274351f0a7662715e723c25f4d7f8f6ed
-rw-r--r--api/test-current.txt1
-rw-r--r--core/java/android/view/View.java9
2 files changed, 10 insertions, 0 deletions
diff --git a/api/test-current.txt b/api/test-current.txt
index 31e3e7c242fe..955a572b88ef 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -1056,6 +1056,7 @@ package android.view {
public class View implements android.view.accessibility.AccessibilityEventSource android.graphics.drawable.Drawable.Callback android.view.KeyEvent.Callback {
method public android.view.View getTooltipView();
+ method public static boolean isDefaultFocusHighlightEnabled();
method public boolean isDefaultFocusHighlightNeeded(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
method public boolean restoreFocusInCluster(int);
method public boolean restoreFocusNotInCluster();
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index afff19b0be31..ee160508cb42 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -27570,6 +27570,15 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
}
/**
+ * @return {@code true} if the default focus highlight is enabled, {@code false} otherwies.
+ * @hide
+ */
+ @TestApi
+ public static boolean isDefaultFocusHighlightEnabled() {
+ return sUseDefaultFocusHighlight;
+ }
+
+ /**
* Allows this view to handle {@link KeyEvent}s which weren't handled by normal dispatch. This
* occurs after the normal view hierarchy dispatch, but before the window callback. By default,
* this will dispatch into all the listeners registered via