2021-07-24 02:37:17 +00:00
|
|
|
package com.android.billingclient.api;
|
|
|
|
|
|
|
|
import androidx.annotation.NonNull;
|
|
|
|
import c.d.a.a.p;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
/* compiled from: com.android.billingclient:billing@@3.0.3 */
|
|
|
|
public class BillingFlowParams {
|
|
|
|
public boolean a;
|
|
|
|
public String b;
|
|
|
|
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
2021-07-28 07:39:21 +00:00
|
|
|
public String f1547c;
|
2021-07-24 02:37:17 +00:00
|
|
|
public String d;
|
|
|
|
public String e;
|
|
|
|
public int f = 0;
|
|
|
|
public ArrayList<SkuDetails> g;
|
|
|
|
public boolean h;
|
|
|
|
|
|
|
|
/* compiled from: com.android.billingclient:billing@@3.0.3 */
|
|
|
|
public static class a {
|
|
|
|
public String a;
|
|
|
|
public String b;
|
|
|
|
|
|
|
|
/* renamed from: c reason: collision with root package name */
|
2021-07-28 07:39:21 +00:00
|
|
|
public String f1548c;
|
2021-07-24 02:37:17 +00:00
|
|
|
public int d = 0;
|
|
|
|
public ArrayList<SkuDetails> e;
|
|
|
|
|
|
|
|
@NonNull
|
|
|
|
public BillingFlowParams a() {
|
|
|
|
ArrayList<SkuDetails> arrayList = this.e;
|
|
|
|
if (arrayList == null || arrayList.isEmpty()) {
|
|
|
|
throw new IllegalArgumentException("SkuDetails must be provided.");
|
|
|
|
}
|
|
|
|
ArrayList<SkuDetails> arrayList2 = this.e;
|
|
|
|
int size = arrayList2.size();
|
|
|
|
int i = 0;
|
|
|
|
while (i < size) {
|
|
|
|
int i2 = i + 1;
|
|
|
|
if (arrayList2.get(i) != null) {
|
|
|
|
i = i2;
|
|
|
|
} else {
|
|
|
|
throw new IllegalArgumentException("SKU cannot be null.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.e.size() > 1) {
|
|
|
|
SkuDetails skuDetails = this.e.get(0);
|
|
|
|
String e = skuDetails.e();
|
|
|
|
ArrayList<SkuDetails> arrayList3 = this.e;
|
|
|
|
int size2 = arrayList3.size();
|
|
|
|
for (int i3 = 0; i3 < size2; i3++) {
|
|
|
|
SkuDetails skuDetails2 = arrayList3.get(i3);
|
|
|
|
if (!e.equals("play_pass_subs") && !skuDetails2.e().equals("play_pass_subs") && !e.equals(skuDetails2.e())) {
|
|
|
|
throw new IllegalArgumentException("SKUs should have the same type.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String f = skuDetails.f();
|
|
|
|
ArrayList<SkuDetails> arrayList4 = this.e;
|
|
|
|
int size3 = arrayList4.size();
|
|
|
|
for (int i4 = 0; i4 < size3; i4++) {
|
|
|
|
SkuDetails skuDetails3 = arrayList4.get(i4);
|
|
|
|
if (!e.equals("play_pass_subs") && !skuDetails3.e().equals("play_pass_subs") && !f.equals(skuDetails3.f())) {
|
|
|
|
throw new IllegalArgumentException("All SKUs must have the same package name.");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
BillingFlowParams billingFlowParams = new BillingFlowParams(null);
|
|
|
|
billingFlowParams.a = true ^ this.e.get(0).f().isEmpty();
|
|
|
|
billingFlowParams.b = this.a;
|
|
|
|
billingFlowParams.e = null;
|
2021-07-28 07:39:21 +00:00
|
|
|
billingFlowParams.f1547c = this.b;
|
|
|
|
billingFlowParams.d = this.f1548c;
|
2021-07-24 02:37:17 +00:00
|
|
|
billingFlowParams.f = this.d;
|
|
|
|
billingFlowParams.g = this.e;
|
|
|
|
billingFlowParams.h = false;
|
|
|
|
return billingFlowParams;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public BillingFlowParams() {
|
|
|
|
}
|
|
|
|
|
|
|
|
public /* synthetic */ BillingFlowParams(p pVar) {
|
|
|
|
}
|
|
|
|
}
|