package com.apm.insight.b;

import android.os.SystemClock;
import androidx.media3.common.C;
import com.apm.insight.runtime.m;

/* JADX INFO: loaded from: classes.dex */
public final class c {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private static long f5033b;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private final b f5034a;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private boolean f5035c = false;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private final Runnable f5036d;

    public c(b bVar) {
        Runnable runnable = new Runnable() { // from class: com.apm.insight.b.c.1
            @Override // java.lang.Runnable
            public final void run() throws Throwable {
                if (c.this.f5035c) {
                    return;
                }
                c.this.f5034a.d();
                long unused = c.f5033b = SystemClock.uptimeMillis();
                if (com.apm.insight.runtime.i.a().b()) {
                    m.a().a(c.this.f5036d, 500L);
                } else {
                    m.a().a(c.this.f5036d, 500L);
                }
                com.apm.insight.runtime.b.a(c.f5033b);
            }
        };
        this.f5036d = runnable;
        this.f5034a = bVar;
        m.a().a(runnable, 5000L);
    }

    public final void b() {
        this.f5035c = true;
    }

    public static boolean c() {
        return SystemClock.uptimeMillis() - f5033b <= C.DEFAULT_SEEK_FORWARD_INCREMENT_MS;
    }

    public final void a() {
        if (this.f5035c) {
            return;
        }
        m.a().a(this.f5036d, 5000L);
    }
}
