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

Commit ad2b492f authored by Erik Kline's avatar Erik Kline Committed by android-build-merger
Browse files

Merge "Send empty LinkProperties when entering StoppedState." am: efdca004 am: 72aa5bbd

am: ca08e38e

Change-Id: Ia33d99f181f67f33b14c0c7552f934b089182c4a
parents 77354f02 ca08e38e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -163,10 +163,10 @@ public class IpClient extends StateMachine {
    // TODO: Find an lighter weight approach.
    private class LoggingCallbackWrapper extends Callback {
        private static final String PREFIX = "INVOKE ";
        private Callback mCallback;
        private final Callback mCallback;

        public LoggingCallbackWrapper(Callback callback) {
            mCallback = callback;
            mCallback = (callback != null) ? callback : new Callback();
        }

        private void log(String msg) {
@@ -1273,6 +1273,7 @@ public class IpClient extends StateMachine {
            stopAllIP();

            resetLinkProperties();
            mCallback.onLinkPropertiesChange(new LinkProperties(mLinkProperties));
            if (mStartTimeMillis > 0) {
                recordMetric(IpManagerEvent.COMPLETE_LIFECYCLE);
                mStartTimeMillis = 0;
+6 −0
Original line number Diff line number Diff line
@@ -69,6 +69,8 @@ import java.util.Set;

/**
 * Tests for IpManager.
 *
 * TODO: Rename to IpClientTest.
 */
@RunWith(AndroidJUnit4.class)
@SmallTest
@@ -111,6 +113,10 @@ public class IpManagerTest {
        verify(mNMService, times(1)).registerObserver(arg.capture());
        mObserver = arg.getValue();
        reset(mNMService);
        final LinkProperties emptyLp = new LinkProperties();
        emptyLp.setInterfaceName(ifname);
        verify(mCb, timeout(100)).onLinkPropertiesChange(eq(emptyLp));
        reset(mCb);
        return ipm;
    }