summaryrefslogtreecommitdiffstats
path: root/emailcommon
diff options
context:
space:
mode:
authorMartin Hibdon <mhibdon@google.com>2014-07-14 18:06:20 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-14 17:08:38 +0000
commitbb391e8018a56f27bb2025accf5171491e4b2a14 (patch)
tree9e2a6decc5ff31cd0241f9639c9217c5f55b2025 /emailcommon
parent6cf6b5c2921e3dacf389d11f17971742d03e2ad3 (diff)
parent7afbeee47e1a82680c815f2fb8cfdba32d6b0b84 (diff)
downloadandroid_packages_apps_Email-bb391e8018a56f27bb2025accf5171491e4b2a14.tar.gz
android_packages_apps_Email-bb391e8018a56f27bb2025accf5171491e4b2a14.tar.bz2
android_packages_apps_Email-bb391e8018a56f27bb2025accf5171491e4b2a14.zip
Merge "Update IEmailService" into ub-mail-master
Diffstat (limited to 'emailcommon')
-rw-r--r--emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java23
-rw-r--r--emailcommon/src/com/android/emailcommon/service/EmailServiceVersion.java10
-rw-r--r--emailcommon/src/com/android/emailcommon/service/IEmailService.aidl5
3 files changed, 33 insertions, 5 deletions
diff --git a/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java b/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java
index eefa5743d..1c1f0ebc9 100644
--- a/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java
+++ b/emailcommon/src/com/android/emailcommon/service/EmailServiceProxy.java
@@ -33,7 +33,7 @@ import java.io.IOException;
/**
* The EmailServiceProxy class provides a simple interface for the UI to call into the various
- * EmailService classes (e.g. ExchangeService for EAS). It wraps the service connect/disconnect
+ * EmailService classes (e.g. EasService for EAS). It wraps the service connect/disconnect
* process so that the caller need not be concerned with it.
*
* Use the class like this:
@@ -256,11 +256,11 @@ public class EmailServiceProxy extends ServiceProxy implements IEmailService {
* @param emailAddress the email address for the account whose data should be deleted
*/
@Override
- public void deleteAccountPIMData(final String emailAddress) throws RemoteException {
+ public void deleteExternalAccountPIMData(final String emailAddress) throws RemoteException {
setTask(new ProxyTask() {
@Override
public void run() throws RemoteException {
- mService.deleteAccountPIMData(emailAddress);
+ mService.deleteExternalAccountPIMData(emailAddress);
}
}, "deleteAccountPIMData");
// This can be called when deleting accounts. After making this call, the caller will
@@ -352,4 +352,21 @@ public class EmailServiceProxy extends ServiceProxy implements IEmailService {
public IBinder asBinder() {
return null;
}
+
+ public int getApiVersion() {
+ setTask(new ProxyTask() {
+ @Override
+ public void run() throws RemoteException{
+ mReturn = mService.getApiVersion();
+ }
+ }, "getApiVersion");
+ waitForCompletion();
+ if (mReturn == null) {
+ // This occurs if there is a timeout or remote exception. Is not expected to happen.
+ LogUtils.wtf(TAG, "failed to get api version");
+ return -1;
+ } else {
+ return (Integer) mReturn;
+ }
+ }
}
diff --git a/emailcommon/src/com/android/emailcommon/service/EmailServiceVersion.java b/emailcommon/src/com/android/emailcommon/service/EmailServiceVersion.java
new file mode 100644
index 000000000..8a959a1ce
--- /dev/null
+++ b/emailcommon/src/com/android/emailcommon/service/EmailServiceVersion.java
@@ -0,0 +1,10 @@
+package com.android.emailcommon.service;
+
+public class EmailServiceVersion {
+ // Initial version
+ public static final int L_PLATFORM = 1;
+
+ public static final int CURRENT = L_PLATFORM;
+
+ // For each following version, add a comment explaining what apis where added or removed.
+}
diff --git a/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl b/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl
index f2212bbde..a6f49dc6c 100644
--- a/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl
+++ b/emailcommon/src/com/android/emailcommon/service/IEmailService.aidl
@@ -60,6 +60,7 @@ interface IEmailService {
// trigger the service to reload the flags.
oneway void setLogging(int flags);
- // Needs to get moved into Email since this is NOT a client-server command.
- void deleteAccountPIMData(String emailAddress);
+ void deleteExternalAccountPIMData(String emailAddress);
+
+ int getApiVersion();
}