From 46712bcb9e3574f1a364f1e7c46556b612bcb510 Mon Sep 17 00:00:00 2001 From: zhouwenjie Date: Thu, 11 Jan 2018 15:21:27 -0800 Subject: [PATCH] Update comments and bump batterystats version to 30. Bug: 70808931 Bug: 31866283 Test: build Android Change-Id: I8238c3135e79442ede97b87933dab85d8ff71134 --- core/java/android/os/BatteryStats.java | 11 +++++++---- core/proto/android/os/batterystats.proto | 11 +++++------ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/core/java/android/os/BatteryStats.java b/core/java/android/os/BatteryStats.java index 77e4808bf5c3..dc271d8639d5 100644 --- a/core/java/android/os/BatteryStats.java +++ b/core/java/android/os/BatteryStats.java @@ -235,8 +235,11 @@ public abstract class BatteryStats implements Parcelable { * New in version 29: * - Process states re-ordered. TOP_SLEEPING now below BACKGROUND. HEAVY_WEIGHT introduced. * - CPU times per UID process state + * New in version 30: + * - Uid.PROCESS_STATE_FOREGROUND_SERVICE only tracks + * ActivityManager.PROCESS_STATE_FOREGROUND_SERVICE. */ - static final int CHECKIN_VERSION = 29; + static final int CHECKIN_VERSION = 30; /** * Old version, we hit 9 and ran out of room, need to remove. @@ -694,17 +697,17 @@ public abstract class BatteryStats implements Parcelable { // total time a uid has had any processes running at all. /** - * Time this uid has any processes in the top state (or above such as persistent). + * Time this uid has any processes in the top state. */ public static final int PROCESS_STATE_TOP = 0; /** - * Time this uid has any process with a started out bound foreground service, but + * Time this uid has any process with a started foreground service, but * none in the "top" state. */ public static final int PROCESS_STATE_FOREGROUND_SERVICE = 1; /** * Time this uid has any process in an active foreground state, but none in the - * "top sleeping" or better state. + * "foreground service" or better state. Persistent and other foreground states go here. */ public static final int PROCESS_STATE_FOREGROUND = 2; /** diff --git a/core/proto/android/os/batterystats.proto b/core/proto/android/os/batterystats.proto index 9999b4e26a68..331f80f897f5 100644 --- a/core/proto/android/os/batterystats.proto +++ b/core/proto/android/os/batterystats.proto @@ -674,14 +674,13 @@ message UidProto { // needed: // top > foreground service > foreground > background > top sleeping > heavy weight > cache enum State { - // Time this uid has any processes in the top state (or above such as - // persistent). + // Time this uid has any processes in the top state. PROCESS_STATE_TOP = 0; - // Time this uid has any process with a started out bound foreground - // service, but none in the "top" state. + // Time this uid has any process with a started foreground service, but + // none in the "top" state. PROCESS_STATE_FOREGROUND_SERVICE = 1; - // Time this uid has any process in an active foreground state, but none - // in the "top sleeping" or better state. + // Time this uid has any process in an active foreground state, but none in the + // "foreground service" or better state. Persistent and other foreground states go here. PROCESS_STATE_FOREGROUND = 2; // Time this uid has any process in an active background state, but none // in the "foreground" or better state. -- 2.11.0