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

Commit ed2d0a27 authored by ESWAR MAGATAPALLI (xWF)'s avatar ESWAR MAGATAPALLI (xWF) Committed by Android (Google) Code Review
Browse files

Revert "Use Concurrent Map instead to avoid ConcurrentModificationException...

Revert "Use Concurrent Map instead to avoid ConcurrentModificationException with mAutoTransactPatterns."

This reverts commit 3e2defe1.

Reason for revert: Droidmonitor created revert due to b/429046761. Will be verifying through ABTD before submission.
Bug: 429046761

Change-Id: I5d2180d610c551da73d68b7dc16c7f8703546718
parent 3e2defe1
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -58,9 +58,6 @@ import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TreeMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.regex.Pattern;

/**
@@ -141,7 +138,7 @@ public final class ApduServiceInfo implements Parcelable {

    private final Map<String, Boolean> mAutoTransact;

    private final ConcurrentMap<Pattern, Boolean> mAutoTransactPatterns;
    private final Map<Pattern, Boolean> mAutoTransactPatterns;

    /**
     * Whether this service should only be started when the device is unlocked.
@@ -254,7 +251,7 @@ public final class ApduServiceInfo implements Parcelable {
        this.mStaticAidGroups = new HashMap<String, AidGroup>();
        this.mDynamicAidGroups = new HashMap<String, AidGroup>();
        this.mAutoTransact = autoTransact;
        this.mAutoTransactPatterns = new ConcurrentHashMap<>(autoTransactPatterns);
        this.mAutoTransactPatterns = autoTransactPatterns;
        this.mOffHostName = offHost;
        this.mStaticOffHostName = staticOffHost;
        this.mOnHost = onHost;
@@ -386,8 +383,8 @@ public final class ApduServiceInfo implements Parcelable {
            mStaticAidGroups = new HashMap<String, AidGroup>();
            mDynamicAidGroups = new HashMap<String, AidGroup>();
            mAutoTransact = new HashMap<String, Boolean>();
            mAutoTransactPatterns =
                     new ConcurrentSkipListMap<>(Comparator.comparing(Pattern::toString));
            mAutoTransactPatterns = new TreeMap<Pattern, Boolean>(
                    Comparator.comparing(Pattern::toString));
            mOnHost = onHost;

            final int depth = parser.getDepth();