summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Hibdon <mhibdon@google.com>2014-05-21 12:16:24 -0700
committerMartin Hibdon <mhibdon@google.com>2014-05-21 12:18:29 -0700
commitcf2178c4fa61538f5a2f862fe3f9bc16b9f06ebb (patch)
tree1dfe41182c6922bc2f40464c1a250435a449825b
parent2fbd8c269c9e0c74b120e9d2ec498b0620b67c84 (diff)
downloadandroid_packages_apps_Email-cf2178c4fa61538f5a2f862fe3f9bc16b9f06ebb.tar.gz
android_packages_apps_Email-cf2178c4fa61538f5a2f862fe3f9bc16b9f06ebb.tar.bz2
android_packages_apps_Email-cf2178c4fa61538f5a2f862fe3f9bc16b9f06ebb.zip
Get rid of deleteAccountPIMData from IEmailService
This doesn't need to be part of the service because the implementation doesn't need to be different between any of the different protocols. Change-Id: Ifddf16dd3ccaf397029f08f6d4283d9a5630f717
-rw-r--r--emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java22
-rw-r--r--emailcommon/src/com/android/emailcommon/service/IEmailService.aidl3
-rw-r--r--src/com/android/email/provider/EmailProvider.java13
-rw-r--r--src/com/android/email/service/EmailServiceStub.java5
-rw-r--r--src/com/android/email/service/EmailServiceUtils.java4
5 files changed, 3 insertions, 44 deletions
diff --git a/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java b/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java
index e10fee5b6..ce8b05d21 100644
--- a/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java
+++ b/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java
@@ -248,28 +248,6 @@ public class EmailServiceProxy extends ServiceProxy implements IEmailService {
}
/**
- * 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
* specified account (including subfolders, as specified by the includeSubfolders parameter).
diff --git a/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl b/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl
index 7b9b4f4e7..aa4e68b33 100644
--- a/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl
+++ b/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl
@@ -53,7 +53,4 @@ 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);
}
diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java
index acd04b034..fa34c2dff 100644
--- a/src/com/android/email/provider/EmailProvider.java
+++ b/src/com/android/email/provider/EmailProvider.java
@@ -5947,17 +5947,10 @@ public class EmailProvider extends ContentProvider {
cv.putNull(AccountColumns.SYNC_KEY);
resolver.update(Account.CONTENT_URI, cv, Account.ID_SELECTION, accountIdArgs);
- // Delete PIM data (contacts, calendar), stop syncs, etc. if applicable
+ // Delete the account from the Android account manager.
+ // This will delete any contacts and calendar data, stop syncs, etc.
if (emailAddress != null) {
- final IEmailService service =
- EmailServiceUtils.getServiceForAccount(context, accountId);
- if (service != null) {
- try {
- service.deleteAccountPIMData(emailAddress);
- } catch (final RemoteException e) {
- // Can't do anything about this
- }
- }
+ AccountReconciler.reconcileAccounts(context);
}
}
diff --git a/src/com/android/email/service/EmailServiceStub.java b/src/com/android/email/service/EmailServiceStub.java
index cc7a3bfbe..f9d7e673b 100644
--- a/src/com/android/email/service/EmailServiceStub.java
+++ b/src/com/android/email/service/EmailServiceStub.java
@@ -381,11 +381,6 @@ public abstract class EmailServiceStub extends IEmailService.Stub implements IEm
}
@Override
- public void deleteAccountPIMData(final String emailAddress) throws RemoteException {
- AccountReconciler.reconcileAccounts(mContext);
- }
-
- @Override
public int searchMessages(long accountId, SearchParams params, long destMailboxId)
throws RemoteException {
// Not required
diff --git a/src/com/android/email/service/EmailServiceUtils.java b/src/com/android/email/service/EmailServiceUtils.java
index 7fb0e7dfc..dd091867f 100644
--- a/src/com/android/email/service/EmailServiceUtils.java
+++ b/src/com/android/email/service/EmailServiceUtils.java
@@ -680,10 +680,6 @@ public class EmailServiceUtils {
}
@Override
- public void deleteAccountPIMData(final String emailAddress) throws RemoteException {
- }
-
- @Override
public int searchMessages(long accountId, SearchParams params, long destMailboxId)
throws RemoteException {
return 0;