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

Commit ce5bcf8b authored by Adam Lesinski's avatar Adam Lesinski Committed by Android Git Automerger
Browse files

am ad5f292b: Merge "Extend the time between WiFi energy samples" into mnc-dev

* commit 'ad5f292b':
  Extend the time between WiFi energy samples
parents 3285efc0 ad5f292b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1560,7 +1560,7 @@ public class ConnectivityService extends IConnectivityManager.Stub
                NetworkCapabilities.TRANSPORT_WIFI)) {
            timeout = Settings.Global.getInt(mContext.getContentResolver(),
                                             Settings.Global.DATA_ACTIVITY_TIMEOUT_WIFI,
                                             5);
                                             15);
            type = ConnectivityManager.TYPE_WIFI;
        } else {
            // do not track any other networks
+5 −1
Original line number Diff line number Diff line
@@ -38,6 +38,7 @@ import android.os.ServiceManager;
import android.os.SystemClock;
import android.os.UserHandle;
import android.os.WorkSource;
import android.telephony.DataConnectionRealTimeInfo;
import android.telephony.SignalStrength;
import android.telephony.TelephonyManager;
import android.util.Slog;
@@ -629,7 +630,10 @@ public final class BatteryStatsService extends IBatteryStats.Stub
        // Collect data now for the past activity.
        synchronized (mStats) {
            if (mStats.isOnBattery()) {
                mHandler.scheduleWifiSync("wifi-data");
                final String type = (powerState == DataConnectionRealTimeInfo.DC_POWER_STATE_HIGH ||
                        powerState == DataConnectionRealTimeInfo.DC_POWER_STATE_MEDIUM) ? "active"
                        : "inactive";
                mHandler.scheduleWifiSync("wifi-data: " + type);
            }
            mStats.noteWifiRadioPowerState(powerState, tsNanos);
        }