public synchronized boolean readFromFile(Context context){
  try {
    readingLock.lock();
    TaskStorage newStorage=savingHelper.load(context,FILENAME,true);
    if (newStorage != null) {
      Log.d(DEBUG_TAG,"read saved state");
      tasks=newStorage.tasks;
      boxes=newStorage.boxes;
      dirty=false;
      return true;
    }
 else {
      Log.d(DEBUG_TAG,"saved state null");
      return false;
    }
  }
  finally {
    readingLock.unlock();
  }
}

public synchronized boolean readFromFile ( Context context ) { try { readingLock . lock ( ) ; TaskStorage newStorage = savingHelper . load ( context , FILENAME , true ) ; if ( newStorage != null ) { Log . d ( DEBUG_TAG , "read saved state" ) ; tasks = newStorage . tasks ; boxes = newStorage . boxes ; dirty = false ; return true ; } else { Log . d ( DEBUG_TAG , "saved state null" ) ; return false ; } } finally { readingLock . unlock ( ) ; } }
loads the storage data from the default storage file note : lock is acquired in logic before this is called
