コード例 #1
0
 private void runPendingRequests() {
   BillingRequest request;
   int maxStartId = -1;
   while ((request = mPendingRequests.peek()) != null) {
     if (mService != null) {
       runRequest(request);
       mPendingRequests.remove();
       if (maxStartId < request.getStartId()) {
         maxStartId = request.getStartId();
       }
     } else {
       bindMarketBillingService();
       return;
     }
   }
   if (maxStartId >= 0) {
     stopSelf(maxStartId);
   }
 }