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

Commit 3d894556 authored by Mike Lockwood's avatar Mike Lockwood Committed by Android (Google) Code Review
Browse files

Merge "WifiStateTracker: add support for overriding DCHP max retry count in an overlay"

parents 98b33ff6 79f5a041
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -148,4 +148,7 @@
    <!-- Development settings -->
    <bool name="def_stay_on_while_plugged_in">false</bool>

    <!-- Number of retries for connecting to DHCP.
         Value here is the same as WifiStateMachine.DEFAULT_MAX_DHCP_RETRIES -->
    <integer name="def_max_dhcp_retries">9</integer>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -1602,6 +1602,9 @@ public class DatabaseHelper extends SQLiteOpenHelper {

            loadBooleanSetting(stmt, Settings.Secure.NETSTATS_ENABLED,
                    R.bool.def_netstats_enabled);

            loadIntegerSetting(stmt, Settings.Secure.WIFI_MAX_DHCP_RETRY_COUNT,
                    R.integer.def_max_dhcp_retries);
        } finally {
            if (stmt != null) stmt.close();
        }
+3 −1
Original line number Diff line number Diff line
@@ -1754,7 +1754,9 @@ public class WifiStateMachine extends StateMachine {
         * If we've exceeded the maximum number of retries for DHCP
         * to a given network, disable the network
         */
        if (++mReconnectCount > getMaxDhcpRetries()) {
        int maxRetries = getMaxDhcpRetries();
        // maxRetries == 0 means keep trying forever
        if (maxRetries > 0 && ++mReconnectCount > maxRetries) {
            loge("Failed " +
                    mReconnectCount + " times, Disabling " + mLastNetworkId);
            mWifiConfigStore.disableNetwork(mLastNetworkId,