diff --git a/src/com/fsck/k9/helper/Contacts.java b/src/com/fsck/k9/helper/Contacts.java index 66cbe8335..7f3e6e441 100644 --- a/src/com/fsck/k9/helper/Contacts.java +++ b/src/com/fsck/k9/helper/Contacts.java @@ -85,6 +85,7 @@ public abstract class Contacts { protected Context mContext; protected ContentResolver mContentResolver; + protected Boolean mHasContactPicker; /** * Constructor @@ -192,10 +193,10 @@ public abstract class Contacts { * @return True, if the device supports picking contacts. False, otherwise. */ public boolean hasContactPicker() { - if (mContext.getPackageManager().queryIntentActivities(contactPickerIntent(), 0).size() > 0) { - return true; - } else { - return false; + if (mHasContactPicker == null) { + mHasContactPicker = (mContext.getPackageManager(). + queryIntentActivities(contactPickerIntent(), 0).size() > 0); } + return mHasContactPicker; } }