|
|
|
@ -506,19 +506,28 @@ public class ActivityBilling extends ActivityBase implements PurchasesUpdatedLis
|
|
|
|
|
if (result == null)
|
|
|
|
|
message = stage;
|
|
|
|
|
else {
|
|
|
|
|
message = getBillingResponseText(result);
|
|
|
|
|
|
|
|
|
|
String debug = result.getDebugMessage();
|
|
|
|
|
message = getBillingResponseText(result) + (debug == null ? "" : " " + debug) + " " + stage;
|
|
|
|
|
if (!TextUtils.isEmpty(debug))
|
|
|
|
|
message += " " + debug;
|
|
|
|
|
|
|
|
|
|
message += " " + stage;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EntityLog.log(this, message);
|
|
|
|
|
|
|
|
|
|
if (result != null) {
|
|
|
|
|
// https://developer.android.com/reference/com/android/billingclient/api/BillingClient.BillingResponse#service_disconnected
|
|
|
|
|
if (result.getResponseCode() == BillingClient.BillingResponseCode.SERVICE_DISCONNECTED)
|
|
|
|
|
retry(60);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
EntityLog.log(this, message);
|
|
|
|
|
if (result.getResponseCode() == BillingClient.BillingResponseCode.USER_CANCELED)
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (result.getResponseCode() != BillingClient.BillingResponseCode.USER_CANCELED)
|
|
|
|
|
for (IBillingListener listener : listeners)
|
|
|
|
|
listener.onError(message);
|
|
|
|
|
for (IBillingListener listener : listeners)
|
|
|
|
|
listener.onError(message);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private static String getBillingResponseText(BillingResult result) {
|
|
|
|
|