Counter does not match actual sent SMS count
Created by: sindastra
Bug description
The counter does not match the actual amount of SMS that get sent out. The first SMS count is set to 63 characters for one SMS, which produces what seems to be a 158 characters long base 64 encoded string and thus really just one SMS.
But if I go over 63, it'll count 114 characters per SMS and stating that 2 SMS will be sent. But if I send an SMS with 64 characters it turns into 3 actual base 64 encoded SMS. The counter is not counting properly it seems.
Edit:
The counter for unencrypted SMS seems off too, counting 160 characters per SMS at first and then switching to 153 characters for any further SMS.
How to reproduce
- Send an SMS with 63 characters in Silence and observe the counter and then the amount of SMS that will be received in a generic SMS app. It should be just one as indicated.
- Send and SMS with 64 characters in Silence and observe how the counter jumps to 114 characters left and stating 2 SMS will be sent. Observe how many will be received in a generic SMS app. In my case it was 3.
- The more you type, the further away the counter seems to be from the actual SMS count.
Device info
- Device: OnePlus 3
- Android version: 7.0
- Silence version and build ID: 0.14.8 - 9c73379c from Google Play Store
Additional
I found this, in case it helps: https://github.com/SilenceIM/Silence/commit/c15ad97909db724117e9ddd4ea464a0b3bca0e2f