Merge "Add a method to note waking network packets to BatteryStats"
This commit is contained in:
commit
b3238fc8a4
@ -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.
|
||||
*/
|
||||
|
@ -440,6 +440,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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user