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

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

Merge "WifiStateMachine: Move wifi teardown delay to a framework resource" into ics-aah

parents 842c99f7 198357e6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -284,6 +284,10 @@
         point on the move. A value of 0 means no periodic scans will be used in the framework. -->
    <integer translatable="false" name="config_wifi_framework_scan_interval">300000</integer>

    <!-- Wifi driver stop delay, in milliseconds.
         Default value is 2 minutes. -->
    <integer translatable="false" name="config_wifi_driver_stop_delay">120000</integer>

    <!-- Flag indicating whether the keyguard should be bypassed when
         the slider is open.  This can be set or unset depending how easily
         the slider can be opened (for example, in a pocket or purse). -->
+5 −2
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ public class WifiStateMachine extends StateMachine {
     * Starting and shutting down driver too quick causes problems leading to driver
     * being in a bad state. Delay driver stop.
     */
    private static final int DELAYED_DRIVER_STOP_MS = 2 * 60 * 1000; /* 2 minutes */
    private final int mDriverStopDelayMs;
    private int mDelayedStopCounter;
    private boolean mInDelayedStop = false;

@@ -583,6 +583,9 @@ public class WifiStateMachine extends StateMachine {
        mDefaultSupplicantScanIntervalMs = mContext.getResources().getInteger(
                com.android.internal.R.integer.config_wifi_supplicant_scan_interval);

        mDriverStopDelayMs = mContext.getResources().getInteger(
                com.android.internal.R.integer.config_wifi_driver_stop_delay);

        mContext.registerReceiver(
            new BroadcastReceiver() {
                @Override
@@ -2599,7 +2602,7 @@ public class WifiStateMachine extends StateMachine {
                    } else {
                        /* send regular delayed shut down */
                        sendMessageDelayed(obtainMessage(CMD_DELAYED_STOP_DRIVER,
                                mDelayedStopCounter, 0), DELAYED_DRIVER_STOP_MS);
                                mDelayedStopCounter, 0), mDriverStopDelayMs);
                    }
                    break;
                case CMD_START_DRIVER: