Replace the getBatteryLevel() method from SettingsLib API

Bug: 260524172
Test: presubmit
Change-Id: Icb56abd3dc258dde142a956124dc12bbfd9ae889
This commit is contained in:
ykhung
2022-11-29 17:36:12 +08:00
parent 20f6b1faaa
commit e77b5bbecb
3 changed files with 3 additions and 10 deletions

View File

@@ -132,6 +132,7 @@ public final class BatteryUsageBroadcastReceiverTest {
private static Intent getBatteryIntent(int level, int status) {
final Intent intent = new Intent(Intent.ACTION_BATTERY_CHANGED);
intent.putExtra(BatteryManager.EXTRA_LEVEL, level);
intent.putExtra(BatteryManager.EXTRA_SCALE, 100);
intent.putExtra(BatteryManager.EXTRA_STATUS, status);
return intent;
}