Code example for ContentProviderClient

Methods: release

0
    protected void releaseProviders() { 
      try { 
        clientsProvider.release();
      } catch (Exception e) {}
      try { 
        tabsProvider.release();
      } catch (Exception e) {}
    } 
 
 
    public FennecTabsRepositorySession(Repository repository, Context context) throws NoContentProviderException {
      super(repository);
      clientsProvider = getContentProvider(context, BrowserContract.Clients.CONTENT_URI);
      try { 
        tabsProvider = getContentProvider(context, BrowserContract.Tabs.CONTENT_URI);
      } catch (NoContentProviderException e) {
        clientsProvider.release();
        throw e;
      } catch (Exception e) {
        clientsProvider.release();
        // Oh, Java.