From c5f5a14ae9095f76d8e8c411cfd8f8e0e8970aa2 Mon Sep 17 00:00:00 2001 From: Martin Hibdon Date: Wed, 21 May 2014 20:41:37 +0000 Subject: Revert "Get rid of deleteAccountPIMData from IEmailService" This reverts commit cf2178c4fa61538f5a2f862fe3f9bc16b9f06ebb. Change-Id: I9b05dd7a29a2d2edf64529ca28e2305737a43115 --- .../emailcommon/service/EmailServiceProxy.java | 22 ++++++++++++++++++++++ .../android/emailcommon/service/IEmailService.aidl | 3 +++ 2 files changed, 25 insertions(+) (limited to 'emailcommon') diff --git a/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java b/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java index ce8b05d21..e10fee5b6 100644 --- a/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java +++ b/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java @@ -247,6 +247,28 @@ public class EmailServiceProxy extends ServiceProxy implements IEmailService { }, "sendMeetingResponse"); } + /** + * Request the service to delete the account's PIM (personal information management) data. This + * data includes any data that is 1) associated with the account and 2) created/stored by the + * service or its sync adapters and 3) not stored in the EmailProvider database (e.g. contact + * and calendar information). + * + * @param emailAddress the email address for the account whose data should be deleted + */ + @Override + public void deleteAccountPIMData(final String emailAddress) throws RemoteException { + setTask(new ProxyTask() { + @Override + public void run() throws RemoteException { + mService.deleteAccountPIMData(emailAddress); + } + }, "deleteAccountPIMData"); + // This can be called when deleting accounts. After making this call, the caller will + // ask for account reconciliation, which will kill the processes. We wait for completion + // to avoid the race. + waitForCompletion(); + } + /** * Search for messages given a query string. The string is interpreted as the logical AND of * terms separated by white space. The search is performed on the specified mailbox in the diff --git a/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl b/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl index aa4e68b33..7b9b4f4e7 100644 --- a/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl +++ b/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl @@ -53,4 +53,7 @@ interface IEmailService { // Service control operations (i.e. does not generate a client-server message). oneway void setLogging(int on); + + // Needs to get moved into Email since this is NOT a client-server command. + void deleteAccountPIMData(String emailAddress); } -- cgit v1.2.3