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

Commit d655395d authored by Mark Chien's avatar Mark Chien Committed by Automerger Merge Worker
Browse files

Merge changes Ibff052b3,Ic3885283 am: b7a27d61

Change-Id: I0b802a91f6e4f8c5862ee5b2d624157430a5dd87
parents 8be1e85d b7a27d61
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -458,7 +458,7 @@ public class IpClient extends StateMachine {
    private final SharedLog mLog;
    private final LocalLog mConnectivityPacketLog;
    private final MessageHandlingLogger mMsgStateLogger;
    private final IpConnectivityLog mMetricsLog = new IpConnectivityLog();
    private final IpConnectivityLog mMetricsLog;
    private final InterfaceController mInterfaceCtrl;

    // Ignore nonzero RDNSS option lifetimes below this value. 0 = disabled.
@@ -537,6 +537,13 @@ public class IpClient extends StateMachine {
            return NetworkStackUtils.getDeviceConfigPropertyInt(NAMESPACE_CONNECTIVITY, name,
                    defaultValue);
        }

        /**
         * Get a IpConnectivityLog instance.
         */
        public IpConnectivityLog getIpConnectivityLog() {
            return new IpConnectivityLog();
        }
    }

    public IpClient(Context context, String ifName, IIpClientCallbacks callback,
@@ -558,6 +565,7 @@ public class IpClient extends StateMachine {
        mInterfaceName = ifName;
        mClatInterfaceName = CLAT_PREFIX + ifName;
        mDependencies = deps;
        mMetricsLog = deps.getIpConnectivityLog();
        mShutdownLatch = new CountDownLatch(1);
        mCm = mContext.getSystemService(ConnectivityManager.class);
        mObserverRegistry = observerRegistry;
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

java_defaults {
    name: "NetworkStackTestsDefaults",
    certificate: "platform",
    platform_apis: true,
    srcs: ["src/**/*.java", "src/**/*.kt"],
    resource_dirs: ["res"],
    static_libs: [
+0 −1
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
    <uses-permission android:name="android.permission.NETWORK_STACK" />

    <application android:debuggable="true">
        <uses-library android:name="android.test.runner" />
+3 −0
Original line number Diff line number Diff line
@@ -49,6 +49,7 @@ import android.net.MacAddress;
import android.net.NetworkStackIpMemoryStore;
import android.net.RouteInfo;
import android.net.ipmemorystore.NetworkAttributes;
import android.net.metrics.IpConnectivityLog;
import android.net.shared.InitialConfiguration;
import android.net.shared.ProvisioningConfiguration;
import android.net.util.InterfaceParams;
@@ -120,6 +121,7 @@ public class IpClientTest {
    @Mock private NetworkStackIpMemoryStore mIpMemoryStore;
    @Mock private IpMemoryStoreService mIpMemoryStoreService;
    @Mock private InterfaceParams mInterfaceParams;
    @Mock private IpConnectivityLog mMetricsLog;

    private NetworkObserver mObserver;
    private InterfaceParams mIfParams;
@@ -139,6 +141,7 @@ public class IpClientTest {
        when(mDependencies.getInterfaceParams(any())).thenReturn(mInterfaceParams);
        when(mDependencies.getIpMemoryStore(mContext, mNetworkStackServiceManager))
                .thenReturn(mIpMemoryStore);
        when(mDependencies.getIpConnectivityLog()).thenReturn(mMetricsLog);

        mIfParams = null;
    }