Reopen message filestream before retrying w/o SmartReply/Forward
* If the original message being replied to/forwarded has been
deleted before the reply/forward is sent, we get a 150 status
from EAS 14 and retry without the "smart" feature
* However, we weren't resetting the message file stream before
the retry, causing the send to fail
* Trivial fix, moving the file stream opening into the loop
Bug: 5832490
Change-Id: I522eff5c0b0478dc1c288e54a978eddb529e848a
diff --git a/src/com/android/exchange/EasOutboxService.java b/src/com/android/exchange/EasOutboxService.java
index 6f7a27f..4466925 100644
--- a/src/com/android/exchange/EasOutboxService.java
+++ b/src/com/android/exchange/EasOutboxService.java
@@ -366,11 +366,11 @@
boolean isEas14 = (Double.parseDouble(mAccount.mProtocolVersion) >=
Eas.SUPPORTED_PROTOCOL_EX2010_DOUBLE);
- // Get an input stream to our temporary file and create an entity with it
- FileInputStream fileStream = new FileInputStream(tmpFile);
- long fileLength = tmpFile.length();
-
while (true) {
+ // Get an input stream to our temporary file and create an entity with it
+ FileInputStream fileStream = new FileInputStream(tmpFile);
+ long fileLength = tmpFile.length();
+
// The type of entity depends on whether we're using EAS 14
HttpEntity inputEntity;
// For EAS 14, we need to save the wbxml tag we're using