Move a11y indexing from DynamicContentMonitor to loader

This is necessary to kill DynamicContentMonitor later

- Removed all logic related to indexing accesiblitysetting from the
  monitor class and AccessibilitySetting page itself
- Created a loader to search against A11yServices at runtime

I noticed adding a loader in SearchResultsAdapter is rather manual. It's
something we should consider refactor in the future.

Bug: 64310452
Test: robotests
Change-Id: Iff31aff65ce000991229433f294e2ec69af99da2
This commit is contained in:
Fan Zhang
2017-08-02 17:32:43 -07:00
parent 56538f1775
commit 5035f8c559
13 changed files with 375 additions and 213 deletions

View File

@@ -163,8 +163,9 @@ public class InstalledAppResultLoader extends AsyncLoader<Set<? extends SearchRe
* appName: Abcde, query: bc, Returns NAME_NO_MATCH
* appName: Abcde, query: xyz, Returns NAME_NO_MATCH
* appName: Abc de, query: de, Returns 4
* TODO: Move this to a common util class.
*/
private int getWordDifference(String appName, String query) {
static int getWordDifference(String appName, String query) {
if (TextUtils.isEmpty(appName) || TextUtils.isEmpty(query)) {
return NAME_NO_MATCH;
}