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

Commit 27ac2a9d authored by Benjamin Schwartz's avatar Benjamin Schwartz Committed by Android (Google) Code Review
Browse files

Merge changes from topic "bs_ps_impl"

* changes:
  powerstats: Add VTS tests for PowerStats HAL 2.0
  powerstats: Simplify Power Stats HAL API
parents a326c637 c4529fb1
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -20,12 +20,6 @@ package android.hardware.powerstats;
interface IPowerStats {
  android.hardware.powerstats.EnergyData[] getEnergyData(in int[] railIndices);
  android.hardware.powerstats.PowerEntityInfo[] getPowerEntityInfo();
  android.hardware.powerstats.PowerEntityStateSpace[] getPowerEntityStateInfo(in int[] powerEntityIds);
  android.hardware.powerstats.PowerEntityStateResidencyResult[] getPowerEntityStateResidencyData(in int[] powerEntityIds);
  android.hardware.powerstats.RailInfo[] getRailInfo();
  const int SUCCESS = 0;
  const int NOT_SUPPORTED = 1;
  const int INVALID_INPUT = 2;
  const int FILESYSTEM_ERROR = 3;
  const int INSUFFICIENT_RESOURCES = 4;
}
+1 −1
Original line number Diff line number Diff line
@@ -20,5 +20,5 @@ package android.hardware.powerstats;
parcelable PowerEntityInfo {
  int powerEntityId;
  String powerEntityName;
  android.hardware.powerstats.PowerEntityType type;
  android.hardware.powerstats.PowerEntityStateInfo[] states;
}
+0 −23
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
// edit this file. It looks like you are doing that because you have modified
// an AIDL interface in a backward-incompatible way, e.g., deleting a function
// from an interface or a field from a parcelable and it broke the build. That
// breakage is intended.
//
// You must not make a backward incompatible changes to the AIDL files built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.powerstats;
@VintfStability
parcelable PowerEntityStateSpace {
  int powerEntityId;
  android.hardware.powerstats.PowerEntityStateInfo[] states;
}
+0 −24
Original line number Diff line number Diff line
///////////////////////////////////////////////////////////////////////////////
// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
///////////////////////////////////////////////////////////////////////////////

// This file is a snapshot of an AIDL interface (or parcelable). Do not try to
// edit this file. It looks like you are doing that because you have modified
// an AIDL interface in a backward-incompatible way, e.g., deleting a function
// from an interface or a field from a parcelable and it broke the build. That
// breakage is intended.
//
// You must not make a backward incompatible changes to the AIDL files built
// with the aidl_interface module type with versions property set. The module
// type is used to build AIDL files in a way that they can be used across
// independently updatable components of the system. If a device is shipped
// with such a backward incompatible change, it has a high risk of breaking
// later when a module using the interface is updated, e.g., Mainline modules.

package android.hardware.powerstats;
@Backing(type="int") @VintfStability
enum PowerEntityType {
  SUBSYSTEM = 0,
  PERIPHERAL = 1,
  POWER_DOMAIN = 2,
}
+0 −22
Original line number Diff line number Diff line
@@ -19,17 +19,10 @@ package android.hardware.powerstats;
import android.hardware.powerstats.EnergyData;
import android.hardware.powerstats.PowerEntityInfo;
import android.hardware.powerstats.PowerEntityStateResidencyResult;
import android.hardware.powerstats.PowerEntityStateSpace;
import android.hardware.powerstats.RailInfo;

@VintfStability
interface IPowerStats {
    const int SUCCESS = 0;
    const int NOT_SUPPORTED = 1;
    const int INVALID_INPUT = 2;
    const int FILESYSTEM_ERROR = 3;
    const int INSUFFICIENT_RESOURCES = 4;

    /**
     * Rail level energy measurements for low frequency clients:
     * Reports accumulated energy since boot on each rail.
@@ -52,21 +45,6 @@ interface IPowerStats {
     */
    PowerEntityInfo[] getPowerEntityInfo();

    /**
     * PowerEntity state information:
     * Reports the set of power states for which the specified
     * PowerEntity(s) provide residency data.
     *
     * @param powerEntityIds collection of IDs of PowerEntity(s) for which
     *     state information is requested. PowerEntity name to ID mapping may
     *     be queried from getPowerEntityInfo(). To get state space
     *     information for all PowerEntity(s) pass an empty vector.
     *
     * @return PowerEntity state space information for
     *     each specified PowerEntity that provides state space information.
     */
    PowerEntityStateSpace[] getPowerEntityStateInfo(in int[] powerEntityIds);

    /**
     * PowerEntity residencies for low frequency clients:
     * Reports accumulated residency data for each specified PowerEntity.
Loading