On this line you're again destroying the overlay without correctly resetting the appropriate property to null.
In this case it doesn't matter, because activity.cancel() makes the app exit. Rather than half-way destroying the overlay, I think it would be better to just remove the line and just call activity.cancel().