use of com.android.launcher3.search.StringMatcherUtility.StringMatcher in project Neo-Launcher by NeoApplications.
the class DefaultAppSearchAlgorithm method getTitleMatchResult.
private ArrayList<ComponentKey> getTitleMatchResult(String query) {
// Do an intersection of the words in the query and each title, and filter out all the
// apps that don't match all of the words in the query.
final String queryTextLower = query.toLowerCase();
final ArrayList<ComponentKey> result = new ArrayList<>();
StringMatcher matcher = StringMatcher.getInstance();
for (AppInfo info : getApps(mContext, mApps, mBaseFilter)) {
if (matches(info, queryTextLower, matcher)) {
result.add(info.toComponentKey());
}
}
return result;
}
use of com.android.launcher3.search.StringMatcherUtility.StringMatcher in project android_packages_apps_Trebuchet by LineageOS.
the class DefaultAppSearchAlgorithm method getTitleMatchResult.
private ArrayList<ComponentKey> getTitleMatchResult(String query) {
// Do an intersection of the words in the query and each title, and filter out all the
// apps that don't match all of the words in the query.
final String queryTextLower = query.toLowerCase();
final ArrayList<ComponentKey> result = new ArrayList<>();
StringMatcher matcher = StringMatcher.getInstance();
for (AppInfo info : mApps) {
if (matches(info, queryTextLower, matcher)) {
result.add(info.toComponentKey());
}
}
return result;
}
Aggregations