mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Remove setters, cache CreatePowerStatus() and use a dummy LocalPowerStatus class in test scene
This commit is contained in:
@ -21,7 +21,6 @@ namespace osu.Android
|
||||
: base(null)
|
||||
{
|
||||
gameActivity = activity;
|
||||
PowerStatus = new AndroidPowerStatus();
|
||||
}
|
||||
|
||||
public override Version AssemblyVersion
|
||||
@ -76,8 +75,12 @@ namespace osu.Android
|
||||
|
||||
protected override UpdateManager CreateUpdateManager() => new SimpleUpdateManager();
|
||||
|
||||
public class AndroidPowerStatus : PowerStatus
|
||||
protected override PowerStatus CreatePowerStatus() => new AndroidPowerStatus();
|
||||
|
||||
private class AndroidPowerStatus : PowerStatus
|
||||
{
|
||||
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