package p138.p176.p177.p242.p265.p266;

import android.app.ActivityManager;
import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import p138.p176.p177.p242.p246.p253.C4312;
import p138.p176.p177.p242.p258.p263.C4658;

/* JADX INFO: renamed from: ދ.ހ.֏.ހ.ބ.֏.ة, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public final class C4875 {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final /* synthetic */ C4943 f14674;

    public C4875(C4943 c4943) {
        this.f14674 = c4943;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m8201() {
        this.f14674.mo8008();
        C4874 c4874M8168 = this.f14674.m8168();
        if (((C4312) this.f14674.f14588.f15022) == null) {
            throw null;
        }
        if (c4874M8168.m8196(System.currentTimeMillis())) {
            this.f14674.m8168().f14661.m8204(true);
            ActivityManager.RunningAppProcessInfo runningAppProcessInfo = new ActivityManager.RunningAppProcessInfo();
            ActivityManager.getMyMemoryState(runningAppProcessInfo);
            if (runningAppProcessInfo.importance == 100) {
                this.f14674.mo8165().f14452.m8034("Detected application was in foreground");
                if (((C4312) this.f14674.f14588.f15022) == null) {
                    throw null;
                }
                m8203(System.currentTimeMillis(), false);
            }
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final void m8202(long j, boolean z) {
        this.f14674.mo8008();
        this.f14674.m8481();
        if (this.f14674.m8168().m8196(j)) {
            this.f14674.m8168().f14661.m8204(true);
        }
        this.f14674.m8168().f14665.m8317(j);
        if (this.f14674.m8168().f14661.m8205()) {
            m8203(j, z);
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final void m8203(long j, boolean z) {
        this.f14674.mo8008();
        if (this.f14674.f14588.m8495()) {
            this.f14674.m8168().f14665.m8317(j);
            if (((C4312) this.f14674.f14588.f15022) == null) {
                throw null;
            }
            this.f14674.mo8165().f14452.m8035("Session started, time", Long.valueOf(SystemClock.elapsedRealtime()));
            Long lValueOf = Long.valueOf(j / 1000);
            this.f14674.m8058().m7974("auto", "_sid", lValueOf, j);
            this.f14674.m8168().f14661.m8204(false);
            Bundle bundle = new Bundle();
            bundle.putLong("_sid", lValueOf.longValue());
            if (this.f14674.f14588.f15015.m8177(C4915.f14898) && z) {
                bundle.putLong("_aib", 1L);
            }
            this.f14674.m8058().m7969("auto", "_s", j, bundle);
            if (C4658.m7795() && this.f14674.f14588.f15015.m8177(C4915.f14903)) {
                String strM8083 = this.f14674.m8168().f14670.m8083();
                if (TextUtils.isEmpty(strM8083)) {
                    return;
                }
                Bundle bundle2 = new Bundle();
                bundle2.putString("_ffr", strM8083);
                this.f14674.m8058().m7969("auto", "_ssr", j, bundle2);
            }
        }
    }
}
