diff --git a/uisimulator/common/powermgmt-sim.c b/uisimulator/common/powermgmt-sim.c index 41732c94a2..3430b1ea79 100644 --- a/uisimulator/common/powermgmt-sim.c +++ b/uisimulator/common/powermgmt-sim.c @@ -121,8 +121,14 @@ int _battery_voltage(void) #if CONFIG_CHARGING unsigned int power_input_status(void) { - return charger_input_state >= CHARGER_PLUGGED + unsigned int status = charger_input_state >= CHARGER_PLUGGED ? POWER_INPUT_CHARGER : POWER_INPUT_NONE; + +#ifdef HAVE_BATTERY_SWITCH + status |= POWER_INPUT_BATTERY; +#endif + + return status; } bool charging_state(void)