mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Refactor PowerStatus (now called BatteryInfo)
This commit is contained in:
@ -75,12 +75,10 @@ namespace osu.Android
|
||||
|
||||
protected override UpdateManager CreateUpdateManager() => new SimpleUpdateManager();
|
||||
|
||||
protected override PowerStatus CreatePowerStatus() => new AndroidPowerStatus();
|
||||
protected override BatteryInfo CreateBatteryInfo() => new AndroidBatteryInfo();
|
||||
|
||||
private class AndroidPowerStatus : PowerStatus
|
||||
private class AndroidBatteryInfo : BatteryInfo
|
||||
{
|
||||
public override double BatteryCutoff => 0.20;
|
||||
|
||||
public override double ChargeLevel => Battery.ChargeLevel;
|
||||
|
||||
public override bool IsCharging => Battery.PowerSource != BatteryPowerSource.Battery;
|
||||
|
Reference in New Issue
Block a user