am 3e8ff1a6: Add pushModify to IEmailService.

* commit '3e8ff1a647854eb818faf3a7140da3a98c2c196b':
  Add pushModify to IEmailService.
This commit is contained in:
Yu Ping Hu 2014-03-20 22:16:39 +00:00 committed by Android Git Automerger
commit b8df4a4982
4 changed files with 31 additions and 0 deletions

View File

@ -310,6 +310,21 @@ public class EmailServiceProxy extends ServiceProxy implements IEmailService {
}, "sendMail");
}
/**
* Request the service to refresh its push notification status (e.g. to start or stop receiving
* them, or to change which folders we want notifications for).
* @param accountId The account whose push settings to modify.
*/
@Override
public void pushModify(final long accountId) throws RemoteException {
setTask(new ProxyTask() {
@Override
public void run() throws RemoteException{
mService.pushModify(accountId);
}
}, "sendMail");
}
@Override
public IBinder asBinder() {
return null;

View File

@ -30,7 +30,14 @@ interface IEmailService {
oneway void loadAttachment(IEmailServiceCallback cb, long attachmentId, boolean background);
oneway void updateFolderList(long accountId);
// Push-related functionality.
// Notify the service that the push configuration has changed for an account.
void pushModify(long accountId);
// Other email operations.
// TODO: Decouple this call from HostAuth (i.e. use a dedicated data structure, or just pass
// the necessary strings directly).
Bundle validate(in HostAuth hostauth);
int searchMessages(long accountId, in SearchParams params, long destMailboxId);

View File

@ -385,6 +385,11 @@ public abstract class EmailServiceStub extends IEmailService.Stub implements IEm
return 0;
}
@Override
public void pushModify(long accountId) throws RemoteException {
LogUtils.e(Logging.LOG_TAG, "pushModify invalid for account type for %d", accountId);
}
@Override
public void sendMail(long accountId) throws RemoteException {
sendMailImpl(mContext, accountId);

View File

@ -668,5 +668,9 @@ public class EmailServiceUtils {
@Override
public void sendMail(long accountId) throws RemoteException {
}
@Override
public void pushModify(long accountId) throws RemoteException {
}
}
}