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

Commit ddbe2a11 authored by Sergey Nikolaienkov's avatar Sergey Nikolaienkov Committed by Android (Google) Code Review
Browse files

Merge "Use mAddressMap in cdm getAssociationsByAddress"

parents c586fcb9 1bcc8203
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -213,11 +213,9 @@ class AssociationStoreImpl implements AssociationStore {
            final Set<Integer> ids = mAddressMap.get(address);
            if (ids == null) return Collections.emptyList();

            final List<AssociationInfo> associations = new ArrayList<>();
            for (AssociationInfo association : mIdMap.values()) {
                if (address.equals(association.getDeviceMacAddress())) {
                    associations.add(association);
                }
            final List<AssociationInfo> associations = new ArrayList<>(ids.size());
            for (Integer id : ids) {
                associations.add(mIdMap.get(id));
            }

            return Collections.unmodifiableList(associations);