Fixes to Android utility functions.