From 8957f2ddda08e891475e64552ffa225ca2fccedb Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Wed, 21 Dec 2016 19:22:26 -0800 Subject: Introducing teleportation between sections. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The key combos differ from the ones in the spec because key combos including Meta key don’t get delivered to apps. To fix this, I’ll implement necessary plumbing after the feature freeze. Meanwhile, temporary combos are used. Given that the section and cluster teleportation have a lot in common, I’m not introducing new methods, but adding a param to the cluster teleportation ones. I should have also changed the names to something like findNextKeyboardNavigationCluster => findNextFocusGroup, where “FocusGroup” is a generalized name for clusters and sections. However, that name depends on b/33708251, so I’m not doing it now. I don’t rename existing identifiers, and using “focusGroup” for new ones. Admittedly, this creates mess that will be resolved based on the outcome of the mentioned bug. Bug: 32151632 Test: Manual checks; CTS are coming after feature freeze Change-Id: I01b5d6e5a9689b8f643fa4af695d2ce61265f374 --- core/java/android/view/ViewParent.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/java/android/view/ViewParent.java') diff --git a/core/java/android/view/ViewParent.java b/core/java/android/view/ViewParent.java index 79b05cdb6e50..c5414e925e0e 100644 --- a/core/java/android/view/ViewParent.java +++ b/core/java/android/view/ViewParent.java @@ -18,6 +18,7 @@ package android.view; import android.graphics.Rect; import android.os.Bundle; +import android.view.View.FocusGroupType; import android.view.accessibility.AccessibilityEvent; /** @@ -150,6 +151,7 @@ public interface ViewParent { * Find the nearest keyboard navigation cluster in the specified direction. * This does not actually give focus to that cluster. * + * @param focusGroupType Type of the focus group * @param currentCluster The starting point of the search. Null means the current cluster is not * found yet * @param direction Direction to look @@ -157,7 +159,8 @@ public interface ViewParent { * @return The nearest keyboard navigation cluster in the specified direction, or null if none * can be found */ - View keyboardNavigationClusterSearch(View currentCluster, int direction); + View keyboardNavigationClusterSearch( + @FocusGroupType int focusGroupType, View currentCluster, int direction); /** * Change the z order of the child so it's on top of all other children. -- cgit v1.2.3