commit | 1fba5d21e59faf3cb68dae7492bbfd57b3c0f9a3 | [log] [tgz] |
---|---|---|
author | Nancy Chen <nancychen@google.com> | Fri Jul 17 16:37:54 2015 +0000 |
committer | Android (Google) Code Review <android-gerrit@google.com> | Fri Jul 17 16:37:54 2015 +0000 |
tree | cb0d206ab54a558d5601cd4873060bad8de84e14 | |
parent | 0cb6eefabdaa11687bed977c51b459d53adcf2fc [diff] | |
parent | a71f005cb01eb6992eda8dba65678fd4d6648297 [diff] |
Merge "Fix crash when deleting voicemail." into mnc-dev
diff --git a/src/com/android/phone/vvm/omtp/fetch/VoicemailFetchedCallback.java b/src/com/android/phone/vvm/omtp/fetch/VoicemailFetchedCallback.java index bf5befd..eb6a175 100644 --- a/src/com/android/phone/vvm/omtp/fetch/VoicemailFetchedCallback.java +++ b/src/com/android/phone/vvm/omtp/fetch/VoicemailFetchedCallback.java
@@ -61,7 +61,8 @@ outputStream.write(inputBytes); } } catch (IOException e) { - Log.e(TAG, "Error writing to file: ", e); + Log.w(TAG, String.format("File not found for %s", mUri)); + return; } finally { IoUtils.closeQuietly(outputStream); }
diff --git a/src/com/android/phone/vvm/omtp/imap/ImapHelper.java b/src/com/android/phone/vvm/omtp/imap/ImapHelper.java index 1d20dbd..d68a36b 100644 --- a/src/com/android/phone/vvm/omtp/imap/ImapHelper.java +++ b/src/com/android/phone/vvm/omtp/imap/ImapHelper.java
@@ -194,6 +194,11 @@ } message = mFolder.getMessage(uid); VoicemailPayload voicemailPayload = fetchVoicemailPayload(message); + + if (voicemailPayload == null) { + return false; + } + callback.setVoicemailContent(voicemailPayload); return true; } catch (MessagingException e) {