mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 10:44:41 +00:00
power/stats: Add EnergyConsumerAttribution interface
Bug: 172576334 Test: build pass Change-Id: I4a02a3cb9a20bd371cf1c0bf0c891eecb0283fbe
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// 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.power.stats;
|
||||
@VintfStability
|
||||
parcelable EnergyConsumerAttribution {
|
||||
int uid;
|
||||
long energyUWs;
|
||||
}
|
||||
@@ -21,4 +21,5 @@ parcelable EnergyConsumerResult {
|
||||
android.hardware.power.stats.EnergyConsumerId energyConsumerId;
|
||||
long timestampMs;
|
||||
long energyUWs;
|
||||
android.hardware.power.stats.EnergyConsumerAttribution[] attribution;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.hardware.power.stats;
|
||||
|
||||
@VintfStability
|
||||
parcelable EnergyConsumerAttribution {
|
||||
/**
|
||||
* Android ID / Linux UID, the accumulated energy should be attributed to
|
||||
*/
|
||||
int uid;
|
||||
/**
|
||||
* Accumulated energy since boot in microwatt-seconds (uWs) for this AID
|
||||
*/
|
||||
long energyUWs;
|
||||
}
|
||||
@@ -17,6 +17,7 @@
|
||||
package android.hardware.power.stats;
|
||||
|
||||
import android.hardware.power.stats.EnergyConsumerId;
|
||||
import android.hardware.power.stats.EnergyConsumerAttribution;
|
||||
|
||||
@VintfStability
|
||||
parcelable EnergyConsumerResult {
|
||||
@@ -32,5 +33,9 @@ parcelable EnergyConsumerResult {
|
||||
* Accumulated energy since boot in microwatt-seconds (uWs)
|
||||
*/
|
||||
long energyUWs;
|
||||
/**
|
||||
* Optional attribution per UID for this EnergyConsumer.
|
||||
*/
|
||||
EnergyConsumerAttribution[] attribution;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user