Add UI metrics logging for battery tips card.

Bug: 291689623
Test: manual
Change-Id: I925e4d887c3435239aed0aa0fde7cda2c3a95b3c
Merged-In: I925e4d887c3435239aed0aa0fde7cda2c3a95b3c
This commit is contained in:
Zaiyue Xue
2023-08-19 17:30:11 +08:00
committed by mxyyiyi
parent 94f759230a
commit 9f57691d89
5 changed files with 75 additions and 25 deletions

View File

@@ -211,6 +211,7 @@ public class BatteryTestUtils {
/** Create a power anomaly event proto of adaptive brightness. */
public static PowerAnomalyEvent createAdaptiveBrightnessAnomalyEvent() {
return PowerAnomalyEvent.newBuilder()
.setEventId("BrightnessAnomaly")
.setType(PowerAnomalyType.TYPE_SETTINGS_BANNER)
.setKey(PowerAnomalyKey.KEY_BRIGHTNESS)
.setWarningBannerInfo(WarningBannerInfo.newBuilder()
@@ -223,6 +224,7 @@ public class BatteryTestUtils {
/** Create a power anomaly event proto of screen timeout. */
public static PowerAnomalyEvent createScreenTimeoutAnomalyEvent() {
return PowerAnomalyEvent.newBuilder()
.setEventId("ScreenTimeoutAnomaly")
.setType(PowerAnomalyType.TYPE_SETTINGS_BANNER)
.setKey(PowerAnomalyKey.KEY_SCREEN_TIMEOUT)
.setWarningBannerInfo(WarningBannerInfo.newBuilder()