diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index 241f78786..faf568c95 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -18,10 +18,6 @@
-
-
-
-
@@ -319,7 +315,7 @@
android:enabled="true"
>
-
-
diff --git a/src/com/fsck/k9/activity/setup/AccountSetupBasics.java b/src/com/fsck/k9/activity/setup/AccountSetupBasics.java
index 0bde132a1..2c31e1920 100644
--- a/src/com/fsck/k9/activity/setup/AccountSetupBasics.java
+++ b/src/com/fsck/k9/activity/setup/AccountSetupBasics.java
@@ -18,7 +18,6 @@ import android.widget.CheckBox;
import android.widget.EditText;
import com.fsck.k9.*;
import com.fsck.k9.activity.K9Activity;
-import com.fsck.k9.helper.Contacts;
import com.fsck.k9.helper.Utility;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
@@ -134,17 +133,11 @@ public class AccountSetupBasics extends K9Activity
private String getOwnerName() {
String name = null;
try {
- name = Contacts.getInstance(this).getOwnerName();
+ name = getDefaultAccountName();
} catch (Exception e) {
- Log.e(K9.LOG_TAG, "Could not get owner name, using default account name", e);
- }
- if (name == null || name.length() == 0) {
- try {
- name = getDefaultAccountName();
- } catch (Exception e) {
- Log.e(K9.LOG_TAG, "Could not get default account name", e);
- }
+ Log.e(K9.LOG_TAG, "Could not get default account name", e);
}
+
if (name == null) {
name = "";
}
diff --git a/src/com/fsck/k9/helper/Contacts.java b/src/com/fsck/k9/helper/Contacts.java
index c42b2d43d..acf97d174 100644
--- a/src/com/fsck/k9/helper/Contacts.java
+++ b/src/com/fsck/k9/helper/Contacts.java
@@ -97,13 +97,6 @@ public abstract class Contacts {
mContentResolver = context.getContentResolver();
}
- /**
- * Get the name of the device's owner.
- *
- * @return The name of the owner if available. null, otherwise.
- */
- public abstract String getOwnerName();
-
/**
* Start the activity to add information to an existing contact or add a
* new one.
diff --git a/src/com/fsck/k9/helper/ContactsSdk3_4.java b/src/com/fsck/k9/helper/ContactsSdk3_4.java
index 5d0fbdcd2..c7addc83f 100644
--- a/src/com/fsck/k9/helper/ContactsSdk3_4.java
+++ b/src/com/fsck/k9/helper/ContactsSdk3_4.java
@@ -85,27 +85,6 @@ public class ContactsSdk3_4 extends com.fsck.k9.helper.Contacts {
mContext.startActivity(contactIntent);
}
- @Override
- public String getOwnerName() {
- String name = null;
- final Cursor c = mContentResolver.query(
- Uri.withAppendedPath(Contacts.People.CONTENT_URI, "owner"),
- new String[] {Contacts.ContactMethods.DISPLAY_NAME},
- null,
- null,
- null);
-
- if (c != null) {
- if (c.getCount() > 0) {
- c.moveToFirst();
- name = c.getString(0); // owner's display name
- }
- c.close();
- }
-
- return name;
- }
-
@Override
public boolean isInContacts(final String emailAddress) {
boolean result = false;
diff --git a/src/com/fsck/k9/helper/ContactsSdk5.java b/src/com/fsck/k9/helper/ContactsSdk5.java
index 40ae2768b..b77539c88 100644
--- a/src/com/fsck/k9/helper/ContactsSdk5.java
+++ b/src/com/fsck/k9/helper/ContactsSdk5.java
@@ -1,7 +1,5 @@
package com.fsck.k9.helper;
-import android.accounts.Account;
-import android.accounts.AccountManager;
import android.content.Context;
import android.content.Intent;
import android.database.Cursor;
@@ -87,22 +85,6 @@ public class ContactsSdk5 extends com.fsck.k9.helper.Contacts {
mContext.startActivity(contactIntent);
}
- @Override
- public String getOwnerName() {
- String name = null;
-
- // Get the name of the first account that has one.
- Account[] accounts = AccountManager.get(mContext).getAccounts();
- for (final Account account : accounts) {
- if (account.name != null) {
- name = account.name;
- break;
- }
- }
-
- return name;
- }
-
@Override
public boolean isInContacts(final String emailAddress) {
boolean result = false;