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

Commit 6a42c290 authored by Walter Jang's avatar Walter Jang Committed by Android (Google) Code Review
Browse files

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

parents a31f4f86 dccfa943
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;
        }