Fix incorrect usage for the logging method to cause no data in WW

Fix incorrect usage for the logging method to cause the schedule type
and percentage data is not logged  into the WW, since
MetricsFeatureProvider doesn't support log Pair.of() data into the
WestWorld or Clearcut directly, it is used for EventLogWriter only

Bug: 202906853
Test: make SettingsRoboTests
Change-Id: I9f1d157c77df9bd74f441105318790a2505a9c01
This commit is contained in:
ykhung
2021-11-10 10:28:26 +08:00
parent 64e49a9393
commit 101dc6878a
4 changed files with 31 additions and 36 deletions

View File

@@ -806,12 +806,11 @@ public class AdvancedPowerUsageDetailTest {
verify(mMetricsFeatureProvider)
.action(
mContext,
SettingsEnums.OPEN_APP_BATTERY_USAGE,
SettingsEnums.ACTION_APP_BATTERY_USAGE_OPTIMIZED,
(Pair<Integer, Object>[]) new Pair[] {
new Pair(ConvertUtils.METRIC_KEY_PACKAGE, null),
new Pair(ConvertUtils.METRIC_KEY_BATTERY_USAGE, "app label")
});
SettingsEnums.OPEN_APP_BATTERY_USAGE,
/* package name*/ "none",
/* consumed battery */ 0);
}
@Test