From 8103f960d0c0469d67652afd616e9924687aa139 Mon Sep 17 00:00:00 2001 From: Yu Ping Hu Date: Tue, 25 Feb 2014 18:07:07 -0800 Subject: [PATCH] Add sync to IEmailService. This supports the EasService design. Yes, I just removed a startSync function from this interface last month. No, I didn't quite know at the time that I'd be adding one back. :) Change-Id: I19d9c7838473d8982560764fdba0056cba03d132 (cherry picked from commit 4a5b11d650ff6bd79da1dfecc137af3433ce6ca8) --- .../com/android/emailcommon/service/EmailServiceProxy.java | 4 ++++ .../src/com/android/emailcommon/service/IEmailService.aidl | 3 +++ src/com/android/email/service/EmailServiceStub.java | 4 ++++ src/com/android/email/service/EmailServiceUtils.java | 7 ++++++- 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java b/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java index 3c5721a6b..e10fee5b6 100644 --- a/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java +++ b/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java @@ -330,6 +330,10 @@ public class EmailServiceProxy extends ServiceProxy implements IEmailService { }, "sendMail"); } + @Override + public void sync(final long accountId, final boolean updateFolderList, + final int mailboxType, final long[] folders) {} + @Override public IBinder asBinder() { return null; diff --git a/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl b/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl index bb4041e13..7b9b4f4e7 100644 --- a/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl +++ b/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl @@ -21,6 +21,7 @@ import com.android.emailcommon.provider.HostAuth; import com.android.emailcommon.provider.Account; import com.android.emailcommon.service.IEmailServiceCallback; import com.android.emailcommon.service.SearchParams; + import android.os.Bundle; interface IEmailService { @@ -31,6 +32,8 @@ interface IEmailService { boolean background); oneway void updateFolderList(long accountId); + void sync(long accountId, boolean updateFolderList, int mailboxType, in long[] foldersToSync); + // Push-related functionality. // Notify the service that the push configuration has changed for an account. diff --git a/src/com/android/email/service/EmailServiceStub.java b/src/com/android/email/service/EmailServiceStub.java index b679620bb..cb13a0f29 100644 --- a/src/com/android/email/service/EmailServiceStub.java +++ b/src/com/android/email/service/EmailServiceStub.java @@ -394,6 +394,10 @@ public abstract class EmailServiceStub extends IEmailService.Stub implements IEm LogUtils.e(Logging.LOG_TAG, "pushModify invalid for account type for %d", accountId); } + @Override + public void sync(final long accountId, final boolean updateFolderList, + final int mailboxType, final long[] folders) {} + @Override public void sendMail(long accountId) throws RemoteException { sendMailImpl(mContext, accountId); diff --git a/src/com/android/email/service/EmailServiceUtils.java b/src/com/android/email/service/EmailServiceUtils.java index df3b3daeb..a162d2e92 100644 --- a/src/com/android/email/service/EmailServiceUtils.java +++ b/src/com/android/email/service/EmailServiceUtils.java @@ -47,7 +47,6 @@ import android.provider.SyncStateContract; import android.text.TextUtils; import com.android.email.R; -import com.android.emailcommon.Api; import com.android.emailcommon.Logging; import com.android.emailcommon.provider.Account; import com.android.emailcommon.provider.EmailContent; @@ -698,5 +697,11 @@ public class EmailServiceUtils { @Override public void pushModify(long accountId) throws RemoteException { } + + @Override + public void sync(final long accountId, final boolean updateFolderList, + final int mailboxType, final long[] folders) { + } + } }