Android has a sophisticated algorithm for line breaking, including hyphenation. It's similar to that of InDesign (both were strongly inspired by the Knuth-Plass algorithm used by TeX), but tuned for mobile use. In particular, it's pretty shy about adding hyphens, but if a well-placed hyphen will prevent a two-line sentence from spilling to three (in which the last word is by itself), it will do so fairly aggressively. I'm quite proud of that.
Unfortunately, I don't have a good writeup of that, but some of the details are in this ATypI talk[1].
[1]: https://www.youtube.com/watch?v=L8LD0BM-Vjk