summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Jang <wjang@google.com>2015-07-25 16:21:55 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-25 16:21:55 +0000
commita9effe053c537fce962fa7804c0c0a0052e20246 (patch)
tree4b495ea28edbbcfe46e8b2d7adbb07334536a75f
parent3a57ad016fc274c6061625f5f36493c83c25ac55 (diff)
parent262b6fd102bb8db60ec0258c3ecc8fad72b3e872 (diff)
downloadpackages_apps_Contacts-a9effe053c537fce962fa7804c0c0a0052e20246.tar.gz
packages_apps_Contacts-a9effe053c537fce962fa7804c0c0a0052e20246.tar.bz2
packages_apps_Contacts-a9effe053c537fce962fa7804c0c0a0052e20246.zip
am 262b6fd1: am f60da396: am 6a42c290: Merge "Delay AccountTypeManager init until we have the Contacts permission 1/2" into mnc-dev
* commit '262b6fd102bb8db60ec0258c3ecc8fad72b3e872': Delay AccountTypeManager init until we have the Contacts permission 1/2
-rw-r--r--src/com/android/contacts/ContactsApplication.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/contacts/ContactsApplication.java b/src/com/android/contacts/ContactsApplication.java
index eae078e3e..798614c74 100644
--- a/src/com/android/contacts/ContactsApplication.java
+++ b/src/com/android/contacts/ContactsApplication.java
@@ -130,10 +130,12 @@ public final class ContactsApplication extends Application {
protected Void doInBackground(Void... params) {
final Context context = ContactsApplication.this;
- // Warm up the preferences, the account type manager and the contacts provider.
+ // Warm up the preferences and the contacts provider. We delay initialization
+ // of the account type manager because we may not have the contacts group permission
+ // (and thus not have the get accounts permission).
PreferenceManager.getDefaultSharedPreferences(context);
- AccountTypeManager.getInstance(context);
getContentResolver().getType(ContentUris.withAppendedId(Contacts.CONTENT_URI, 1));
+
return null;
}