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

Commit 4b34bf54 authored by Brad Ebinger's avatar Brad Ebinger
Browse files

Modify Tests to make SessionManager final for tests

Flag: com.android.internal.telephony.flags.ims_resolver_user_aware
Bug: 375088362
Test: atest TelecomUnitTests
Change-Id: I6fec2271df8fe9e127a93d3cf478299946a70527
parent 1b0670b2
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -61,13 +61,11 @@ public class SessionManagerTest extends TelecomTestCase {
    @Before
    public void setUp() throws Exception {
        super.setUp();
        mTestSessionManager = new SessionManager();
        mTestSessionManager = new SessionManager(null);
        mTestSessionManager.registerSessionListener(((sessionName, timeMs) -> {
            mfullSessionCompleteTime = timeMs;
            mFullSessionMethodName = sessionName;
        }));
        // Remove automatic stale session cleanup for testing
        mTestSessionManager.mCleanStaleSessions = null;
    }

    @Override
+2 −2
Original line number Diff line number Diff line
@@ -51,8 +51,8 @@ public abstract class TelecomTestCase {

        mComponentContextFixture = new ComponentContextFixture(mFeatureFlags);
        mContext = mComponentContextFixture.getTestDouble().getApplicationContext();
        Log.setSessionContext(mComponentContextFixture.getTestDouble().getApplicationContext());
        Log.getSessionManager().mCleanStaleSessions = null;
        Log.setSessionManager(mComponentContextFixture.getTestDouble().getApplicationContext(),
                null);
    }

    public void tearDown() throws Exception {