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

Commit 949a52ef authored by Winson Chung's avatar Winson Chung
Browse files

Skip dumping surface control if it's already removed

Bug: 304313397
Test: atest SurfaceControlRegistryTests
Change-Id: I2454188ab23e01651b4b2272360b04e2faad9acd
parent f71a4db7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -78,6 +78,11 @@ public class SurfaceControlRegistry {
            for (int i = 0; i < size; i++) {
                final Map.Entry<SurfaceControl, Long> entry = entries.get(i);
                final SurfaceControl sc = entry.getKey();
                if (sc == null) {
                    // Just skip if the key has since been removed from the weak hash map
                    continue;
                }

                final long timeRegistered = entry.getValue();
                pw.print("  ");
                pw.print(sc.getName());