Replace the getBatteryLevel() method from SettingsLib API
Bug: 260524172 Test: presubmit Change-Id: Icb56abd3dc258dde142a956124dc12bbfd9ae889
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user