diff options
| author | Yu Ping Hu <yph@google.com> | 2013-05-08 10:36:04 -0700 |
|---|---|---|
| committer | Yu Ping Hu <yph@google.com> | 2013-05-08 10:42:31 -0700 |
| commit | f55972ecd838f7362837070248ad5ca5abaa2af8 (patch) | |
| tree | 0173f40e092ae94bff9f32767dcb1da5c4ef8d07 /src | |
| parent | 968a2fe7805756ef6aa1f10f71306e865b9f7f09 (diff) | |
| download | android_packages_apps_Email-f55972ecd838f7362837070248ad5ca5abaa2af8.tar.gz android_packages_apps_Email-f55972ecd838f7362837070248ad5ca5abaa2af8.tar.bz2 android_packages_apps_Email-f55972ecd838f7362837070248ad5ca5abaa2af8.zip | |
Add more sync status callbacks.
Change-Id: I77e8b122474d5240ad5aaed7556471263a05e6de
Diffstat (limited to 'src')
| -rw-r--r-- | src/com/android/email/provider/EmailProvider.java | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index fcaa021ed..0e36a4692 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -1569,20 +1569,33 @@ public class EmailProvider extends ContentProvider { // First handle sync status callbacks. if (TextUtils.equals(method, SYNC_STATUS_CALLBACK_METHOD)) { final int syncStatusType = extras.getInt(EmailServiceStatus.SYNC_STATUS_TYPE); - switch (syncStatusType) { - case EmailServiceStatus.SYNC_STATUS_TYPE_MAILBOX: - try { - mServiceCallback.syncMailboxStatus( + try { + switch (syncStatusType) { + case EmailServiceStatus.SYNC_STATUS_TYPE_MAILBOX: + mServiceCallback.syncMailboxStatus( + extras.getLong(EmailServiceStatus.SYNC_STATUS_ID), + extras.getInt(EmailServiceStatus.SYNC_STATUS_CODE), + extras.getInt(EmailServiceStatus.SYNC_STATUS_PROGRESS)); + break; + case EmailServiceStatus.SYNC_STATUS_TYPE_SEND_MESSAGE: + mServiceCallback.sendMessageStatus( extras.getLong(EmailServiceStatus.SYNC_STATUS_ID), + extras.getString(EmailServiceStatus.SYNC_STATUS_SUBJECT), extras.getInt(EmailServiceStatus.SYNC_STATUS_CODE), extras.getInt(EmailServiceStatus.SYNC_STATUS_PROGRESS)); - } catch (RemoteException re) { - // This can't actually happen but I have to pacify the compiler. - } - break; - default: - LogUtils.e(TAG, "Sync status received of unknown type %d", syncStatusType); - break; + break; + case EmailServiceStatus.SYNC_STATUS_TYPE_MAILBOX_LIST: + mServiceCallback.syncMailboxListStatus( + extras.getLong(EmailServiceStatus.SYNC_STATUS_ID), + extras.getInt(EmailServiceStatus.SYNC_STATUS_CODE), + extras.getInt(EmailServiceStatus.SYNC_STATUS_PROGRESS)); + break; + default: + LogUtils.e(TAG, "Sync status received of unknown type %d", syncStatusType); + break; + } + } catch (RemoteException re) { + // This can't actually happen but I have to pacify the compiler. } return null; } |
