Update Activity.java

Bugfixes