java 1.6 compat and andriod tweaks