Code example for ProviderInfo

        mWriteAccessLatch = new CountDownLatch(1);
        // Set up the sub-provider for handling profiles. 
        mProfileProvider = getProfileProvider();
        mProfileProvider.setDbHelperToSerializeOn(mContactsHelper, CONTACTS_DB_TAG);
        ProviderInfo profileInfo = new ProviderInfo();
        profileInfo.readPermission = "android.permission.READ_PROFILE";
        profileInfo.writePermission = "android.permission.WRITE_PROFILE";
        mProfileProvider.attachInfo(getContext(), profileInfo);
        mProfileHelper = mProfileProvider.getDatabaseHelper(getContext());
        return true; 
    public ProfileProvider getProfileProvider() { 
        return new ProfileProvider(this);
    public void onBegin() { 
Stop searching for code, let great code find you!  Add Codota to your java IDE