Fixing hasFlash deprecated method