Ah, I hadn't seen that you had your own PR ready. To be clear: you mention you've implemented it for 1.2, do you mean it's already included in your recently uploaded 1.2 version?so does that differ in any way from how I implemented it for yoshino in 1.2 ( https://github.com/whatawurst/android_device_sony_yoshino-common/pull/97/commits/9d2880207619776820ddc85dc9cf6b56d1a723a4 )? from my limited tests it also stops charging properly.
My version is very similar (adapted from here). Only difference is that you have a separate config/init/ueventd.yoshino.rc file, I added the entry from there directly to the existing ueventd.rc .
Yesterday I noticed a a smaller bug in the hal topic (the start time and the target time were interpreted as UTC time, causing the actual times to be 2 hours off in my UTC+2 region), it's fixed now, just tested it.
Still I'm not sure if the feature works completely as intended on our device, e.g. I think there's a separate red battery statusbar indicator icon which is supposed to be shown when charging is suspended. In our case the icon just stays white with charging bolt (even though it has actually paused charging). That icon did appear when I configured to use
/sys/class/power_supply/battery/charging_enabled
instead of
/sys/class/power_supply/battery/smart_charging_interruption
But using that node charging started jittering when the limit was reached (charging control turning charging off, and charging service turning it back on because a charger is connected).
Anyway, the statusbar icon is hopefully just cosmetic, most important is we can now stretch the life of our older batteries a bit further!
edit: smart_charging_activation->smart_charging_interruption