[Android] Catch a more specific exception in HistoryWrapper.java.

The only possible exception that can be thrown here is IndexOutOfBoundsException. It's better to be more explicit in regards to exceptions.