package com.google.android.play.core.integrity;

import C3.A;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import com.google.android.gms.tasks.Task;
import com.google.android.gms.tasks.Tasks;

/* JADX INFO: loaded from: classes3.dex */
abstract class y {

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

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private final long f13710c;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    private boolean f13712e;

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private final A f13708a = new A("IntegrityDialogWrapper");

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private final Object f13711d = new Object();

    public y(String str, long j4) {
        this.f13709b = str;
        this.f13710c = j4;
    }

    public final Task a(Activity activity, int i6) {
        synchronized (this.f13711d) {
            try {
                if (this.f13712e) {
                    return Tasks.forResult(0);
                }
                this.f13712e = true;
                A a6 = this.f13708a;
                Object[] objArr = {Integer.valueOf(i6)};
                a6.getClass();
                if (Log.isLoggable("PlayCore", 3)) {
                    Log.d("PlayCore", A.c(a6.f702a, "checkAndShowDialog(%s)", objArr));
                }
                Bundle bundle = new Bundle();
                bundle.putInt("dialog.intent.type", i6);
                bundle.putString("package.name", this.f13709b);
                bundle.putInt("playcore.integrity.version.major", 1);
                bundle.putInt("playcore.integrity.version.minor", 3);
                bundle.putInt("playcore.integrity.version.patch", 0);
                bundle.putLong("request.token.sid", this.f13710c);
                return b(activity, bundle);
            } catch (Throwable th) {
                throw th;
            }
        }
    }

    public abstract Task b(Activity activity, Bundle bundle);
}
