Merge "Rename variables and refine the format style from ag/14346184" into sc-dev am: 37d6d0835c

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

Change-Id: I217fe52a6c1df3f79d3bdd1a67c1330c3a0209c0
This commit is contained in:
YUKAI HUNG
2021-05-04 06:14:29 +00:00
committed by Automerger Merge Worker
6 changed files with 18 additions and 14 deletions

View File

@@ -111,9 +111,9 @@ public final class BatteryDiffEntryTest {
public void testLoadLabelAndIcon_forSystemBattery_returnExpectedResult() {
// Generates fake testing data.
final ContentValues values = getContentValuesWithType(
ConvertUtils.CONSUMER_TYPE_SYSTEM_BATTERY);
ConvertUtils.CONSUMER_TYPE_SYSTEM_BATTERY);
values.put("drainType",
Integer.valueOf(BatteryConsumer.POWER_COMPONENT_AMBIENT_DISPLAY));
Integer.valueOf(BatteryConsumer.POWER_COMPONENT_AMBIENT_DISPLAY));
final BatteryHistEntry batteryHistEntry = new BatteryHistEntry(values);
final BatteryDiffEntry entry = createBatteryDiffEntry(10, batteryHistEntry);

View File

@@ -62,7 +62,7 @@ public final class BatteryHistEntryTest {
when(mockBatteryEntry.getTimeInBackgroundMs()).thenReturn(5689L);
when(mockBatteryEntry.getPowerComponentId()).thenReturn(expectedType);
when(mockBatteryEntry.getConsumerType())
.thenReturn(ConvertUtils.CONSUMER_TYPE_SYSTEM_BATTERY);
.thenReturn(ConvertUtils.CONSUMER_TYPE_SYSTEM_BATTERY);
final ContentValues values =
ConvertUtils.convert(
mockBatteryEntry,
@@ -223,7 +223,7 @@ public final class BatteryHistEntryTest {
assertThat(entry.mPercentOfTotal).isEqualTo(percentOfTotal);
assertThat(entry.mForegroundUsageTimeInMs).isEqualTo(1234L);
assertThat(entry.mBackgroundUsageTimeInMs).isEqualTo(5689L);
assertThat(entry.mPowerComponentId).isEqualTo(drainType);
assertThat(entry.mDrainType).isEqualTo(drainType);
assertThat(entry.mConsumerType)
.isEqualTo(ConvertUtils.CONSUMER_TYPE_SYSTEM_BATTERY);
assertThat(entry.mBatteryLevel).isEqualTo(12);

View File

@@ -71,7 +71,7 @@ public final class ConvertUtilsTest {
when(mockBatteryEntry.getTimeInBackgroundMs()).thenReturn(5689L);
when(mockBatteryEntry.getPowerComponentId()).thenReturn(expectedType);
when(mockBatteryEntry.getConsumerType())
.thenReturn(ConvertUtils.CONSUMER_TYPE_SYSTEM_BATTERY);
.thenReturn(ConvertUtils.CONSUMER_TYPE_SYSTEM_BATTERY);
final ContentValues values =
ConvertUtils.convert(