ContentProvider shutdown - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for ContentProvider shutdown method.

This code example shows how to use the following methods:shutdown
     * Calls {@link android.content.ContentProvider#shutdown()} on the 
     * {@link android.content.ContentProvider} represented by mProvider. 
     */ 
    @Override 
    protected void tearDown() throws Exception { 
        mProvider.shutdown();
        super.tearDown(); 
    } 
 
    /** 
     * Gets the {@link MockContentResolver2} created by this class during initialization. You 
     * must use the methods of this resolver to access the provider under test. 
     * 
     * @return A {@link MockContentResolver2} instance. 
     */ 
    public MockContentResolver2 getMockContentResolver() { 
        return mResolver;
    } 
 
    /** 
5
CodeRank
This code example shows how to use the following methods:shutdown
     * Calls {@link android.content.ContentProvider#shutdown()} on the 
     * {@link android.content.ContentProvider} represented by mProvider. 
     */ 
    @Override 
    protected void tearDown() throws Exception { 
        mProvider.shutdown();
        super.tearDown(); 
    } 
 
    /** 
     * Gets the {@link MockContentResolver2} created by this class during initialization. You 
     * must use the methods of this resolver to access the provider under test. 
     * 
     * @return A {@link MockContentResolver2} instance. 
     */ 
    public MockContentResolver2 getMockContentResolver() { 
        return mResolver;
    } 
 
    /** 
5
CodeRank
This code example shows how to use the following methods:shutdown
	 */ 
	@TargetApi(11) 
	@Override 
	protected void tearDown() throws Exception { 
		if (android.os.Build.VERSION.SDK_INT >= 11) {
			mProvider.shutdown();
		} 
		super.tearDown(); 
	} 
 
	/** 
	 * Gets the {@link MockContentResolver2} created by this class during initialization. You 
	 * must use the methods of this resolver to access the provider under test. 
	 * 
	 * @return A {@link MockContentResolver2} instance. 
	 */ 
	public MockContentResolver2 getMockContentResolver() { 
		return mResolver;
	} 
 
4
CodeRank
This code example shows how to use the following methods:shutdown
     * Calls {@link android.content.ContentProvider#shutdown()} on the 
     * {@link android.content.ContentProvider} represented by mProvider. 
     */ 
    @Override 
    protected void tearDown() throws Exception { 
        mProvider.shutdown();
        super.tearDown(); 
    } 
 
    /** 
     * Gets the {@link MockContentResolver2} created by this class during initialization. You 
     * must use the methods of this resolver to access the provider under test. 
     * 
     * @return A {@link MockContentResolver2} instance. 
     */ 
    public MockContentResolver2 getMockContentResolver() { 
        return mResolver;
    } 
 
    /** 
4
CodeRank
This code example shows how to use the following methods:shutdown
        return mProviderContext;
    } 
 
    @Override 
    protected void tearDown() throws Exception { 
        mContentProvider.shutdown();
    } 
 
    protected void parseSubscribers() throws Exception { 
        final Resources res = getResources(Locale.ENGLISH);
        final Document doc = getMockData(R.raw.subscribers, Locale.ENGLISH);
        final ContentResolver cr = getMockContentResolver();
 
        new SubscribersHandler(res, "n.yonkuru@gmail.com").parseAndApply(doc, cr);
    } 
 
    public Resources getResources(Locale locale) {
        return getResources(getContext(), locale);
    } 
 
4
CodeRank
shutdown Method Overview
Implement this to shut down the ContentProvider instance.
See Code Examples for other Android ContentProvider Methods: