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

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

Fix thread leak in ImsManagerTest am: ed3eccfa

Change-Id: I89ac83c93f98866b6f7433a754c608144cb6af12
parents 4ee4d860 ed3eccfa
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.