Add pushModify to IEmailService.
This call lets the service know that the push settings for an account have changed. Change-Id: I7ed41853df6af6762c80283a2a3510ce41551657 (cherry picked from commit 446136a2278652c627068ecddff534de1ad431ab)
This commit is contained in:
parent
c90680915d
commit
701134953e
@ -314,6 +314,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;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -389,6 +389,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);
|
||||
|
@ -694,5 +694,9 @@ public class EmailServiceUtils {
|
||||
@Override
|
||||
public void sendMail(long accountId) throws RemoteException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pushModify(long accountId) throws RemoteException {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user