diff --git a/src/com/fsck/k9/helper/Contacts.java b/src/com/fsck/k9/helper/Contacts.java index 6ce18caba..ec52d1824 100644 --- a/src/com/fsck/k9/helper/Contacts.java +++ b/src/com/fsck/k9/helper/Contacts.java @@ -2,7 +2,6 @@ package com.fsck.k9.helper; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; -import android.app.Activity; import android.content.ContentResolver; import android.content.Context; import android.database.Cursor; @@ -131,7 +130,7 @@ public abstract class Contacts * the instance also contains the (display) name of that * entity. */ - public abstract void createContact(Activity activity, Address email); + public abstract void createContact(Address email); /** * Check whether the provided email address belongs to one of the contacts. diff --git a/src/com/fsck/k9/helper/ContactsSdk3_4.java b/src/com/fsck/k9/helper/ContactsSdk3_4.java index a381c8dc6..7c602c003 100644 --- a/src/com/fsck/k9/helper/ContactsSdk3_4.java +++ b/src/com/fsck/k9/helper/ContactsSdk3_4.java @@ -65,7 +65,7 @@ public class ContactsSdk3_4 extends com.fsck.k9.helper.Contacts } @Override - public void createContact(final Activity activity, final Address email) + public void createContact(final Address email) { final Uri contactUri = Uri.fromParts("mailto", email.getAddress(), null); @@ -83,7 +83,7 @@ public class ContactsSdk3_4 extends com.fsck.k9.helper.Contacts contactIntent.putExtra(Contacts.Intents.Insert.NAME, senderPersonal); } - activity.startActivity(contactIntent); + mContext.startActivity(contactIntent); } @Override diff --git a/src/com/fsck/k9/helper/ContactsSdk5.java b/src/com/fsck/k9/helper/ContactsSdk5.java index 57afb8d82..afd8d111c 100644 --- a/src/com/fsck/k9/helper/ContactsSdk5.java +++ b/src/com/fsck/k9/helper/ContactsSdk5.java @@ -2,7 +2,6 @@ package com.fsck.k9.helper; import android.accounts.Account; import android.accounts.AccountManager; -import android.app.Activity; import android.content.Context; import android.content.Intent; import android.database.Cursor; @@ -69,7 +68,7 @@ public class ContactsSdk5 extends com.fsck.k9.helper.Contacts } @Override - public void createContact(final Activity activity, final Address email) + public void createContact(final Address email) { final Uri contactUri = Uri.fromParts("mailto", email.getAddress(), null); @@ -87,7 +86,7 @@ public class ContactsSdk5 extends com.fsck.k9.helper.Contacts contactIntent.putExtra(Intents.Insert.NAME, senderPersonal); } - activity.startActivity(contactIntent); + mContext.startActivity(contactIntent); } @Override