https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/js/sms.js#L1516