package p138.p176.p177.p242.p246;

import android.content.ComponentName;
import android.content.ServiceConnection;
import android.os.IBinder;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import p000.p001.p002.p003.p004.C0567;

/* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.֏, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public class ServiceConnectionC4190 implements ServiceConnection {

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public boolean f13389 = false;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final BlockingQueue<IBinder> f13390 = new LinkedBlockingQueue();

    @Override // android.content.ServiceConnection
    public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
        this.f13390.add(iBinder);
    }

    @Override // android.content.ServiceConnection
    public void onServiceDisconnected(ComponentName componentName) {
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public IBinder m6839(long j, TimeUnit timeUnit) throws InterruptedException, TimeoutException {
        C0567.m1938("BlockingServiceConnection.getServiceWithTimeout() called on main thread");
        if (this.f13389) {
            throw new IllegalStateException("Cannot call get on this connection more than once");
        }
        this.f13389 = true;
        IBinder iBinderPoll = this.f13390.poll(j, timeUnit);
        if (iBinderPoll != null) {
            return iBinderPoll;
        }
        throw new TimeoutException("Timed out waiting for the service connection");
    }
}
