View Single Post
nonsuch's Avatar
Posts: 584 | Thanked: 1,550 times | Joined on Sep 2019
#495
Originally Posted by hhaveri View Post
Hmm... no idea, but I'll check if I manage to reproduce the issue somehow. Charger state is currently read from /var/run/state/providers/udev/Battery/ChargerType. Should be quite straightforward but I don't know how reliable that source is.
With no charger connected, that file has no content.
After connecting to the Computer it still has no content - well, it takes as long as it took me to write this to change state, it's now 'usb'.

However, there's another file in that directory called 'IsCharging' - that one is '0' with no charger connected, and immediately changed to '1' with a charger connected.

The same happens when I disconnect the charger - 'IsCharging' changes to '0' immediately, 'ChargerType' takes longer to become empty again.

It's the same with a wall plug although the lag is shorter for 'ChargerType'.

Wouldn't 'IsCharging' be more reliable, since Situations doesn't differentiate between types of chargers anyhow?
________________________________________

Since I have your attention, one more question:

Erasing network cells seems to be taking as long as recording them.
In fact, atm it seems to be stuck on 5 cells (was 8).
Why? Isn't it just erasing files?
________________________________________

BTW, my Sailfish device is a Sony Xperia XA2.
________________________________________

Thank you for all the good work.
__________________
N900 in 2020
SFOS in 2021