Update MainActivity.java

Fix if-else statement.