[Android] Fix a null pointer exception.