From 4a5b11d650ff6bd79da1dfecc137af3433ce6ca8 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 --- .../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 a41f17d1e..eb5e15a74 100644 --- a/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java +++ b/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java @@ -326,6 +326,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 bd278ed84..3055afe9d 100644 --- a/src/com/android/email/service/EmailServiceStub.java +++ b/src/com/android/email/service/EmailServiceStub.java @@ -390,6 +390,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 2d70a2a19..03deb4adb 100644 --- a/src/com/android/email/service/EmailServiceUtils.java +++ b/src/com/android/email/service/EmailServiceUtils.java @@ -46,7 +46,6 @@ import android.provider.ContactsContract.RawContacts; import android.provider.SyncStateContract; 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; @@ -672,5 +671,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) { + } + } }