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

Commit 8ca1f18a authored by vandwalle's avatar vandwalle Committed by Android (Google) Code Review
Browse files

Merge "various fixes:" into lmp-dev

parents c0595a7d 94fe7e99
Loading
Loading
Loading
Loading
+32 −1
Original line number Diff line number Diff line
@@ -339,6 +339,22 @@
         capability can provide power savings when wifi needs to be always kept on. -->
    <bool translatable="false" name="config_wifi_background_scan_support">false</bool>

    <!-- Boolean indicating we re-try re-associating once upon disconnection and RSSI is high failure  -->
    <bool translatable="true" name="config_wifi_enable_disconnection_debounce">true</bool>

    <!-- Boolean indicating autojoin will prefer 5GHz and choose 5GHz BSSIDs -->
    <bool translatable="true" name="config_wifi_enable_5GHz_preference">true</bool>

    <!-- Integer specifying the basic autojoin parameters -->
    <integer translatable="false" name="config_wifi_framework_5GHz_preference_boost_threshold">-65</integer>
    <integer translatable="false" name="config_wifi_framework_5GHz_preference_boost_factor">5</integer>
    <integer translatable="false" name="config_wifi_framework_current_association_hysteresis_high">16</integer>
    <integer translatable="false" name="config_wifi_framework_current_association_hysteresis_low">10</integer>
    <integer translatable="false" name="config_wifi_framework_5GHz_preference_penalty_threshold">-75</integer>
    <integer translatable="false" name="config_wifi_framework_5GHz_preference_penalty_factor">2</integer>



    <!-- Integer indicating wpa_supplicant scan interval in milliseconds -->
    <integer translatable="false" name="config_wifi_supplicant_scan_interval">15000</integer>

@@ -351,9 +367,24 @@
         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>

    <!-- Integer indicating associated scan interval in milliseconds -->
    <!-- Integer indicating associated partial scan interval in milliseconds -->
    <integer translatable="false" name="config_wifi_framework_associated_scan_interval">10000</integer>

    <!-- Integer indicating associated full scan backoff, representing a fraction: xx/8 -->
    <integer translatable="false" name="config_wifi_framework_associated_full_scan_backoff">12</integer>

    <!-- Integer indicating associated full scan max interval in milliseconds -->
    <integer translatable="false" name="config_wifi_framework_associated_full_scan_max_interval">300000</integer>

    <!-- Integer indicating associated full scan max total dwell time in milliseconds -->
    <integer translatable="false" name="config_wifi_framework_associated_full_scan_max_total_dwell_time">500</integer>

    <!-- Integer indicating associated full scan max num active channels -->
    <integer translatable="false" name="config_wifi_framework_associated_partial_scan_max_num_active_channels">6</integer>

    <!-- Integer indicating associated full scan max num passive channels -->
    <integer translatable="false" name="config_wifi_framework_associated_partial_scan_max_num_passive_channels">3</integer>

    <!-- Boolean indicating associated scan are allowed -->
    <bool translatable="false" name="config_wifi_framework_enable_associated_autojoin_scan">true</bool>

+15 −1
Original line number Diff line number Diff line
@@ -297,6 +297,21 @@
  <java-symbol type="bool" name="config_wifi_framework_enable_associated_autojoin_scan" />
  <java-symbol type="bool" name="config_wifi_framework_enable_associated_network_selection" />
  <java-symbol type="bool" name="config_wifi_only_link_same_credential_configurations" />
  <java-symbol type="bool" name="config_wifi_enable_disconnection_debounce" />
  <java-symbol type="bool" name="config_wifi_enable_5GHz_preference" />
  <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_threshold" />
  <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_boost_factor" />
  <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_penalty_threshold" />
  <java-symbol type="integer" name="config_wifi_framework_current_association_hysteresis_high" />
  <java-symbol type="integer" name="config_wifi_framework_current_association_hysteresis_low" />
  <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_penalty_threshold" />
  <java-symbol type="integer" name="config_wifi_framework_5GHz_preference_penalty_factor" />
  <java-symbol type="integer" name="config_wifi_framework_associated_scan_interval" />
  <java-symbol type="integer" name="config_wifi_framework_associated_full_scan_backoff" />
  <java-symbol type="integer" name="config_wifi_framework_associated_full_scan_max_interval" />
  <java-symbol type="integer" name="config_wifi_framework_associated_full_scan_max_total_dwell_time" />
  <java-symbol type="integer" name="config_wifi_framework_associated_partial_scan_max_num_active_channels" />
  <java-symbol type="integer" name="config_wifi_framework_associated_partial_scan_max_num_passive_channels" />
  <java-symbol type="integer" name="config_bluetooth_max_advertisers" />
  <java-symbol type="integer" name="config_bluetooth_max_scan_filters" />
  <java-symbol type="integer" name="config_cursorWindowSize" />
@@ -315,7 +330,6 @@
  <java-symbol type="integer" name="config_shortPressOnPowerBehavior" />
  <java-symbol type="integer" name="config_toastDefaultGravity" />
  <java-symbol type="integer" name="config_wifi_framework_scan_interval" />
  <java-symbol type="integer" name="config_wifi_framework_associated_scan_interval" />
  <java-symbol type="integer" name="config_wifi_supplicant_scan_interval" />
  <java-symbol type="integer" name="config_wifi_scan_interval_p2p_connected" />
  <java-symbol type="integer" name="db_connection_pool_size" />
+85 −25
Original line number Diff line number Diff line
@@ -186,6 +186,8 @@ public class WifiConfiguration implements Parcelable {
    public static final int DISABLED_AUTH_FAILURE                           = 3;
    /** @hide */
    public static final int DISABLED_ASSOCIATION_REJECT                     = 4;
    /** @hide */
    public static final int DISABLED_BY_WIFI_MANAGER                        = 5;

    /**
     * The ID number that the supplicant uses to identify this
@@ -438,11 +440,7 @@ public class WifiConfiguration implements Parcelable {

    /** @hide
     * 5GHz band is prefered low over 2.4 if the 5GHz RSSI is higher than this threshold */
    public static int A_BAND_PREFERENCE_RSSI_THRESHOLD_LOW = -65;

    /** @hide
     * 5GHz band is prefered hard over 2.4 if the 5GHz RSSI is higher than this threshold */
    public static int A_BAND_PREFERENCE_RSSI_THRESHOLD = -55;
    public static int A_BAND_PREFERENCE_RSSI_THRESHOLD = -65;

    /** @hide
     * 5GHz band is penalized if the 5GHz RSSI is lower than this threshold **/
@@ -457,6 +455,12 @@ public class WifiConfiguration implements Parcelable {
     ***/
    public static int HOME_NETWORK_RSSI_BOOST = 5;

    /** @hide
     * RSSI boost for configuration which use autoJoinUseAggressiveJoinAttemptThreshold
     * To be more aggressive when initially attempting to auto join
     */
    public static int MAX_INITIAL_AUTO_JOIN_RSSI_BOOST = 8;

    /**
     * @hide
     * A summary of the RSSI and Band status for that configuration
@@ -593,6 +597,11 @@ public class WifiConfiguration implements Parcelable {
    public static final int AUTO_JOIN_TEMPORARY_DISABLED_AT_SUPPLICANT  = 64;
    /** @hide */
    public static final int AUTO_JOIN_DISABLED_ON_AUTH_FAILURE  = 128;
    /** @hide */
    public static final int AUTO_JOIN_DISABLED_NO_CREDENTIALS = 160;
    /** @hide */
    public static final int AUTO_JOIN_DISABLED_USER_ACTION = 161;

    /** @hide */
    public static final int AUTO_JOIN_DELETED  = 200;

@@ -662,6 +671,18 @@ public class WifiConfiguration implements Parcelable {
     */
    public boolean ephemeral;

    /**
     * @hide
     * Indicate that we didn't auto-join because rssi was too low
     */
    public boolean autoJoinBailedDueToLowRssi;

    /**
     * @hide
     * AutoJoin even though RSSI is 10dB below threshold
     */
    public int autoJoinUseAggressiveJoinAttemptThreshold;

    /**
     * @hide
     * Number of time the scorer overrode a the priority based choice, when comparing two
@@ -881,11 +902,10 @@ public class WifiConfiguration implements Parcelable {
        if (this.autoJoinStatus > 0) {
            sbuf.append(" autoJoinStatus ").append(this.numConnectionFailures).append("\n");
        }
        if (this.didSelfAdd || this.selfAdded) {
        if (this.didSelfAdd) sbuf.append(" didSelfAdd");
        if (this.selfAdded) sbuf.append(" selfAdded");
        if (this.noInternetAccess) sbuf.append(" noInternetAccess");

        if (this.didSelfAdd || this.selfAdded || this.noInternetAccess) {
            sbuf.append("\n");
        }
        sbuf.append(" KeyMgmt:");
@@ -950,21 +970,41 @@ public class WifiConfiguration implements Parcelable {
        if (this.preSharedKey != null) {
            sbuf.append('*');
        }

        sbuf.append("\nEnterprise config:\n");
        sbuf.append(enterpriseConfig);
        sbuf.append('\n');

        sbuf.append("IP config:\n");
        sbuf.append(mIpConfiguration.toString());

        if (this.creatorUid != 0)  sbuf.append(" uid=" + Integer.toString(creatorUid));
        if (this.autoJoinBSSID != null) sbuf.append(" autoJoinBSSID=" + autoJoinBSSID);
        if (this.blackListTimestamp != 0) {
        long now_ms = System.currentTimeMillis();
        if (this.blackListTimestamp != 0) {
            sbuf.append('\n');
            long diff = now_ms - this.blackListTimestamp;
            if (diff <= 0) {
                sbuf.append(" blackListed since <incorrect>");
            } else {
                sbuf.append("blackListed since ").append(Long.toString(diff/1000)).append( "sec");
                sbuf.append(" blackListed: ").append(Long.toString(diff/1000)).append( "sec");
            }
        }
        if (this.lastConnected != 0) {
            sbuf.append('\n');
            long diff = now_ms - this.lastConnected;
            if (diff <= 0) {
                sbuf.append("lastConnected since <incorrect>");
            } else {
                sbuf.append("lastConnected: ").append(Long.toString(diff/1000)).append( "sec");
            }
        }
        if (this.lastConnectionFailure != 0) {
            sbuf.append('\n');
            long diff = now_ms - this.lastConnectionFailure;
            if (diff <= 0) {
                sbuf.append("lastConnectionFailure since <incorrect>");
            } else {
                sbuf.append("lastConnectionFailure: ").append(Long.toString(diff/1000));
                sbuf.append( "sec");
            }
        }
        sbuf.append('\n');
@@ -984,15 +1024,29 @@ public class WifiConfiguration implements Parcelable {
                }
            }
        }
        sbuf.append(" triggeredLow: ").append(numUserTriggeredWifiDisableLowRSSI);
        sbuf.append(" triggeredBad: ").append(numUserTriggeredWifiDisableBadRSSI);
        sbuf.append(" triggeredNotHigh: ").append(numUserTriggeredWifiDisableNotHighRSSI);
        if (this.scanResultCache != null) {
            sbuf.append("scan cache:  ");
            for(ScanResult result : this.scanResultCache.values()) {
                sbuf.append("{").append(result.BSSID).append(",").append(result.frequency);
                sbuf.append(",").append(result.level).append(",st=");
                sbuf.append(result.autoJoinStatus).append("} ");
            }
            sbuf.append('\n');
        sbuf.append(" ticksLow: ").append(numTicksAtLowRSSI);
        sbuf.append(" ticksBad: ").append(numTicksAtBadRSSI);
        sbuf.append(" ticksNotHigh: ").append(numTicksAtNotHighRSSI);
        }
        sbuf.append("triggeredLow: ").append(this.numUserTriggeredWifiDisableLowRSSI);
        sbuf.append(" triggeredBad: ").append(this.numUserTriggeredWifiDisableBadRSSI);
        sbuf.append(" triggeredNotHigh: ").append(this.numUserTriggeredWifiDisableNotHighRSSI);
        sbuf.append('\n');
        sbuf.append(" triggeredJoin: ").append(numUserTriggeredJoinAttempts);
        sbuf.append("ticksLow: ").append(this.numTicksAtLowRSSI);
        sbuf.append(" ticksBad: ").append(this.numTicksAtBadRSSI);
        sbuf.append(" ticksNotHigh: ").append(this.numTicksAtNotHighRSSI);
        sbuf.append('\n');
        sbuf.append("triggeredJoin: ").append(this.numUserTriggeredJoinAttempts);
        sbuf.append('\n');
        sbuf.append("autoJoinBailedDueToLowRssi: ").append(this.autoJoinBailedDueToLowRssi);
        sbuf.append('\n');
        sbuf.append("autoJoinUseAggressiveJoinAttemptThreshold: ");
        sbuf.append(this.autoJoinUseAggressiveJoinAttemptThreshold);
        sbuf.append('\n');

        return sbuf.toString();
@@ -1310,6 +1364,9 @@ public class WifiConfiguration implements Parcelable {
            numTicksAtNotHighRSSI = source.numTicksAtNotHighRSSI;
            numUserTriggeredJoinAttempts = source.numUserTriggeredJoinAttempts;
            autoJoinBSSID = source.autoJoinBSSID;
            autoJoinUseAggressiveJoinAttemptThreshold
                    = source.autoJoinUseAggressiveJoinAttemptThreshold;
            autoJoinBailedDueToLowRssi = source.autoJoinBailedDueToLowRssi;
        }
    }

@@ -1370,7 +1427,8 @@ public class WifiConfiguration implements Parcelable {
        dest.writeInt(numTicksAtBadRSSI);
        dest.writeInt(numTicksAtNotHighRSSI);
        dest.writeInt(numUserTriggeredJoinAttempts);

        dest.writeInt(autoJoinUseAggressiveJoinAttemptThreshold);
        dest.writeInt(autoJoinBailedDueToLowRssi ? 1 : 0);
    }

    /** Implement the Parcelable interface {@hide} */
@@ -1427,6 +1485,8 @@ public class WifiConfiguration implements Parcelable {
                config.numTicksAtBadRSSI = in.readInt();
                config.numTicksAtNotHighRSSI = in.readInt();
                config.numUserTriggeredJoinAttempts = in.readInt();
                config.autoJoinUseAggressiveJoinAttemptThreshold = in.readInt();
                config.autoJoinBailedDueToLowRssi = in.readInt() != 0;
                return config;
            }