diff options
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/provider/DSubSearchProvider.java | 3 | ||||
-rw-r--r-- | src/github/daneren2005/dsub/util/Util.java | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/github/daneren2005/dsub/provider/DSubSearchProvider.java b/src/github/daneren2005/dsub/provider/DSubSearchProvider.java index 30490f17..63bbaaa4 100644 --- a/src/github/daneren2005/dsub/provider/DSubSearchProvider.java +++ b/src/github/daneren2005/dsub/provider/DSubSearchProvider.java @@ -24,6 +24,7 @@ import android.content.ContentValues; import android.database.Cursor; import android.database.MatrixCursor; import android.net.Uri; +import android.util.Log; import java.util.ArrayList; import java.util.Collections; @@ -45,6 +46,8 @@ import github.daneren2005.dsub.util.Util; * @author Sindre Mehus */ public class DSubSearchProvider extends ContentProvider { + private static final String TAG = DSubSearchProvider.class.getSimpleName(); + private static final String RESOURCE_PREFIX = "android.resource://github.daneren2005.dsub/"; private static final String[] COLUMNS = {"_id", SearchManager.SUGGEST_COLUMN_TEXT_1, diff --git a/src/github/daneren2005/dsub/util/Util.java b/src/github/daneren2005/dsub/util/Util.java index e9724ded..7b905d11 100644 --- a/src/github/daneren2005/dsub/util/Util.java +++ b/src/github/daneren2005/dsub/util/Util.java @@ -871,6 +871,10 @@ public final class Util { throw new IllegalArgumentException("Strings must not be null"); } + if(t.toString().toLowerCase().indexOf(s.toString().toLowerCase()) != -1) { + return 1; + } + int n = s.length(); int m = t.length(); |