blob: 9c8da675d3c69fe1d2f62a1917177ace467451f8 [file] [log] [blame]
/*
* Copyright (C) 2023 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.
*/
syntax = "proto2";
package android.os.statsd.adpf;
import "frameworks/proto_logging/stats/atom_field_options.proto";
import "frameworks/proto_logging/stats/atoms.proto";
import "frameworks/proto_logging/stats/attribution_node.proto";
import "frameworks/proto_logging/stats/enums/os/enums.proto";
option java_package = "com.android.os.adpf";
option java_multiple_files = true;
extend Atom {
optional ThermalStatusCalled thermal_status_called = 772 [(module) = "framework"];
optional ThermalHeadroomCalled thermal_headroom_called = 773 [(module) = "framework"];
optional ThermalHeadroomThresholdsCalled thermal_headroom_thresholds_called = 774 [(module) = "framework"];
optional ThermalHeadroomThresholds thermal_headroom_thresholds = 10201 [(module) = "framework"];
}
enum ThermalApiStatus {
UNSPECIFIED_THERMAL_API_FAILURE = 0;
SUCCESS = 1;
HAL_NOT_READY = 2;
FEATURE_NOT_SUPPORTED = 3;
INVALID_ARGUMENT = 4;
// if the thermal HAL reports no temperature for SKIN type
NO_TEMPERATURE = 5;
// if the thermal HAL reports no matching threshold for the SKIN temperature
NO_TEMPERATURE_THRESHOLD = 6;
}
/**
* Logs the PowerManager#getCurrentThermalStatus API usage.
* Logged from frameworks/base/services/core/java/com/android/server/power/ThermalManagerService.java.
*/
message ThermalStatusCalled {
// UID of the package.
optional int32 uid = 1 [(is_uid) = true];
// API call status.
optional ThermalApiStatus api_status = 2;
// Thermal throttling status.
optional android.os.ThrottlingSeverityEnum status = 3;
}
/**
* Logs the PowerManager#getThermalHeadroom API usage.
* Logged from frameworks/base/services/core/java/com/android/server/power/ThermalManagerService.java.
*/
message ThermalHeadroomCalled {
// UID of the package.
optional int32 uid = 1 [(is_uid) = true];
// API call status.
optional ThermalApiStatus api_status = 2;
// Thermal headroom.
optional float headroom = 3;
}
/**
* Logs the PowerManager#getThermalHeadroomThresholds API usage.
* Logged from frameworks/base/services/core/java/com/android/server/power/ThermalManagerService.java.
*/
message ThermalHeadroomThresholdsCalled {
// UID of the package.
optional int32 uid = 1 [(is_uid) = true];
// API call status.
optional ThermalApiStatus api_status = 2;
}
/**
* Logs the current thermal headroom thresholds of a device.
* Logged from frameworks/base/services/core/java/com/android/server/power/ThermalManagerService.java.
*/
message ThermalHeadroomThresholds {
// Thermal headroom threshold for that status.
repeated float headroom = 1;
}