lowbat-handler: disable poweroff by lowbattery at emul 40/263040/1 accepted/tizen/unified/20210827.122234 submit/tizen/20210825.082622 submit/tizen/20210827.022603
authorYoungjae Cho <y0.cho@samsung.com>
Wed, 25 Aug 2021 03:09:54 +0000 (20:09 -0700)
committerYoungjae Cho <y0.cho@samsung.com>
Wed, 25 Aug 2021 03:09:54 +0000 (20:09 -0700)
Change-Id: I5bc023f9f52885678da75570423f207e76f1943b
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
src/battery/lowbat-handler.c

index 66c324f..e771b44 100644 (file)
@@ -152,6 +152,11 @@ static int power_execute(void *data)
 {
        static const struct device_ops *ops;
 
+       if (is_emulator()) {
+               CRITICAL_LOG("Poweroff by lowbattery is disabled at emulator.");
+               return 0;
+       }
+
        FIND_DEVICE_INT(ops, POWER_OPS_NAME);
 
        return ops->execute(data);