[Android] Set timeout when attempting to connect; Fix minor bugs