Minor tweaks to android reference code