Improve Android code