Update the flow of charging optimization strings.

Bug: 329020954
Test: atest SettingsRoboTests
Change-Id: I73738602036d79568fe4739a63534af1c64bd9d1
This commit is contained in:
Yiling Chuang
2024-05-09 10:52:30 +00:00
parent c5571e5530
commit 8bcaab7cc8
8 changed files with 122 additions and 41 deletions

View File

@@ -724,15 +724,15 @@ public class BatteryInfoTest {
Intent batteryIntent =
createIntentForGetBatteryInfoTest(
ChargingType.WIRED, ChargingSpeed.REGULAR, /* batteryLevel= */ 65);
var expectedRemainingLabel = "Done charging by";
var expectedRemainingLabel = "Expected remaining label";
var expectedChargeLabel = "65% - " + expectedRemainingLabel;
when(mFeatureFactory.batterySettingsFeatureProvider.isChargingOptimizationMode(mContext))
.thenReturn(true);
when(mFeatureFactory.batterySettingsFeatureProvider.getChargingOptimizationRemainingLabel(
eq(mContext), anyLong(), anyLong()))
eq(mContext), anyInt(), anyInt(), anyLong(), anyLong()))
.thenReturn(expectedRemainingLabel);
when(mFeatureFactory.batterySettingsFeatureProvider.getChargingOptimizationChargeLabel(
eq(mContext), anyString(), anyLong(), anyLong()))
eq(mContext), anyInt(), anyString(), anyLong(), anyLong()))
.thenReturn(expectedChargeLabel);
var expectedStatusLabel = "Charging";