what-the-bank/sources/com/kofax/mobile/sdk/g/j.java

263 lines
10 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.kofax.mobile.sdk.g;
import com.kofax.kmc.kut.utilities.appstats.AppStatsClientEventLogger;
import com.kofax.kmc.kut.utilities.appstats.AppStatsEnvSettings;
import com.kofax.kmc.kut.utilities.appstats.AppStatsSessionEvent;
import com.kofax.kmc.kut.utilities.appstats.dao.AppStatsDao;
import com.kofax.kmc.kut.utilities.appstats.dao.EnvironmentEventDao;
import com.kofax.kmc.kut.utilities.appstats.dao.ErrorLogEventDao;
import com.kofax.kmc.kut.utilities.appstats.dao.SessEventDao;
import com.kofax.kmc.kut.utilities.appstats.type.AppStatsDsOpType;
import com.kofax.kmc.kut.utilities.appstats.type.AppStatsEventIDType;
import com.kofax.kmc.kut.utilities.error.ErrorInfo;
/* loaded from: classes3.dex */
public class j extends com.kofax.mobile.sdk.g.a {
private static final String TAG = "j";
private final String yi = "BeginSession";
private final String yj = "SessionCompleteSuccess";
private final String yk = "SessionCompleteFailed";
private ErrorLogEventDao yl = null;
private EnvironmentEventDao ym = null;
private SessEventDao yn = null;
private String yo = "";
/* loaded from: classes3.dex */
static class a {
public static final j yx = new j();
private a() {
}
}
public static j iM() {
return a.yx;
}
public void a(AppStatsEventIDType appStatsEventIDType, ErrorInfo errorInfo) {
a(appStatsEventIDType, new AppStatsClientEventLogger(this, errorInfo) { // from class: com.kofax.mobile.sdk.g.j.1
final ErrorInfo yp;
final j yq;
{
this.yq = this;
this.yp = errorInfo;
}
@Override // com.kofax.kmc.kut.utilities.appstats.AppStatsClientEventLogger
public void logEvent(AppStatsEventIDType appStatsEventIDType2) {
if (AnonymousClass6.xL[appStatsEventIDType2.ordinal()] == 1) {
this.yq.a(appStatsEventIDType2);
this.yq.d(this.yp);
}
}
});
}
/* renamed from: com.kofax.mobile.sdk.g.j$6, reason: invalid class name */
/* loaded from: classes3.dex */
static /* synthetic */ class AnonymousClass6 {
static final int[] xL;
static {
int[] iArr = new int[AppStatsEventIDType.values().length];
xL = iArr;
try {
iArr[AppStatsEventIDType.APP_STATS_ERROR_LOG_EVENT.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
xL[AppStatsEventIDType.APP_STATS_ENVIRONMENT_CHANGED_EVENT.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
xL[AppStatsEventIDType.APP_STATS_BEGIN_SESSION_EVENT.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
xL[AppStatsEventIDType.APP_STATS_LOG_SESSION_EVENT.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
try {
xL[AppStatsEventIDType.APP_STATS_END_SESSION_EVENT.ordinal()] = 5;
} catch (NoSuchFieldError unused5) {
}
}
}
public void a(AppStatsEventIDType appStatsEventIDType, AppStatsEnvSettings appStatsEnvSettings) {
a(appStatsEventIDType, new AppStatsClientEventLogger(this, appStatsEnvSettings) { // from class: com.kofax.mobile.sdk.g.j.2
final j yq;
final AppStatsEnvSettings yr;
{
this.yq = this;
this.yr = appStatsEnvSettings;
}
@Override // com.kofax.kmc.kut.utilities.appstats.AppStatsClientEventLogger
public void logEvent(AppStatsEventIDType appStatsEventIDType2) {
if (AnonymousClass6.xL[appStatsEventIDType2.ordinal()] == 2) {
this.yq.a(appStatsEventIDType2);
this.yq.a(this.yr);
}
}
});
}
public void a(AppStatsEventIDType appStatsEventIDType, String str, String str2) {
a(appStatsEventIDType, new AppStatsClientEventLogger(this, str, str2) { // from class: com.kofax.mobile.sdk.g.j.3
final j yq;
final String ys;
final String yt;
{
this.yq = this;
this.ys = str;
this.yt = str2;
}
@Override // com.kofax.kmc.kut.utilities.appstats.AppStatsClientEventLogger
public void logEvent(AppStatsEventIDType appStatsEventIDType2) {
if (AnonymousClass6.xL[appStatsEventIDType2.ordinal()] == 3) {
this.yq.a(appStatsEventIDType2);
this.yq.q(this.ys, this.yt);
}
}
});
}
public void a(AppStatsEventIDType appStatsEventIDType, AppStatsSessionEvent appStatsSessionEvent) {
a(appStatsEventIDType, new AppStatsClientEventLogger(this, appStatsSessionEvent) { // from class: com.kofax.mobile.sdk.g.j.4
final j yq;
final AppStatsSessionEvent yu;
{
this.yq = this;
this.yu = appStatsSessionEvent;
}
@Override // com.kofax.kmc.kut.utilities.appstats.AppStatsClientEventLogger
public void logEvent(AppStatsEventIDType appStatsEventIDType2) {
if (AnonymousClass6.xL[appStatsEventIDType2.ordinal()] == 4) {
this.yq.a(appStatsEventIDType2);
this.yq.a(this.yu);
}
}
});
}
public void a(AppStatsEventIDType appStatsEventIDType, boolean z, String str) {
a(appStatsEventIDType, new AppStatsClientEventLogger(this, z, str) { // from class: com.kofax.mobile.sdk.g.j.5
final j yq;
final boolean yv;
final String yw;
{
this.yq = this;
this.yv = z;
this.yw = str;
}
@Override // com.kofax.kmc.kut.utilities.appstats.AppStatsClientEventLogger
public void logEvent(AppStatsEventIDType appStatsEventIDType2) {
if (AnonymousClass6.xL[appStatsEventIDType2.ordinal()] == 5) {
this.yq.a(appStatsEventIDType2);
this.yq.a(this.yv, this.yw);
}
}
});
}
/* JADX INFO: Access modifiers changed from: private */
public void d(ErrorInfo errorInfo) {
String errMsg = errorInfo.getErrMsg();
if (!errorInfo.getErrCause().isEmpty()) {
StringBuilder sb = new StringBuilder();
sb.append(errMsg);
sb.append(" (Cause: ");
sb.append(errorInfo.getErrCause());
sb.append(")");
errMsg = sb.toString();
}
ErrorLogEventDao errorLogEventDao = new ErrorLogEventDao();
this.yl = errorLogEventDao;
errorLogEventDao.setErrorTime(this.asFriend.currentEventTime());
this.yl.setErrorCode(errorInfo.getErr());
this.yl.setErrorDescription(errMsg);
this.yl.setErrorRecommendation(errorInfo.getErrDesc());
ErrorLogEventDao errorLogEventDao2 = this.yl;
errorLogEventDao2.setSessionKey(errorLogEventDao2.getAppStatsSessionKey());
this.yl.setDsOperation(AppStatsDsOpType.APP_STATS_DS_INSERT);
a(new AppStatsDao[]{this.yl});
}
/* JADX INFO: Access modifiers changed from: private */
public void a(AppStatsEnvSettings appStatsEnvSettings) {
EnvironmentEventDao environmentEventDao = new EnvironmentEventDao();
this.ym = environmentEventDao;
environmentEventDao.setEnvTime(this.asFriend.currentEventTime());
this.ym.setDeviceID(appStatsEnvSettings.getEnvDeviceID(false));
this.ym.setManufacturer(appStatsEnvSettings.getEnvManufacturer(false));
this.ym.setModel(appStatsEnvSettings.getEnvModel(false));
this.ym.setMemory(appStatsEnvSettings.getEnvMemorySize(false));
this.ym.setOsVersion(appStatsEnvSettings.getEnvOsVersion(false));
this.ym.setLanguage(appStatsEnvSettings.getEnvLanguage(false));
this.ym.setSdkVersion(appStatsEnvSettings.getEnvSdkVersion(false));
this.ym.setTimeZone(appStatsEnvSettings.getEnvTimeZone(false));
this.ym.setCarrier(appStatsEnvSettings.getEnvCarrier(false));
this.ym.setOsName(appStatsEnvSettings.getEnvOsName(false));
a(new AppStatsDao[]{this.ym});
}
/* JADX INFO: Access modifiers changed from: private */
public void q(String str, String str2) {
SessEventDao sessEventDao = new SessEventDao();
this.yn = sessEventDao;
this.yo = sessEventDao.getId();
this.yn.setSessionKey(str);
this.yn.setCategory(str2);
this.yn.setType("BeginSession");
this.yn.setEventTime(Long.valueOf(this.asFriend.currentEventTime()));
this.yn.setResponse("");
this.yn.setDsOperation(AppStatsDsOpType.APP_STATS_DS_INSERT);
a(new AppStatsDao[]{this.yn});
}
/* JADX INFO: Access modifiers changed from: private */
public void a(AppStatsSessionEvent appStatsSessionEvent) {
SessEventDao sessEventDao = new SessEventDao();
this.yn = sessEventDao;
this.yo = sessEventDao.getId();
SessEventDao sessEventDao2 = this.yn;
sessEventDao2.setSessionKey(sessEventDao2.getAppStatsSessionKey());
SessEventDao sessEventDao3 = this.yn;
sessEventDao3.setCategory(sessEventDao3.getAppStatsCategory());
this.yn.setType(appStatsSessionEvent.getType());
this.yn.setEventTime(Long.valueOf(this.asFriend.currentEventTime()));
this.yn.setResponse(appStatsSessionEvent.getResponse());
this.yn.setDsOperation(AppStatsDsOpType.APP_STATS_DS_INSERT);
a(new AppStatsDao[]{this.yn});
}
/* JADX INFO: Access modifiers changed from: private */
public void a(boolean z, String str) {
SessEventDao sessEventDao = new SessEventDao();
this.yn = sessEventDao;
this.yo = sessEventDao.getId();
SessEventDao sessEventDao2 = this.yn;
sessEventDao2.setSessionKey(sessEventDao2.getAppStatsSessionKey());
SessEventDao sessEventDao3 = this.yn;
sessEventDao3.setCategory(sessEventDao3.getAppStatsCategory());
this.yn.setType(z ? "SessionCompleteSuccess" : "SessionCompleteFailed");
this.yn.setEventTime(Long.valueOf(this.asFriend.currentEventTime()));
this.yn.setResponse(str);
this.yn.setDsOperation(AppStatsDsOpType.APP_STATS_DS_INSERT);
a(new AppStatsDao[]{this.yn});
}
public String getLastSessionEventID() {
return this.yo;
}
}