|
|
@ -506,19 +506,28 @@ public class ActivityBilling extends ActivityBase implements PurchasesUpdatedLis
|
|
|
|
if (result == null)
|
|
|
|
if (result == null)
|
|
|
|
message = stage;
|
|
|
|
message = stage;
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
message = getBillingResponseText(result);
|
|
|
|
|
|
|
|
|
|
|
|
String debug = result.getDebugMessage();
|
|
|
|
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
|
|
|
|
// https://developer.android.com/reference/com/android/billingclient/api/BillingClient.BillingResponse#service_disconnected
|
|
|
|
if (result.getResponseCode() == BillingClient.BillingResponseCode.SERVICE_DISCONNECTED)
|
|
|
|
if (result.getResponseCode() == BillingClient.BillingResponseCode.SERVICE_DISCONNECTED)
|
|
|
|
retry(60);
|
|
|
|
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)
|
|
|
|
for (IBillingListener listener : listeners)
|
|
|
|
listener.onError(message);
|
|
|
|
listener.onError(message);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static String getBillingResponseText(BillingResult result) {
|
|
|
|
private static String getBillingResponseText(BillingResult result) {
|
|
|
|