Use a more comprehensive mechanism for testing whether a device needs hidpi images or not.
Refactor isMobile into capabilities.