Change isPhone()/isMobile() to isTouch()
Currently we have a isPhone()
/isMobile()
utility which just looks at the useragent
. We use these utilities around touch specific UI. And nowadays even laptops can have touch enabled.
Determining whether a device is a phone and determining whether a device has touch capability are separate concerns and we should separate them.
This StackOverflow answer sounds pretty sufficient for isTouch()
/hasTouch()
type utility method, https://stackoverflow.com/a/4819886/796832