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

Commit 0bacf5d5 authored by Brad Lassey's avatar Brad Lassey Committed by Gerrit Code Review
Browse files

Merge "If the passed in string toShouldAutoTransact is a string represent of a...

Merge "If the passed in string toShouldAutoTransact is a string represent of a pattern filter, check it against the string representation of filter patterns. (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5ad3de7b3e9ad9d2068c20d9bde356f3de40a2b4) Merged-In: I096211b1dff14738e023d1654e24c5967a6ad60a Change-Id: I096211b1dff14738e023d1654e24c5967a6ad60a" into main
parents 533fa597 d53dd531
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -572,8 +572,10 @@ public final class ApduServiceInfo implements Parcelable {
        if (mAutoTransact.getOrDefault(plf.toUpperCase(Locale.ROOT), false)) {
            return true;
        }
        List<Pattern> patternMatches = mAutoTransactPatterns.keySet().stream()
                .filter(p -> p.matcher(plf).matches()).toList();
        boolean isPattern = plf.contains("?") || plf.contains("*");
        List<Pattern> patternMatches = mAutoTransactPatterns.keySet().stream().filter(
            p -> isPattern ? p.toString().equals(plf) : p.matcher(plf).matches()).toList();

        if (patternMatches == null || patternMatches.size() == 0) {
            return false;
        }