satisfy codacy

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2018-10-18 15:59:00 +02:00
parent b6c528763c
commit 46f916b1a2
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
2 changed files with 6 additions and 2 deletions

View file

@ -227,7 +227,7 @@ public class PreviewTextFragment extends FileFragment implements SearchView.OnQu
mHandler.removeCallbacksAndMessages(null);
if (mOriginalText != null) {
if (getActivity() != null && getActivity() instanceof FileDisplayActivity) {
if (getActivity() instanceof FileDisplayActivity) {
FileDisplayActivity fileDisplayActivity = (FileDisplayActivity) getActivity();
fileDisplayActivity.setSearchQuery(query);
}

View file

@ -29,7 +29,11 @@ import java.util.regex.Pattern;
/**
* Helper class for handling and manipulating strings.
*/
public class StringUtils {
public final class StringUtils {
private StringUtils() {
// prevent class from being constructed
}
public static String searchAndColor(String text, String searchText, @ColorInt int color) {