moved static device detection parts to DeviceUtils