public static void awaitDataReady(){
synchronized (mDbHelperLock) {
    if (mDbHelper == null) {
      try {
        mDbHelperLock.wait();
      }
 catch (      InterruptedException e) {
        e.printStackTrace();
      }
    }
  }
}

public static void awaitDataReady ( ) { synchronized ( mDbHelperLock ) { if ( mDbHelper == null ) { try { mDbHelperLock . wait ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } } }
this method blocks until the underlying data store is ready . be sure to call this on a background thread . this is helpful because queries to this contentprovider will return null if this component hasn ' t yet performed initialization after cacheword becomes ready .
