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

Commit 9848cbfd authored by Jack Yu's avatar Jack Yu Committed by android-build-merger
Browse files

Fixed file descriptor leak in telephony unit tests

am: ae6e8f99

Change-Id: Ice665b510922057b5940b08504c578b14d3587ab
parents 6f1f1d19 ae6e8f99
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -151,6 +151,12 @@ public class SimulatedCommands extends BaseCommands
        mPin2Code = DEFAULT_SIM_PIN2_CODE;
    }

    public void dispose() {
        if (mHandlerThread != null) {
            mHandlerThread.quit();
        }
    }

    private void log(String str) {
        Rlog.d(LOG_TAG, str);
    }
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ public class CallManagerTest extends TelephonyTest {
    @After
    public void tearDown() throws Exception {
        CallManager.getInstance().unregisterPhone(mPhone);
        mCallManagerHandlerThread.quitSafely();
        mCallManagerHandlerThread.quit();
        super.tearDown();
    }

+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public class DeviceStateMonitorTest extends TelephonyTest {
    @After
    public void tearDown() throws Exception {
        mDeviceStateMonitor = null;
        mDeviceStateMonitorTestHandler.quitSafely();
        mDeviceStateMonitorTestHandler.quit();
        super.tearDown();
    }

+1 −1
Original line number Diff line number Diff line
@@ -89,7 +89,7 @@ public class GsmCdmaCallTrackerTest extends TelephonyTest {
    @After
    public void tearDown() throws Exception {
        mCTUT = null;
        mGsmCdmaCTHandlerThread.quitSafely();
        mGsmCdmaCTHandlerThread.quit();
        super.tearDown();
    }

+1 −1
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ public class GsmCdmaPhoneTest extends TelephonyTest {
    public void tearDown() throws Exception {
        mPhoneUT.removeCallbacksAndMessages(null);
        mPhoneUT = null;
        mGsmCdmaPhoneTestHandler.quitSafely();
        mGsmCdmaPhoneTestHandler.quit();
        super.tearDown();
    }

Loading