예제 #1
0
 private boolean queueQuery(
     int start, int end, Time goToTime, String searchQuery, int queryType, long id) {
   QuerySpec queryData = new QuerySpec(queryType);
   queryData.goToTime = new Time(goToTime); // Creates a new time reference per QuerySpec.
   queryData.start = start;
   queryData.end = end;
   queryData.searchQuery = searchQuery;
   queryData.id = id;
   return queueQuery(queryData);
 }
예제 #2
0
 private boolean queueQuery(QuerySpec queryData) {
   queryData.searchQuery = mSearchQuery;
   Boolean queuedQuery;
   synchronized (mQueryQueue) {
     queuedQuery = false;
     Boolean doQueryNow = mQueryQueue.isEmpty();
     mQueryQueue.add(queryData);
     queuedQuery = true;
     if (doQueryNow) {
       doQuery(queryData);
     }
   }
   return queuedQuery;
 }