package defpackage;

import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.IBinder;
import android.os.IInterface;
import j$.util.Objects;

/* renamed from: ᵧʿ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class ServiceConnectionC3626 implements ServiceConnection {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public final /* synthetic */ C4679 f13514;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final String f13515;

    public ServiceConnectionC3626(C4679 c4679, String str) {
        Objects.requireNonNull(c4679);
        this.f13514 = c4679;
        this.f13515 = str;
    }

    @Override // android.content.ServiceConnection
    public final void onServiceConnected(ComponentName componentName, IBinder iBinder) {
        C4679 c4679 = this.f13514;
        if (iBinder == null) {
            C1736 c1736 = c4679.f17311.f15715;
            C4205.m9132(c1736);
            c1736.f6934.m6038("Install Referrer connection returned with null binder");
            return;
        }
        try {
            int i = AbstractBinderC2566.f9973;
            IInterface iInterfaceQueryLocalInterface = iBinder.queryLocalInterface("com.google.android.finsky.externalreferrer.IGetInstallReferrerService");
            InterfaceC5542 c2303 = iInterfaceQueryLocalInterface instanceof InterfaceC5542 ? (InterfaceC5542) iInterfaceQueryLocalInterface : new C2303(iBinder, "com.google.android.finsky.externalreferrer.IGetInstallReferrerService", 3);
            C4205 c4205 = c4679.f17311;
            C1736 c17362 = c4205.f15715;
            C4205.m9132(c17362);
            c17362.f6935.m6038("Install Referrer Service connected");
            C1325 c1325 = c4205.f15698;
            C4205.m9132(c1325);
            c1325.m4043(new RunnableC1011(this, c2303, this));
        } catch (RuntimeException e) {
            C1736 c17363 = c4679.f17311.f15715;
            C4205.m9132(c17363);
            c17363.f6934.m6039(e, "Exception occurred while calling Install Referrer API");
        }
    }

    @Override // android.content.ServiceConnection
    public final void onServiceDisconnected(ComponentName componentName) {
        C1736 c1736 = this.f13514.f17311.f15715;
        C4205.m9132(c1736);
        c1736.f6935.m6038("Install Referrer Service disconnected");
    }
}
