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

Commit b95c030a authored by Arif Hussain's avatar Arif Hussain Committed by Linux Build Service Account
Browse files

wlan: Provide runtime option to enable or disable rssi threshold (base)

RSSI threshold check in AutoJoin feature will not allow
to connect if AP's RSSI is low, this option will allow user
to configure through advance setting application.

Change-Id: If479ab453b4760a196000ce9f72ae2fcee116f87
CRs-Fixed: 710284
parent eec941af
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -5806,6 +5806,13 @@ public final class Settings {
       public static final String WIFI_SCAN_ALWAYS_AVAILABLE =
                "wifi_scan_always_enabled";

       /**
        * Setting to allow enable or disable rssi threshold.
        * @hide
        */
       public static final String WIFI_RSSI_THRESHOLD =
                "wifi_rssi_threshold";

       /**
        * Used to save the Wifi_ON state prior to tethering.
        * This state will be checked to restore Wifi after
+2 −0
Original line number Diff line number Diff line
@@ -141,6 +141,8 @@ interface IWifiManager

    void enableVerboseLogging(int verbose);

    void enableRssiThreshold(int enabled);

    int getVerboseLoggingLevel();

    int getAggressiveHandover();
+13 −0
Original line number Diff line number Diff line
@@ -2470,6 +2470,19 @@ public class WifiManager {
        }
    }

    /**
     * Set wifi rssi threshold. Called from advance wifi settings.
     * @hide
     */
    public void enableRssiThreshold (int enabled) {
        try {
            mService.enableRssiThreshold(enabled);
        } catch (Exception e) {
            //ignore any failure here
            Log.e(TAG, "enableRssiThreshold " + e.toString());
        }
    }

    /**
     * Get the WiFi verbose logging level.This is used by settings
     * to decide what to show within the picker.