Split into library project and add shared preferences layer of indirection.

This commit is contained in:
Moxie Marlinspike
2013-07-09 18:26:18 -07:00
parent 2539723410
commit 21eee19380
22 changed files with 277 additions and 87 deletions

View File

@@ -10,9 +10,7 @@ public class Tag {
public static final String WHITESPACE_TAG = " ";
public static boolean isTaggable(Context context, String message) {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
public static boolean isTaggable(String message) {
return message.matches(".*[^\\s].*") &&
message.replaceAll("\\s+$", "").length() + WHITESPACE_TAG.length() <= 158;
}