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

Commit 96a1abd2 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add a method to note waking network packets to BatteryStats" am: b3238fc8 am: caebc659

parents 9006e330 caebc659
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.os;

import android.net.Network;

import com.android.internal.os.BinderCallsStats;
import com.android.internal.os.SystemServerCpuThreadReader.SystemServiceCpuThreadTimes;

@@ -62,6 +64,15 @@ public abstract class BatteryStatsInternal {
     */
    public abstract void noteJobsDeferred(int uid, int numDeferred, long sinceLast);

    /**
     * Informs battery stats of a data packet that woke up the CPU.
     *
     * @param network The network over which the packet arrived.
     * @param elapsedMillis The time of the packet's arrival in elapsed timebase.
     * @param uid The uid that received the packet.
     */
    public abstract void noteCpuWakingNetworkPacket(Network network, long elapsedMillis, int uid);

    /**
     * Informs battery stats of binder stats for the given work source UID.
     */
+5 −0
Original line number Diff line number Diff line
@@ -441,6 +441,11 @@ public final class BatteryStatsService extends IBatteryStats.Stub
            BatteryStatsService.this.noteJobsDeferred(uid, numDeferred, sinceLast);
        }

        @Override
        public void noteCpuWakingNetworkPacket(Network network, long elapsedMillis, int uid) {
            Slog.d(TAG, "Wakeup due to incoming packet on network " + network + " to uid " + uid);
        }

        @Override
        public void noteBinderCallStats(int workSourceUid, long incrementatCallCount,
                Collection<BinderCallsStats.CallStat> callStats) {