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

Commit ad5f292b authored by Adam Lesinski's avatar Adam Lesinski Committed by Android (Google) Code Review
Browse files

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

parents e6953913 06f46cb3
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);
        }