diff options
author | Yu Ping Hu <yph@google.com> | 2013-11-15 09:57:19 -0800 |
---|---|---|
committer | Yu Ping Hu <yph@google.com> | 2013-11-15 13:13:48 -0800 |
commit | 7f0b7b0d66b40ec3004fbc329dbd34a801608b92 (patch) | |
tree | 4fd2b241bb3987cfc002843e7dc264b8a0640723 /src/com/android/exchange/eas/EasFolderSync.java | |
parent | ab9c23bcf59ec01a3dd79000b7b4136791a9db65 (diff) | |
download | Exchange-7f0b7b0d66b40ec3004fbc329dbd34a801608b92.tar.gz |
Handle provisioning errors for all sync operations.
Bug: 11247743
Change-Id: I095022380276141cbf29a6b7855a75d698ff5630
Diffstat (limited to 'src/com/android/exchange/eas/EasFolderSync.java')
-rw-r--r-- | src/com/android/exchange/eas/EasFolderSync.java | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/com/android/exchange/eas/EasFolderSync.java b/src/com/android/exchange/eas/EasFolderSync.java index 696a4e72..1be9fe74 100644 --- a/src/com/android/exchange/eas/EasFolderSync.java +++ b/src/com/android/exchange/eas/EasFolderSync.java @@ -155,24 +155,11 @@ public class EasFolderSync extends EasOperation { @Override protected int handleResponse(final EasResponse response, final SyncResult syncResult) - throws IOException { + throws IOException, CommandStatusException { if (!response.isEmpty()) { - try { - new FolderSyncParser(mContext, mContext.getContentResolver(), - response.getInputStream(), mAccount, mStatusOnly).parse(); - } catch (final CommandStatusException e) { - final int status = e.mStatus; - LogUtils.e(LOG_TAG, "EasFolderSync.handleResponse status %d", status); - if (CommandStatusException.CommandStatus.isNeedsProvisioning(status)) { - return RESULT_PROVISIONING_ERROR; - } - if (CommandStatusException.CommandStatus.isDeniedAccess(status)) { - return RESULT_FORBIDDEN; - } - return RESULT_OTHER_FAILURE; - } + new FolderSyncParser(mContext, mContext.getContentResolver(), + response.getInputStream(), mAccount, mStatusOnly).parse(); } - return RESULT_OK; } |