/**
  * Lists all transactions of the specified item, stored locally.
  *
  * @param context
  * @param itemId id of the item whose transactions will be returned.
  * @return list of transactions.
  */
 public static List<Transaction> getTransactions(Context context, String itemId) {
   final byte[] salt = getSalt();
   itemId = salt != null ? Security.obfuscate(context, salt, itemId) : itemId;
   List<Transaction> transactions = TransactionManager.getTransactions(context, itemId);
   unobfuscate(context, transactions);
   return transactions;
 }
 static void storeTransaction(Context context, Transaction t) {
   final Transaction t2 = t.clone();
   obfuscate(context, t2);
   TransactionManager.addTransaction(context, t2);
 }
 /**
  * Returns true if the specified item has been registered as purchased in local memory, false
  * otherwise. Also note that the item might have been purchased in another installation, but not
  * yet registered in this one.
  *
  * @param context
  * @param itemId item id.
  * @return true if the specified item is purchased, false otherwise.
  */
 public static boolean isPurchased(Context context, String itemId) {
   final byte[] salt = getSalt();
   itemId = salt != null ? Security.obfuscate(context, salt, itemId) : itemId;
   return TransactionManager.isPurchased(context, itemId);
 }
 /**
  * Lists all transactions stored locally, including cancellations and refunds.
  *
  * @param context
  * @return list of transactions.
  */
 public static List<Transaction> getTransactions(Context context) {
   List<Transaction> transactions = TransactionManager.getTransactions(context);
   unobfuscate(context, transactions);
   return transactions;
 }