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

Commit 26925461 authored by Vlad Popa's avatar Vlad Popa
Browse files

Avoid IllegalStateException by calling next before remove

Test: build
Bug: 341854556
Change-Id: I20522e9f53545e0983d4c3c78390525a3fe081f0
parent 3f0ebe72
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -293,6 +293,7 @@ public class AudioDeviceInventory {
            Iterator<Entry<Pair<Integer, String>, AdiDeviceState>> iterator =
                    mDeviceInventory.entrySet().iterator();
            if (iterator.hasNext()) {
                iterator.next();
                iterator.remove();
            }
        }