Merge "Define the anomaly proto for anomaly detection project" into udc-qpr-dev am: a9a8c4ed19 am: 4b038ad59b

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24239143

Change-Id: I0a1edc9535e3dff85f00daa6df7dfda73746a42c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2023-07-28 19:30:09 +00:00
committed by Automerger Merge Worker
3 changed files with 46 additions and 0 deletions

View File

@@ -84,6 +84,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",

View File

@@ -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"],
}

View File

@@ -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;
}