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

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

Fix thread leak in ImsManagerTest am: fecc78e4 am: fab46412

Change-Id: Ia7316dab04fb2b55afd508093b149c96f0007d39
parents 2fac4909 fab46412
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.