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

Commit a2cbb3e6 authored by Vinit Deshpande's avatar Vinit Deshpande Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'mwd-merge-wifi-062215' into mnc-dev

* changes:
  Added config_wifi_hotspot2_enabled.
  make sure wifi link stats are reset
parents 484b1148 c88e8b23
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -368,6 +368,9 @@
    <!-- Boolean indicating whether the wifi chipset has dual frequency band support -->
    <bool translatable="false" name="config_wifi_dual_band_support">false</bool>

    <!-- Boolean indicating whether Hotspot 2.0/Passpoint and ANQP queries is enabled -->
    <bool translatable="false" name="config_wifi_hotspot2_enabled">true</bool>

    <!-- Device type information conforming to Annex B format in WiFi Direct specification.
         The default represents a dual-mode smartphone -->
    <string translatable="false" name="config_wifi_p2p_device_type">10-0050F204-5</string>
+1 −0
Original line number Diff line number Diff line
@@ -1649,6 +1649,7 @@
  <java-symbol type="bool" name="config_supportLongPressPowerWhenNonInteractive" />
  <java-symbol type="bool" name="config_wifi_background_scan_support" />
  <java-symbol type="bool" name="config_wifi_dual_band_support" />
  <java-symbol type="bool" name="config_wifi_hotspot2_enabled" />
  <java-symbol type="bool" name="config_wimaxEnabled" />
  <java-symbol type="bool" name="show_ongoing_ime_switcher" />
  <java-symbol type="color" name="config_defaultNotificationColor" />
+27 −14
Original line number Diff line number Diff line
@@ -167,6 +167,10 @@ public class WifiInfo implements Parcelable {
            long txbad = stats.lostmpdu_be + stats.lostmpdu_bk
                    + stats.lostmpdu_vi + stats.lostmpdu_vo;

            if (txBad <= txbad
                    && txSuccess <= txgood
                    && rxSuccess <= rxgood
                    && txRetries <= txretries) {
                txBadRate = (txBadRate * 0.5)
                        + ((double) (txbad - txBad) * 0.5);
                txSuccessRate = (txSuccessRate * 0.5)
@@ -175,7 +179,12 @@ public class WifiInfo implements Parcelable {
                        + ((double) (rxgood - rxSuccess) * 0.5);
                txRetriesRate = (txRetriesRate * 0.5)
                        + ((double) (txretries - txRetries) * 0.5);

            } else {
                txBadRate = 0;
                txSuccessRate = 0;
                rxSuccessRate = 0;
                txRetriesRate = 0;
            }
            txBad = txbad;
            txSuccess = txgood;
            rxSuccess = rxgood;
@@ -204,11 +213,15 @@ public class WifiInfo implements Parcelable {
        txRetries = 0;
        txBadRate = 0;
        txRetriesRate = 0;

        if (txSuccess <= txPackets && rxSuccess <= rxPackets) {
            txSuccessRate = (txSuccessRate * 0.5)
                    + ((double) (txPackets - txSuccess) * 0.5);
            rxSuccessRate = (rxSuccessRate * 0.5)
                    + ((double) (rxPackets - rxSuccess) * 0.5);
        } else {
            txBadRate = 0;
            txRetriesRate = 0;
        }
        txSuccess = txPackets;
        rxSuccess = rxPackets;
    }