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

Commit 492713b9 authored by Xiao Ma's avatar Xiao Ma
Browse files

Reference the dhcp init reboot experiment flag.

Bug: 122710829
Test: FrameworksNetTests NetworkStackTests
Test: manual test
      adb shell device_config put NAMESPACE KEY VALUE

Merged-In: I044c903656ac4f343d6654820dfa1bb74a58135e
Merged-In: Ida5cffae19baaa5d71a0335bc7230809f4fcc486
Change-Id: I162a3da1f7412493c4df09f8e9e193a693c5aa07
parent 18ce8bce
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -332,9 +332,9 @@ public class DhcpClient extends StateMachine {
     *
     */
    public boolean isDhcpLeaseCacheEnabled() {
        // TODO: call DeviceConfig.getProperty(DeviceConfig.NAMESPACE_CONNECTIVITY,
        //                    DeviceConfig.PROPERTY);
        // to fetch the dynamic experiment flag value. Return false by default.
        mDhcpLeaseCacheEnabled = Boolean.parseBoolean(NetworkStackUtils.getDeviceConfigProperty(
                NetworkStackUtils.NAMESPACE_CONNECTIVITY,
                NetworkStackUtils.DHCP_INIT_REBOOT_ENABLED, "false"));
        return mDhcpLeaseCacheEnabled;
    }

+5 −0
Original line number Diff line number Diff line
@@ -108,6 +108,11 @@ public class NetworkStackUtils {
     */
    public static final int CAPTIVE_PORTAL_MODE_AVOID = 2;

    /**
     * Experiment flag to enable DHCP INIT-REBOOT state, default value is false.
     */
    public static final String DHCP_INIT_REBOOT_ENABLED = "dhcp_init_reboot_enabled";

    static {
        System.loadLibrary("networkstackutilsjni");
    }