do not auto link non-http URLs

This commit is contained in:
Daniel Gultsch 2017-02-09 20:14:36 +01:00
parent c76b073b8e
commit 55e9067b27
1 changed files with 2 additions and 2 deletions

View File

@ -92,8 +92,8 @@ public class MessageAdapter extends ArrayAdapter<Message> implements CopyTextVie
}; };
private static final Linkify.MatchFilter WEBURL_MATCH_FILTER = new Linkify.MatchFilter() { private static final Linkify.MatchFilter WEBURL_MATCH_FILTER = new Linkify.MatchFilter() {
@Override @Override
public boolean acceptMatch(CharSequence charSequence, int start, int end) { public boolean acceptMatch(CharSequence cs, int start, int end) {
return start < 1 || charSequence.charAt(start-1) != '@'; return start < 1 || (cs.charAt(start-1) != '@' && !cs.subSequence(Math.max(0,start - 3),start).equals("://"));
} }
}; };