Android: various bug fixes to prevent NullPointerExceptions
Merge pull request #1323 from mfleisz/andr_fixes

Android: various bug fixes to prevent NullPointerExceptions