diff options
author | Walter Jang <wjang@google.com> | 2015-07-25 15:54:22 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-25 15:54:22 +0000 |
commit | 262b6fd102bb8db60ec0258c3ecc8fad72b3e872 (patch) | |
tree | a0440d4c659deffcf1f04b2795f4d5c377ae5461 | |
parent | d2a0b286b70830a56dc6588bb2fa78f4c9c776e1 (diff) | |
parent | f60da396778a1b7dbca5424fdee9c179f34cd010 (diff) | |
download | packages_apps_Contacts-262b6fd102bb8db60ec0258c3ecc8fad72b3e872.tar.gz packages_apps_Contacts-262b6fd102bb8db60ec0258c3ecc8fad72b3e872.tar.bz2 packages_apps_Contacts-262b6fd102bb8db60ec0258c3ecc8fad72b3e872.zip |
am f60da396: am 6a42c290: Merge "Delay AccountTypeManager init until we have the Contacts permission 1/2" into mnc-dev
* commit 'f60da396778a1b7dbca5424fdee9c179f34cd010':
Delay AccountTypeManager init until we have the Contacts permission 1/2
-rw-r--r-- | src/com/android/contacts/ContactsApplication.java | 6 |
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; } |