Permalink
Browse files

Catch IAB bug

  • Loading branch information...
1 parent 61fc5ff commit b11124363048a545ed0321afb7ded7a8104d55fc @hpique hpique committed Apr 22, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 AndroidBillingLibrary/src/net/robotmedia/billing/BillingRequest.java
@@ -235,7 +235,14 @@ protected void processOkResponse(Bundle response) {
public long run(IMarketBillingService mService) throws RemoteException {
final Bundle request = makeRequestBundle();
addParams(request);
- final Bundle response = mService.sendBillingRequest(request);
+ final Bundle response;
+ try {
+ response = mService.sendBillingRequest(request);
+ } catch (NullPointerException e) {
+ Log.e(this.getClass().getSimpleName(), "Known IAB bug. See: http://code.google.com/p/marketbilling/issues/detail?id=25", e);
+ return IGNORE_REQUEST_ID;
+ }
+
if (validateResponse(response)) {
processOkResponse(response);
return response.getLong(KEY_REQUEST_ID, IGNORE_REQUEST_ID);

0 comments on commit b111243

Please sign in to comment.