@@ -0,0 +1,950 @@
+package com.aviras.mrassistant.ui.utils;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0A/**%0A * FTS util will create list of all possible searches for given search string. Since Realm does not%0A * support FTS natively, this is my hack to support it.%0A * %3Cp/%3E%0A * Created by ashish on 15/6/16.%0A */%0Apublic class FtsUtil %7B%0A%0A    private static final int MIN_QUERY_LENGTH = 1;%0A%0A    public static List%3CCharSequence%3E getAllPossibleSearchStrings(CharSequence searchString) %7B%0A        List%3CCharSequence%3E ftsList = new ArrayList%3C%3E();%0A        if (null != searchString && searchString.length() %3E= MIN_QUERY_LENGTH) %7B%0A            int strLength = searchString.length();%0A            if (1 == strLength) %7B%0A                ftsList.add(searchString.subSequence(0, 1));%0A            %7D%0A            for (int index = 2; index %3C= strLength; index++) %7B%0A                ftsList.add(searchString.subSequence(0, index));%0A            %7D%0A        %7D%0A        return ftsList;%0A    %7D%0A%7D%0A

Add FtsUtils