summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Jang <wjang@google.com>2015-07-25 00:59:47 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-07-25 00:59:47 +0000
commitf60da396778a1b7dbca5424fdee9c179f34cd010 (patch)
tree9ebbb17c95fc5d1dac661f0cd9ca92cfc17ff8ea
parenta6f2048f4b5003a1dae63a6b60b26d7b3a9a914c (diff)
parent6a42c290cdb554a0d6b52d3176ed558b12d24c51 (diff)
downloadandroid_packages_apps_Contacts-f60da396778a1b7dbca5424fdee9c179f34cd010.tar.gz
android_packages_apps_Contacts-f60da396778a1b7dbca5424fdee9c179f34cd010.tar.bz2
android_packages_apps_Contacts-f60da396778a1b7dbca5424fdee9c179f34cd010.zip
am 6a42c290: Merge "Delay AccountTypeManager init until we have the Contacts permission 1/2" into mnc-dev
* commit '6a42c290cdb554a0d6b52d3176ed558b12d24c51': 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;
}