(Context context, String[] received)
| 157 | } |
| 158 | |
| 159 | static Boolean isJunk(Context context, String[] received) { |
| 160 | if (received == null || received.length == 0) |
| 161 | return null; |
| 162 | |
| 163 | String host = getFromHost(MimeUtility.unfold(received[received.length - 1])); |
| 164 | if (host == null) |
| 165 | return null; |
| 166 | boolean numeric = host.startsWith("[") && host.endsWith("]"); |
| 167 | if (numeric) |
| 168 | host = host.substring(1, host.length() - 1); |
| 169 | else if (!PatternsCompat.DOMAIN_NAME.matcher(host).matches()) |
| 170 | return null; |
| 171 | |
| 172 | return isJunk(context, host, true, BLOCK_LISTS); |
| 173 | } |
| 174 | |
| 175 | static Boolean isJunk(Context context, List<Address> addresses) { |
| 176 | if (ContactInfo.getLookupUri(addresses) != null) |
no test coverage detected