what-the-bank/sources/com/huawei/hms/hatool/b1.java

80 lines
1.8 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.huawei.hms.hatool;
import android.text.TextUtils;
import org.json.JSONObject;
/* loaded from: classes2.dex */
public class b1 implements o1 {
private String a;
private String b;
private String c;
private String d;
private String e;
private String f;
public void f(String str) {
this.e = str;
}
public void e(String str) {
this.f = str;
}
public void d(String str) {
this.a = str;
}
public JSONObject d() {
JSONObject a = a();
a.put("properties", n.b(this.c, o0.d().a()));
return a;
}
public void c(String str) {
this.d = str;
}
public String c() {
return this.a;
}
public void b(String str) {
this.b = str;
}
public String b() {
return this.d;
}
public void a(JSONObject jSONObject) {
if (jSONObject == null) {
return;
}
this.b = jSONObject.optString("event");
this.c = n.a(jSONObject.optString("properties"), o0.d().a());
this.a = jSONObject.optString("type");
this.d = jSONObject.optString("eventtime");
this.e = jSONObject.optString("event_session_name");
this.f = jSONObject.optString("first_session_event");
}
public void a(String str) {
this.c = str;
}
@Override // com.huawei.hms.hatool.o1
public JSONObject a() {
JSONObject jSONObject = new JSONObject();
jSONObject.put("type", this.a);
jSONObject.put("eventtime", this.d);
jSONObject.put("event", this.b);
jSONObject.put("event_session_name", this.e);
jSONObject.put("first_session_event", this.f);
if (TextUtils.isEmpty(this.c)) {
return null;
}
jSONObject.put("properties", new JSONObject(this.c));
return jSONObject;
}
}