/** * Creates an {@link Inventory} object related to this {@link Checkout} instance. The created * {@link Inventory} will use a fall-back {@link Inventory} if it is returned from * {@link Billing.Configuration#getFallbackInventory(Checkout, Executor)} method. * * @return inventory */ @Nonnull public Inventory makeInventory() { Check.isMainThread(); synchronized (mLock) { checkIsNotStopped(); } final Inventory inventory; final Inventory fallbackInventory = mBilling.getConfiguration().getFallbackInventory(this, mOnLoadExecutor); if (fallbackInventory == null) { inventory = new CheckoutInventory(this); } else { inventory = new FallingBackInventory(this, fallbackInventory); } return inventory; }