Move fuelgauge_usage_state.proto into fuelgauge folder.

Test: make RunSettingsRoboTests + manual
Bug: 20424125
Change-Id: Id0ed25e06258764ec58263c2e2f7dec7bfd81c0a
This commit is contained in:
Kuan Wang
2022-12-02 15:00:58 +08:00
parent 230c71301a
commit 1e8ca1d7d2
3 changed files with 16 additions and 9 deletions

View File

@@ -0,0 +1,16 @@
package {
// See: http://go/android-license-faq
// A large-scale-change added 'default_applicable_licenses' to import
// all of the 'license_kinds' from "packages_apps_Settings_license"
// to get the below license kinds:
// SPDX-license-identifier-Apache-2.0
default_applicable_licenses: ["packages_apps_Settings_license"],
}
java_library {
name: "fuelgauge-usage-state-protos-lite",
proto: {
type: "lite",
},
srcs: ["fuelgauge_usage_state.proto"],
}

View File

@@ -0,0 +1,40 @@
syntax = "proto2";
option java_multiple_files = true;
option java_package = "com.android.settings.fuelgauge.batteryusage";
option java_outer_classname = "FuelgaugeUsageStateProto";
// Stores device battery relative information.
message DeviceBatteryState {
optional int32 battery_level = 1;
optional int32 battery_status = 2;
optional int32 battery_health = 3;
}
message BatteryInformation {
// Records device battery relative information.
optional DeviceBatteryState device_battery_state = 1;
// Whether the data is represented as a system component or not?
optional bool is_hidden = 2;
// Records the timestamp relative information.
optional int64 boot_timestamp = 3;
optional string zone_id = 4;
// Records app relative information.
optional string app_label = 7;
// Records the battery usage relative information.
optional double total_power = 10;
optional double consume_power = 11;
optional double percent_of_total = 12;
optional int32 drain_type = 13;
optional int64 foreground_usage_time_in_ms = 14;
optional int64 foreground_service_usage_time_in_ms = 15;
optional int64 background_usage_time_in_ms = 16;
optional double foreground_usage_consume_power = 17;
optional double foreground_service_usage_consume_power = 18;
optional double background_usage_consume_power = 19;
optional double cached_usage_consume_power = 20;
}