Skip to content

Commit

Permalink
refs #32 correct fix for cache initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
serggl committed Oct 16, 2014
1 parent 9b8b894 commit 71cb66d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion library/src/com/anjlab/android/iab/v3/BillingCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ private void load() {
for (String entry : loadString(getPreferencesCacheKey(), "").split(Pattern.quote(ENTRY_DELIMITER))) {
if (!TextUtils.isEmpty(entry)) {
String[] parts = entry.split(Pattern.quote(LINE_DELIMITER));
if (parts.length > 2)
if (parts.length > 2) {
data.put(parts[0], new PurchaseInfo(parts[1], parts[2]));
} else if (parts.length > 1) {
data.put(parts[0], new PurchaseInfo(parts[1], null));
}
}
}
version = getCurrentVersion();
Expand Down
4 changes: 2 additions & 2 deletions library/src/com/anjlab/android/iab/v3/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ class Constants {
public static final String RESPONSE_CODE = "RESPONSE_CODE";
public static final String DETAILS_LIST = "DETAILS_LIST";
public static final String PRODUCTS_LIST = "ITEM_ID_LIST";
public static final String INAPP_PURCHASE_DATA_LIST = "INAPP_PURCHASE_DATA_LIST";
public static final String INAPP_DATA_SIGNATURE_LIST = "INAPP_DATA_SIGNATURE_LIST";
public static final String BUY_INTENT = "BUY_INTENT";
public static final String INAPP_PURCHASE_DATA_LIST = "INAPP_PURCHASE_DATA_LIST";
public static final String INAPP_PURCHASE_DATA = "INAPP_PURCHASE_DATA";
public static final String RESPONSE_INAPP_SIGNATURE = "INAPP_DATA_SIGNATURE";
public static final String INAPP_DATA_SIGNATURE_LIST = "INAPP_DATA_SIGNATURE_LIST";
public static final String RESPONSE_ORDER_ID = "orderId";
public static final String RESPONSE_PRODUCT_ID = "productId";
public static final String RESPONSE_TYPE = "type";
Expand Down

0 comments on commit 71cb66d

Please sign in to comment.