Don't show toast while canceling purchase
This commit is contained in:
parent
9da7469c17
commit
c486f903e2
1 changed files with 5 additions and 1 deletions
|
@ -34,6 +34,8 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static net.osmand.plus.inapp.util.IabHelper.IABHELPER_USER_CANCELLED;
|
||||||
|
|
||||||
public class InAppPurchaseHelper {
|
public class InAppPurchaseHelper {
|
||||||
// Debug tag, for logging
|
// Debug tag, for logging
|
||||||
private static final String TAG = InAppPurchaseHelper.class.getSimpleName();
|
private static final String TAG = InAppPurchaseHelper.class.getSimpleName();
|
||||||
|
@ -588,7 +590,9 @@ public class InAppPurchaseHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.isFailure()) {
|
if (result.isFailure()) {
|
||||||
complain("Error purchasing: " + result);
|
if (result.getResponse() != IABHELPER_USER_CANCELLED) {
|
||||||
|
complain("Error purchasing: " + result);
|
||||||
|
}
|
||||||
notifyDismissProgress(activeTask);
|
notifyDismissProgress(activeTask);
|
||||||
notifyError(activeTask, "Error purchasing: " + result);
|
notifyError(activeTask, "Error purchasing: " + result);
|
||||||
stop(true);
|
stop(true);
|
||||||
|
|
Loading…
Reference in a new issue