diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2018-03-23 22:04:04 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-03-23 22:04:04 +0000 |
commit | 87f9818319fec1227cadd4fe3566409e71386d73 (patch) | |
tree | 9e0db645ad4035001ff15d80411106593c6b3aa7 | |
parent | 69d41b05219d3014cf806d1b79add7fe363a693d (diff) | |
parent | e1a0b347a0719530f53f078da2486774e0770c67 (diff) |
Merge "Added TestApi for default focus highlight" into pi-dev
-rw-r--r-- | api/test-current.txt | 1 | ||||
-rw-r--r-- | core/java/android/view/View.java | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/api/test-current.txt b/api/test-current.txt index dd16771186f1..79de3f6dd22e 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -1066,6 +1066,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 18c3d76e03aa..63f4824097f2 100644 --- a/core/java/android/view/View.java +++ b/core/java/android/view/View.java @@ -27592,6 +27592,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 |