Modify the name of power_anomaly_event enum fields

Test: manual
Bug: 291689623
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:93112b075979c2829bd3fa14c87160e361f66a82)
Change-Id: I1df76167548033887a6227d7b643117c28d68125
This commit is contained in:
mxyyiyi
2023-08-18 14:01:08 +08:00
committed by Xinyi Mao
parent 12f8f5ac7a
commit 6b5273f985
2 changed files with 9 additions and 9 deletions

View File

@@ -25,8 +25,8 @@ message PowerAnomalyEvent {
//
// Next id: 2
enum PowerAnomalyType{
SETTINGS_BANNER = 0;
APPS_ITEM = 1;
TYPE_SETTINGS_BANNER = 0;
TYPE_APPS_ITEM = 1;
}
// NOTE: Please DO NOT delete enum items or change enum values. Use [deprecated = true] instead.
@@ -34,9 +34,9 @@ enum PowerAnomalyType{
//
// Next id: 3
enum PowerAnomalyKey{
BRIGHTNESS = 0;
SCREEN_TIMEOUT = 1;
APP = 2;
KEY_BRIGHTNESS = 0;
KEY_SCREEN_TIMEOUT = 1;
KEY_APP = 2;
}
message WarningBannerInfo {

View File

@@ -211,8 +211,8 @@ public class BatteryTestUtils {
/** Create a power anomaly event proto of adaptive brightness. */
public static PowerAnomalyEvent createAdaptiveBrightnessAnomalyEvent() {
return PowerAnomalyEvent.newBuilder()
.setType(PowerAnomalyType.SETTINGS_BANNER)
.setKey(PowerAnomalyKey.BRIGHTNESS)
.setType(PowerAnomalyType.TYPE_SETTINGS_BANNER)
.setKey(PowerAnomalyKey.KEY_BRIGHTNESS)
.setWarningBannerInfo(WarningBannerInfo.newBuilder()
.setMainButtonDestination(AutoBrightnessSettings.class.getName())
.setMainButtonSourceMetricsCategory(SettingsEnums.SETTINGS_AUTO_BRIGHTNESS)
@@ -223,8 +223,8 @@ public class BatteryTestUtils {
/** Create a power anomaly event proto of screen timeout. */
public static PowerAnomalyEvent createScreenTimeoutAnomalyEvent() {
return PowerAnomalyEvent.newBuilder()
.setType(PowerAnomalyType.SETTINGS_BANNER)
.setKey(PowerAnomalyKey.SCREEN_TIMEOUT)
.setType(PowerAnomalyType.TYPE_SETTINGS_BANNER)
.setKey(PowerAnomalyKey.KEY_SCREEN_TIMEOUT)
.setWarningBannerInfo(WarningBannerInfo.newBuilder()
.setMainButtonDestination(ScreenTimeoutSettings.class.getName())
.setMainButtonSourceMetricsCategory(SettingsEnums.SCREEN_TIMEOUT)