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

Commit edb35aa6 authored by Hall Liu's avatar Hall Liu
Browse files

Add method to remove test from tracked loopers

Add method to remove a test from the sLoopers map, since keeping them
around forever results in a memory leak for large test suites.

Bug: 156287358
Test: atest FrameworksTelephonyTests
Change-Id: I553ea3a1dac3ff4107e0c7caabee26d21f4c52f8
Merged-In: I553ea3a1dac3ff4107e0c7caabee26d21f4c52f8
parent 6bf3920e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -222,6 +222,10 @@ public class TestableLooper {
        return sLoopers.get(test);
    }

    public static void remove(Object test) {
        sLoopers.remove(test);
    }

    static class LooperFrameworkMethod extends FrameworkMethod {
        private HandlerThread mHandlerThread;