Tidy weird android-specific code...