Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b674d635 authored by Isaac_Chen's avatar Isaac_Chen
Browse files

Make up for the missing condition judgment in last commit

parent be2c17d2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -216,6 +216,9 @@ public abstract class SearchableBaseNoteFragment extends BaseNoteFragment {
    }

    private static int countOccurrences(String haystack, String needle) {
        if (haystack == null || haystack.isEmpty() || needle == null || needle.isEmpty()) {
            return 0;
        }
        Matcher m = Pattern.compile(needle, Pattern.CASE_INSENSITIVE | Pattern.LITERAL)
                .matcher(haystack);