package oj;

import android.app.Activity;
import android.content.Context;
import android.os.Handler;
import android.os.Looper;
import com.google.android.gms.tasks.Task;

/* loaded from: classes3.dex */
final class l implements b {

    /* renamed from: a, reason: collision with root package name */
    private final u f31509a;

    /* renamed from: b, reason: collision with root package name */
    private final i f31510b;

    /* renamed from: c, reason: collision with root package name */
    private final Context f31511c;

    /* renamed from: d, reason: collision with root package name */
    private final Handler f31512d = new Handler(Looper.getMainLooper());

    /* JADX INFO: Access modifiers changed from: package-private */
    public l(u uVar, i iVar, Context context) {
        this.f31509a = uVar;
        this.f31510b = iVar;
        this.f31511c = context;
    }

    @Override // oj.b
    public final Task a() {
        return this.f31509a.c(this.f31511c.getPackageName());
    }

    @Override // oj.b
    public final boolean b(a aVar, int i10, Activity activity, int i11) {
        d c10 = d.c(i10);
        if (activity == null) {
            return false;
        }
        return c(aVar, new k(this, activity), c10, i11);
    }

    public final boolean c(a aVar, tj.a aVar2, d dVar, int i10) {
        if (aVar == null || aVar2 == null || dVar == null || !aVar.b(dVar) || aVar.g()) {
            return false;
        }
        aVar.f();
        aVar2.a(aVar.d(dVar).getIntentSender(), i10, null, 0, 0, 0, null);
        return true;
    }
}
