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

Commit fab46412 authored by Hall Liu's avatar Hall Liu Committed by Automerger Merge Worker
Browse files

Fix thread leak in ImsManagerTest am: fecc78e4

Change-Id: I730bbe5777791ee1a69299f857531e000a190aff
parents eff7d785 fecc78e4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -210,7 +210,8 @@ public class ImsManager implements IFeatureConnector {
        void executeRunnable(Runnable runnable);
    }

    private static class ImsExecutorFactory implements ExecutorFactory {
    @VisibleForTesting
    public static class ImsExecutorFactory implements ExecutorFactory {

        private final HandlerThread mThreadHandler;
        private final Handler mHandler;
@@ -225,6 +226,10 @@ public class ImsManager implements IFeatureConnector {
        public void executeRunnable(Runnable runnable) {
            mHandler.post(runnable);
        }

        public void destroy() {
            mThreadHandler.quit();
        }
    }

    // Replaced with single-threaded executor for testing.