aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/github/daneren2005/dsub/provider/DSubSearchProvider.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/provider/DSubSearchProvider.java b/app/src/main/java/github/daneren2005/dsub/provider/DSubSearchProvider.java
index f91c364e..ba8c80c1 100644
--- a/app/src/main/java/github/daneren2005/dsub/provider/DSubSearchProvider.java
+++ b/app/src/main/java/github/daneren2005/dsub/provider/DSubSearchProvider.java
@@ -58,6 +58,10 @@ public class DSubSearchProvider extends ContentProvider {
@Override
public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
+ if(selectionArgs[0].isEmpty()) {
+ return null;
+ }
+
String query = selectionArgs[0] + "*";
SearchResult searchResult = search(query);
return createCursor(selectionArgs[0], searchResult);