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

Commit 51d94c82 authored by Adam Lesinski's avatar Adam Lesinski Committed by android-build-merger
Browse files

Merge "BatteryStats: Remove reading of cpu power" into oc-dev

am: af85d840

Change-Id: I671a51d53c035d40cb1af1428f7c0f4093445aed
parents c7fd8db8 af85d840
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31930,7 +31930,7 @@ package android.os.health {
    field public static final int MEASUREMENT_BLUETOOTH_TX_MS = 10022; // 0x2726
    field public static final int MEASUREMENT_BLUETOOTH_TX_PACKETS = 10059; // 0x274b
    field public static final int MEASUREMENT_BUTTON_USER_ACTIVITY_COUNT = 10046; // 0x273e
    field public static final int MEASUREMENT_CPU_POWER_MAMS = 10064; // 0x2750
    field public static final deprecated int MEASUREMENT_CPU_POWER_MAMS = 10064; // 0x2750
    field public static final int MEASUREMENT_MOBILE_IDLE_MS = 10024; // 0x2728
    field public static final int MEASUREMENT_MOBILE_POWER_MAMS = 10027; // 0x272b
    field public static final int MEASUREMENT_MOBILE_RX_BYTES = 10048; // 0x2740
+1 −1
Original line number Diff line number Diff line
@@ -34815,7 +34815,7 @@ package android.os.health {
    field public static final int MEASUREMENT_BLUETOOTH_TX_MS = 10022; // 0x2726
    field public static final int MEASUREMENT_BLUETOOTH_TX_PACKETS = 10059; // 0x274b
    field public static final int MEASUREMENT_BUTTON_USER_ACTIVITY_COUNT = 10046; // 0x273e
    field public static final int MEASUREMENT_CPU_POWER_MAMS = 10064; // 0x2750
    field public static final deprecated int MEASUREMENT_CPU_POWER_MAMS = 10064; // 0x2750
    field public static final int MEASUREMENT_MOBILE_IDLE_MS = 10024; // 0x2728
    field public static final int MEASUREMENT_MOBILE_POWER_MAMS = 10027; // 0x272b
    field public static final int MEASUREMENT_MOBILE_RX_BYTES = 10048; // 0x2740
+1 −1
Original line number Diff line number Diff line
@@ -32062,7 +32062,7 @@ package android.os.health {
    field public static final int MEASUREMENT_BLUETOOTH_TX_MS = 10022; // 0x2726
    field public static final int MEASUREMENT_BLUETOOTH_TX_PACKETS = 10059; // 0x274b
    field public static final int MEASUREMENT_BUTTON_USER_ACTIVITY_COUNT = 10046; // 0x273e
    field public static final int MEASUREMENT_CPU_POWER_MAMS = 10064; // 0x2750
    field public static final deprecated int MEASUREMENT_CPU_POWER_MAMS = 10064; // 0x2750
    field public static final int MEASUREMENT_MOBILE_IDLE_MS = 10024; // 0x2728
    field public static final int MEASUREMENT_MOBILE_POWER_MAMS = 10027; // 0x272b
    field public static final int MEASUREMENT_MOBILE_RX_BYTES = 10048; // 0x2740
+3 −13
Original line number Diff line number Diff line
@@ -593,11 +593,6 @@ public abstract class BatteryStats implements Parcelable {
         */
        public abstract long getSystemCpuTimeUs(int which);

        /**
         * Get the total cpu power consumed (in milli-ampere-microseconds).
         */
        public abstract long getCpuPowerMaUs(int which);

        /**
         * Returns the approximate cpu time (in milliseconds) spent at a certain CPU speed for a
         * given CPU cluster.
@@ -3467,10 +3462,9 @@ public abstract class BatteryStats implements Parcelable {

            final long userCpuTimeUs = u.getUserCpuTimeUs(which);
            final long systemCpuTimeUs = u.getSystemCpuTimeUs(which);
            final long powerCpuMaUs = u.getCpuPowerMaUs(which);
            if (userCpuTimeUs > 0 || systemCpuTimeUs > 0 || powerCpuMaUs > 0) {
            if (userCpuTimeUs > 0 || systemCpuTimeUs > 0) {
                dumpLine(pw, uid, category, CPU_DATA, userCpuTimeUs / 1000, systemCpuTimeUs / 1000,
                        powerCpuMaUs / 1000);
                        0 /* old cpu power, keep for compatibility */);
            }

            final ArrayMap<String, ? extends BatteryStats.Uid.Proc> processStats
@@ -4758,17 +4752,13 @@ public abstract class BatteryStats implements Parcelable {

            final long userCpuTimeUs = u.getUserCpuTimeUs(which);
            final long systemCpuTimeUs = u.getSystemCpuTimeUs(which);
            final long powerCpuMaUs = u.getCpuPowerMaUs(which);
            if (userCpuTimeUs > 0 || systemCpuTimeUs > 0 || powerCpuMaUs > 0) {
            if (userCpuTimeUs > 0 || systemCpuTimeUs > 0) {
                sb.setLength(0);
                sb.append(prefix);
                sb.append("    Total cpu time: u=");
                formatTimeMs(sb, userCpuTimeUs / 1000);
                sb.append("s=");
                formatTimeMs(sb, systemCpuTimeUs / 1000);
                sb.append("p=");
                printmAh(sb, powerCpuMaUs / (1000.0 * 1000.0 * 60.0 * 60.0));
                sb.append("mAh");
                pw.println(sb.toString());
            }

+3 −0
Original line number Diff line number Diff line
@@ -445,7 +445,10 @@ public final class UidHealthStats {

    /**
     * An estimate of the number of milliamp-microsends used by this uid.
     *
     * @deprecated this measurement is vendor-dependent and not reliable.
     */
    @Deprecated
    @HealthKeys.Constant(type=HealthKeys.TYPE_MEASUREMENT)
    public static final int MEASUREMENT_CPU_POWER_MAMS = HealthKeys.BASE_UID + 64;

Loading