Fixes related to Android build

The recent refactoring broke the Android build,
this Pull Requests fixes things related to that.