Fix broken unit test.
- Looks like recent changes have made the setDataSource() followed by
prepare() on a MediaPlayer that has an illegal data source start
throwing an IllegalStateException in the prepare() method rather than
an IOException in the setDataSource().
- This change just says that if anything goes wrong with the background
prepare work, rather than specifically an IOException, then we will
show the user that we failed to play.
Bug: 5266872
Change-Id: Idb6e7ea13f24996abb5da93d2979d3d0bdbf5cbb
diff --git a/src/com/android/contacts/voicemail/VoicemailPlaybackPresenter.java b/src/com/android/contacts/voicemail/VoicemailPlaybackPresenter.java
index f8e497d..becc133 100644
--- a/src/com/android/contacts/voicemail/VoicemailPlaybackPresenter.java
+++ b/src/com/android/contacts/voicemail/VoicemailPlaybackPresenter.java
@@ -313,7 +313,7 @@
mPlayer.setAudioStreamType(PLAYBACK_STREAM);
mPlayer.prepare();
return null;
- } catch (IOException e) {
+ } catch (Exception e) {
return e;
}
}