Implement type-to-focus in the DirectoryFragment.
Add a helper to the FocusManager, to handle alphanumeric keystrokes.
- Build a search index mapping document titles to adapter positions, and
keep it up-to-date.
- Intercept alphanumeric keystrokes and build up a search string from
them.
- Use the search string and index to set focus in the directory listing.
- Highlight code is written, but not activated in the UI for now, to
minimize surface area for potential breakages. Revisit enabling
highlights for O.
BUG=24988911
Change-Id: I148ff5583c655338d12bc06d6484a9ed7aa528ad
diff --git a/src/com/android/documentsui/dirlist/Model.java b/src/com/android/documentsui/dirlist/Model.java
index 075b3ea..490f94e 100644
--- a/src/com/android/documentsui/dirlist/Model.java
+++ b/src/com/android/documentsui/dirlist/Model.java
@@ -400,6 +400,10 @@
mUpdateListeners.add(listener);
}
+ void removeUpdateListener(UpdateListener listener) {
+ mUpdateListeners.remove(listener);
+ }
+
static interface UpdateListener {
/**
* Called when a successful update has occurred.