Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f60da396 authored by Walter Jang's avatar Walter Jang Committed by Android Git Automerger
Browse files

am 6a42c290: Merge "Delay AccountTypeManager init until we have the Contacts...

am 6a42c290: Merge "Delay AccountTypeManager init until we have the Contacts permission 1/2" into mnc-dev

* commit '6a42c290':
  Delay AccountTypeManager init until we have the Contacts permission 1/2
parents a6f2048f 6a42c290
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;
        }