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

Commit e0d8c0e0 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN
Browse files

Enable new DHCP server by default

Regression tests pass with aosp/764042.

Test: regression automated tests, manual (verified WiFi, bluetooth
      tethering working).
Bug: b/109584964

Change-Id: I0f997d302a1d85930b24139af76e9b9c9a1b5f78
parent f5581f88
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -9469,8 +9469,7 @@ public final class Settings {
         * Use the old dnsmasq DHCP server for tethering instead of the framework implementation.
         *
         * Integer values are interpreted as boolean, and the absence of an explicit setting
         * is interpreted as |true|.
         * TODO: make the default |false|
         * is interpreted as |false|.
         * @hide
         */
        public static final String TETHER_ENABLE_LEGACY_DHCP_SERVER =
+1 −2
Original line number Diff line number Diff line
@@ -320,9 +320,8 @@ public class TetheringConfiguration {
    }

    private static boolean getEnableLegacyDhcpServer(Context ctx) {
        // TODO: make the default false (0) and update javadoc in Settings.java
        final ContentResolver cr = ctx.getContentResolver();
        final int intVal = Settings.Global.getInt(cr, TETHER_ENABLE_LEGACY_DHCP_SERVER, 1);
        final int intVal = Settings.Global.getInt(cr, TETHER_ENABLE_LEGACY_DHCP_SERVER, 0);
        return intVal != 0;
    }

+0 −9
Original line number Diff line number Diff line
@@ -225,13 +225,4 @@ public class TetheringConfigurationTest {
        final TetheringConfiguration cfg = new TetheringConfiguration(mMockContext, mLog);
        assertFalse(cfg.enableLegacyDhcpServer);
    }

    @Test
    public void testNewDhcpServerDefault() {
        Settings.Global.putString(mContentResolver, TETHER_ENABLE_LEGACY_DHCP_SERVER, null);

        final TetheringConfiguration cfg = new TetheringConfiguration(mMockContext, mLog);
        // TODO: change to false when new server is promoted to default
        assertTrue(cfg.enableLegacyDhcpServer);
    }
}