The problem here appears to be that your sort comparator function is completely broken. It doesn’t even *look* like a comparator function. The interesting question isn’t “why doesn’t it work on your dad’s phone?” but “why does it ever work?”.