private boolean tryRemoteDownload(){
  if (System.currentTimeMillis() < expireTime) {
    tryRepoCnt++;
    return tryRepoCnt <= MAX_REPO_RETRIES;
  }
 else {
    expireTime=System.currentTimeMillis() + TIMEOUT_INTERVAL;
    tryRepoCnt=1;
    return true;
  }
}

private boolean tryRemoteDownload ( ) { if ( System . currentTimeMillis ( ) < expireTime ) { tryRepoCnt ++ ; return tryRepoCnt <= MAX_REPO_RETRIES ; } else { expireTime = System . currentTimeMillis ( ) + TIMEOUT_INTERVAL ; tryRepoCnt = 1 ; return true ; } }
method used to try remote download if the method is called the first time , since expiretime is initialized as 0 , set expiretime to now ( ) + 5 mins and set counter to 1 . if current time is less than expiretime , increment counter and return true if counter not greater than maximal try count if current time is not less than expiretime , reset timer and set counter to 1
