package com.google.ads.interactivemedia.v3.internal;

import android.content.Context;
import android.os.IBinder;
import android.os.IInterface;
import android.os.RemoteException;
import com.google.android.gms.dynamic.RemoteCreator$RemoteCreatorException;
import e8.e;
import java.util.concurrent.Executor;
import k8.c;

/* JADX INFO: loaded from: classes2.dex */
public final class zzll extends c {
    private static final zzll zza = new zzll();

    private zzll() {
        super("com.google.android.gms.ads.adshield.AdShieldCreatorImpl");
    }

    public static zzlo zza(Context context, Executor executor, zzm zzmVar) {
        zzlo zzloVarZzb = null;
        if (zzmVar.zzk() && e.f25522b.b(context, 12800000) == 0) {
            zzloVarZzb = zza.zzb(context, executor, zzmVar);
        }
        return zzloVarZzb == null ? new zzlk(context, executor, zzmVar) : zzloVarZzb;
    }

    private final zzlo zzb(Context context, Executor executor, zzm zzmVar) {
        try {
            IBinder iBinderZze = ((zzlp) getRemoteCreatorInstance(context)).zze(new k8.b(context), new k8.b(executor), zzmVar.zzav());
            if (iBinderZze == null) {
                return null;
            }
            IInterface iInterfaceQueryLocalInterface = iBinderZze.queryLocalInterface("com.google.android.gms.ads.adshield.internal.IAdShieldClient");
            return iInterfaceQueryLocalInterface instanceof zzlo ? (zzlo) iInterfaceQueryLocalInterface : new zzlm(iBinderZze);
        } catch (RemoteException | RemoteCreator$RemoteCreatorException | IllegalArgumentException | LinkageError unused) {
            return null;
        }
    }

    @Override // k8.c
    public final /* synthetic */ Object getRemoteCreator(IBinder iBinder) {
        if (iBinder == null) {
            return null;
        }
        IInterface iInterfaceQueryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.ads.adshield.internal.IAdShieldCreator");
        return iInterfaceQueryLocalInterface instanceof zzlp ? (zzlp) iInterfaceQueryLocalInterface : new zzlp(iBinder);
    }
}
