void waitUntilUpdateDBDone(){
synchronized (mPendingWritesLock) {
    while (sUpdatingDB) {
      try {
        Thread.sleep(100);
      }
 catch (      InterruptedException e) {
      }
    }
    return;
  }
}

void waitUntilUpdateDBDone ( ) { synchronized ( mPendingWritesLock ) { while ( sUpdatingDB ) { try { Thread . sleep ( 100 ) ; } catch ( InterruptedException e ) { } } return ; } }
used for testing purpose
