@Nonnull private PurchaseFlow createPurchaseFlow(final int requestCode, @Nonnull RequestListener<Purchase> listener, boolean oneShot) { PurchaseFlow flow = mFlows.get(requestCode); if (flow != null) { throw new IllegalArgumentException("Purchase flow associated with requestCode=" + requestCode + " already exists"); } if (oneShot) { listener = new OneShotRequestListener(listener, requestCode); } flow = mBilling.createPurchaseFlow(makeIntentStarter(), requestCode, listener); mFlows.append(requestCode, flow); return flow; }