Define the anomaly proto for anomaly detection project
Bug: 284893240 Test: presubmit Change-Id: Ifecc0c952392c58f5c10147d37d3de21a05157b5
This commit is contained in:
@@ -83,6 +83,7 @@ android_library {
|
||||
"net-utils-framework-common",
|
||||
"app-usage-event-protos-lite",
|
||||
"battery-event-protos-lite",
|
||||
"power-anomaly-event-protos-lite",
|
||||
"settings-contextual-card-protos-lite",
|
||||
"settings-log-bridge-protos-lite",
|
||||
"settings-telephony-protos-lite",
|
||||
|
@@ -30,3 +30,11 @@ java_library {
|
||||
},
|
||||
srcs: ["fuelgauge_usage_state.proto"],
|
||||
}
|
||||
|
||||
java_library {
|
||||
name: "power-anomaly-event-protos-lite",
|
||||
proto: {
|
||||
type: "lite",
|
||||
},
|
||||
srcs: ["power_anomaly_event.proto"],
|
||||
}
|
||||
|
@@ -0,0 +1,37 @@
|
||||
syntax = "proto2";
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "com.android.settings.fuelgauge.batteryusage";
|
||||
option java_outer_classname = "PowerAnomalyEventProto";
|
||||
|
||||
message PowerAnomalyEvent {
|
||||
optional int64 timestamp = 1;
|
||||
optional string type = 2; // e.g. settings, apps
|
||||
optional string key = 3; // e.g. brightness, significant_increase
|
||||
optional float score = 4;
|
||||
oneof info {
|
||||
WarningBannerInfo warning_banner_info = 5;
|
||||
WarningItemInfo warning_item_info = 6;
|
||||
}
|
||||
}
|
||||
|
||||
message WarningBannerInfo {
|
||||
optional string title_string = 1;
|
||||
optional string description_string = 2;
|
||||
optional string main_button_string = 3;
|
||||
optional string main_button_action = 4;
|
||||
optional string cancel_button_string = 5;
|
||||
optional string cancel_button_action = 6;
|
||||
}
|
||||
|
||||
message WarningItemInfo {
|
||||
optional int64 start_timestamp = 1;
|
||||
optional int64 end_timestamp = 2;
|
||||
optional string top_card_string = 3;
|
||||
optional string title_string = 4;
|
||||
optional string description_string = 5;
|
||||
optional string main_button_string = 6;
|
||||
optional string main_button_action = 7;
|
||||
optional string cancel_button_string = 8;
|
||||
optional string cancel_button_action = 9;
|
||||
}
|
Reference in New Issue
Block a user