Report error immediately on manual sync w/ no connectivity
Bug: 3408873
Change-Id: I78feb2bcd281f409180abe0acb498d753fee6687
diff --git a/src/com/android/exchange/ExchangeService.java b/src/com/android/exchange/ExchangeService.java
index 9a6c78c..40946a0 100644
--- a/src/com/android/exchange/ExchangeService.java
+++ b/src/com/android/exchange/ExchangeService.java
@@ -345,6 +345,16 @@
ExchangeService exchangeService = INSTANCE;
if (exchangeService == null) return;
checkExchangeServiceServiceRunning();
+ if (sConnectivityHold && userRequest) {
+ try {
+ // UI is expecting the callbacks....
+ sCallbackProxy.syncMailboxStatus(mailboxId, EmailServiceStatus.IN_PROGRESS, 0);
+ sCallbackProxy.syncMailboxStatus(mailboxId, EmailServiceStatus.CONNECTION_ERROR,
+ 0);
+ } catch (RemoteException ignore) {
+ }
+ return;
+ }
Mailbox m = Mailbox.restoreMailboxWithId(exchangeService, mailboxId);
if (m == null) return;
if (m.mType == Mailbox.TYPE_OUTBOX) {