package p138.p176.p177.p242.p246.p249;

import android.accounts.Account;
import android.app.PendingIntent;
import android.content.ComponentName;
import android.content.Context;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.DeadObjectException;
import android.os.Handler;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Looper;
import android.os.Message;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Log;
import com.google.android.gms.common.api.Scope;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
import javax.annotation.concurrent.GuardedBy;
import p000.p001.p002.p003.p004.C0567;
import p138.p139.p143.p144.C2803;
import p138.p176.p177.p242.p246.C4191;
import p138.p176.p177.p242.p246.C4193;
import p138.p176.p177.p242.p246.C4196;
import p138.p176.p177.p242.p246.p247.p248.C4232;
import p138.p176.p177.p242.p246.p247.p248.RunnableC4233;
import p138.p176.p177.p242.p246.p249.AbstractC4269;
import p138.p176.p177.p242.p246.p249.InterfaceC4276;
import p138.p176.p177.p242.p258.p261.HandlerC4360;

/* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
public abstract class AbstractC4251<T extends IInterface> {

    /* JADX INFO: renamed from: ޓ, reason: contains not printable characters */
    public static final C4193[] f13490 = new C4193[0];

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public C4294 f13491;

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final Context f13492;

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public final AbstractC4269 f13493;

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public final C4196 f13494;

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public final Handler f13495;

    /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
    @GuardedBy("mServiceBrokerLock")
    public InterfaceC4279 f13498;

    /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
    public InterfaceC4254 f13499;

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    @GuardedBy("mLock")
    public T f13500;

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    @GuardedBy("mLock")
    public ServiceConnectionC4261 f13502;

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public final InterfaceC4252 f13504;

    /* JADX INFO: renamed from: ތ, reason: contains not printable characters */
    public final InterfaceC4253 f13505;

    /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
    public final int f13506;

    /* JADX INFO: renamed from: ގ, reason: contains not printable characters */
    public final String f13507;

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public final Object f13496 = new Object();

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public final Object f13497 = new Object();

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public final ArrayList<AbstractC4259<?>> f13501 = new ArrayList<>();

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    @GuardedBy("mLock")
    public int f13503 = 1;

    /* JADX INFO: renamed from: ޏ, reason: contains not printable characters */
    public C4191 f13508 = null;

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

    /* JADX INFO: renamed from: ޑ, reason: contains not printable characters */
    public volatile C4288 f13510 = null;

    /* JADX INFO: renamed from: ޒ, reason: contains not printable characters */
    public AtomicInteger f13511 = new AtomicInteger(0);

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$֏, reason: contains not printable characters */
    public interface InterfaceC4252 {
        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        void mo6935(int i);

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        void mo6936(Bundle bundle);
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$ؠ, reason: contains not printable characters */
    public interface InterfaceC4253 {
        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        void mo6937(C4191 c4191);
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$ހ, reason: contains not printable characters */
    public interface InterfaceC4254 {
        /* JADX INFO: renamed from: ֏ */
        void mo6900(C4191 c4191);
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$ށ, reason: contains not printable characters */
    public class C4255 implements InterfaceC4254 {
        public C4255() {
        }

        @Override // p138.p176.p177.p242.p246.p249.AbstractC4251.InterfaceC4254
        /* JADX INFO: renamed from: ֏ */
        public void mo6900(C4191 c4191) {
            if (c4191.m6841()) {
                AbstractC4251 abstractC4251 = AbstractC4251.this;
                abstractC4251.m6916((InterfaceC4273) null, abstractC4251.mo6929());
            } else {
                InterfaceC4253 interfaceC4253 = AbstractC4251.this.f13505;
                if (interfaceC4253 != null) {
                    interfaceC4253.mo6937(c4191);
                }
            }
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$ނ, reason: contains not printable characters */
    public interface InterfaceC4256 {
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$ރ, reason: contains not printable characters */
    public abstract class AbstractC4257 extends AbstractC4259<Boolean> {

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public final int f13513;

        /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
        public final Bundle f13514;

        public AbstractC4257(int i, Bundle bundle) {
            super(true);
            this.f13513 = i;
            this.f13514 = bundle;
        }

        @Override // p138.p176.p177.p242.p246.p249.AbstractC4251.AbstractC4259
        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final /* synthetic */ void mo6938(Boolean bool) {
            if (bool == null) {
                AbstractC4251.this.m6919(1, null);
                return;
            }
            int i = this.f13513;
            if (i == 0) {
                if (mo6940()) {
                    return;
                }
                AbstractC4251.this.m6919(1, null);
                mo6939(new C4191(8, null));
                return;
            }
            if (i == 10) {
                AbstractC4251.this.m6919(1, null);
                throw new IllegalStateException(String.format("A fatal developer error has occurred. Class name: %s. Start service action: %s. Service Descriptor: %s. ", getClass().getSimpleName(), AbstractC4251.this.mo6932(), AbstractC4251.this.mo6931()));
            }
            AbstractC4251.this.m6919(1, null);
            Bundle bundle = this.f13514;
            mo6939(new C4191(this.f13513, bundle != null ? (PendingIntent) bundle.getParcelable("pendingIntent") : null));
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public abstract void mo6939(C4191 c4191);

        /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
        public abstract boolean mo6940();
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$ބ, reason: contains not printable characters */
    public final class HandlerC4258 extends HandlerC4360 {
        public HandlerC4258(Looper looper) {
            super(looper);
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public static void m6941(Message message) {
            AbstractC4259 abstractC4259 = (AbstractC4259) message.obj;
            if (((AbstractC4257) abstractC4259) == null) {
                throw null;
            }
            abstractC4259.m6944();
        }

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public static boolean m6942(Message message) {
            int i = message.what;
            return i == 2 || i == 1 || i == 7;
        }

        /* JADX WARN: Removed duplicated region for block: B:20:0x0033  */
        @Override // android.os.Handler
        /*
            Code decompiled incorrectly, please refer to instructions dump.
        */
        public final void handleMessage(Message message) {
            if (AbstractC4251.this.f13511.get() != message.arg1) {
                if (m6942(message)) {
                    m6941(message);
                    return;
                }
                return;
            }
            int i = message.what;
            if (i != 1 && i != 7) {
                if (i == 4) {
                    if (AbstractC4251.this == null) {
                        throw null;
                    }
                } else if (i == 5) {
                }
                if (!AbstractC4251.this.m6922()) {
                }
            } else if (!AbstractC4251.this.m6922()) {
                m6941(message);
                return;
            }
            int i2 = message.what;
            if (i2 == 4) {
                AbstractC4251.this.f13508 = new C4191(message.arg2);
                if (AbstractC4251.m6911(AbstractC4251.this)) {
                    AbstractC4251 abstractC4251 = AbstractC4251.this;
                    if (!abstractC4251.f13509) {
                        abstractC4251.m6919(3, null);
                        return;
                    }
                }
                C4191 c4191 = AbstractC4251.this.f13508;
                if (c4191 == null) {
                    c4191 = new C4191(8);
                }
                AbstractC4251.this.f13499.mo6900(c4191);
                if (AbstractC4251.this == null) {
                    throw null;
                }
                System.currentTimeMillis();
                return;
            }
            if (i2 == 5) {
                C4191 c41912 = AbstractC4251.this.f13508;
                if (c41912 == null) {
                    c41912 = new C4191(8);
                }
                AbstractC4251.this.f13499.mo6900(c41912);
                if (AbstractC4251.this == null) {
                    throw null;
                }
                System.currentTimeMillis();
                return;
            }
            if (i2 == 3) {
                Object obj = message.obj;
                AbstractC4251.this.f13499.mo6900(new C4191(message.arg2, obj instanceof PendingIntent ? (PendingIntent) obj : null));
                if (AbstractC4251.this == null) {
                    throw null;
                }
                System.currentTimeMillis();
                return;
            }
            if (i2 == 6) {
                AbstractC4251.this.m6919(5, null);
                InterfaceC4252 interfaceC4252 = AbstractC4251.this.f13504;
                if (interfaceC4252 != null) {
                    interfaceC4252.mo6935(message.arg2);
                }
                if (AbstractC4251.this == null) {
                    throw null;
                }
                System.currentTimeMillis();
                AbstractC4251.this.m6918(5, 1, null);
                return;
            }
            if (i2 == 2 && !AbstractC4251.this.m6917()) {
                m6941(message);
                return;
            }
            if (m6942(message)) {
                ((AbstractC4259) message.obj).m6945();
                return;
            }
            int i3 = message.what;
            StringBuilder sb = new StringBuilder(45);
            sb.append("Don't know how to handle message: ");
            sb.append(i3);
            Log.wtf("GmsClient", sb.toString(), new Exception());
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$ޅ, reason: contains not printable characters */
    public abstract class AbstractC4259<TListener> {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public TListener f13517;

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

        public AbstractC4259(TListener tlistener) {
            this.f13517 = tlistener;
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final void m6943() {
            synchronized (this) {
                this.f13517 = null;
            }
        }

        /* JADX INFO: renamed from: ֏ */
        public abstract void mo6938(TListener tlistener);

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final void m6944() {
            m6943();
            synchronized (AbstractC4251.this.f13501) {
                AbstractC4251.this.f13501.remove(this);
            }
        }

        /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
        public final void m6945() {
            TListener tlistener;
            synchronized (this) {
                tlistener = this.f13517;
                if (this.f13518) {
                    String strValueOf = String.valueOf(this);
                    StringBuilder sb = new StringBuilder(strValueOf.length() + 47);
                    sb.append("Callback proxy ");
                    sb.append(strValueOf);
                    sb.append(" being reused. This is not safe.");
                    Log.w("GmsClient", sb.toString());
                }
            }
            if (tlistener != null) {
                try {
                    mo6938(tlistener);
                } catch (RuntimeException e) {
                    throw e;
                }
            }
            synchronized (this) {
                this.f13518 = true;
            }
            m6944();
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$ކ, reason: contains not printable characters */
    public static final class BinderC4260 extends InterfaceC4276.AbstractBinderC4277 {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public AbstractC4251 f13520;

        /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
        public final int f13521;

        public BinderC4260(AbstractC4251 abstractC4251, int i) {
            this.f13520 = abstractC4251;
            this.f13521 = i;
        }

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final void m6946(int i, IBinder iBinder, Bundle bundle) {
            C0567.m1857(this.f13520, (Object) "onPostInitComplete can be called only once per call to getRemoteService");
            AbstractC4251 abstractC4251 = this.f13520;
            int i2 = this.f13521;
            Handler handler = abstractC4251.f13495;
            handler.sendMessage(handler.obtainMessage(1, i2, -1, new C4262(i, iBinder, bundle)));
            this.f13520 = null;
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$އ, reason: contains not printable characters */
    public final class ServiceConnectionC4261 implements ServiceConnection {

        /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
        public final int f13522;

        public ServiceConnectionC4261(int i) {
            this.f13522 = i;
        }

        @Override // android.content.ServiceConnection
        public final void onServiceConnected(ComponentName componentName, IBinder iBinder) {
            if (iBinder == null) {
                AbstractC4251.m6910(AbstractC4251.this);
                return;
            }
            synchronized (AbstractC4251.this.f13497) {
                AbstractC4251 abstractC4251 = AbstractC4251.this;
                IInterface iInterfaceQueryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.common.internal.IGmsServiceBroker");
                abstractC4251.f13498 = (iInterfaceQueryLocalInterface == null || !(iInterfaceQueryLocalInterface instanceof InterfaceC4279)) ? new C4278(iBinder) : (InterfaceC4279) iInterfaceQueryLocalInterface;
            }
            AbstractC4251 abstractC42512 = AbstractC4251.this;
            int i = this.f13522;
            Handler handler = abstractC42512.f13495;
            handler.sendMessage(handler.obtainMessage(7, i, -1, new C4263(0)));
        }

        @Override // android.content.ServiceConnection
        public final void onServiceDisconnected(ComponentName componentName) {
            synchronized (AbstractC4251.this.f13497) {
                AbstractC4251.this.f13498 = null;
            }
            Handler handler = AbstractC4251.this.f13495;
            handler.sendMessage(handler.obtainMessage(6, this.f13522, 1));
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$ވ, reason: contains not printable characters */
    public final class C4262 extends AbstractC4257 {

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public final IBinder f13524;

        public C4262(int i, IBinder iBinder, Bundle bundle) {
            super(i, bundle);
            this.f13524 = iBinder;
        }

        @Override // p138.p176.p177.p242.p246.p249.AbstractC4251.AbstractC4257
        /* JADX INFO: renamed from: ֏ */
        public final void mo6939(C4191 c4191) {
            InterfaceC4253 interfaceC4253 = AbstractC4251.this.f13505;
            if (interfaceC4253 != null) {
                interfaceC4253.mo6937(c4191);
            }
            if (AbstractC4251.this == null) {
                throw null;
            }
            int i = c4191.f13393;
            System.currentTimeMillis();
        }

        /* JADX WARN: Multi-variable type inference failed */
        @Override // p138.p176.p177.p242.p246.p249.AbstractC4251.AbstractC4257
        /* JADX INFO: renamed from: ށ */
        public final boolean mo6940() {
            try {
                String interfaceDescriptor = this.f13524.getInterfaceDescriptor();
                if (!AbstractC4251.this.mo6931().equals(interfaceDescriptor)) {
                    String strMo6931 = AbstractC4251.this.mo6931();
                    StringBuilder sb = new StringBuilder(C2803.m4895(interfaceDescriptor, C2803.m4895(strMo6931, 34)));
                    sb.append("service descriptor mismatch: ");
                    sb.append(strMo6931);
                    sb.append(" vs. ");
                    sb.append(interfaceDescriptor);
                    Log.e("GmsClient", sb.toString());
                    return false;
                }
                IInterface iInterfaceMo6912 = AbstractC4251.this.mo6912(this.f13524);
                if (iInterfaceMo6912 == null || !(AbstractC4251.this.m6918(2, 4, iInterfaceMo6912) || AbstractC4251.this.m6918(3, 4, iInterfaceMo6912))) {
                    return false;
                }
                AbstractC4251 abstractC4251 = AbstractC4251.this;
                abstractC4251.f13508 = null;
                InterfaceC4252 interfaceC4252 = abstractC4251.f13504;
                if (interfaceC4252 == null) {
                    return true;
                }
                interfaceC4252.mo6936(null);
                return true;
            } catch (RemoteException unused) {
                Log.w("GmsClient", "service probably died");
                return false;
            }
        }
    }

    /* JADX INFO: renamed from: ދ.ހ.֏.ހ.ހ.ފ.ؠ$މ, reason: contains not printable characters */
    public final class C4263 extends AbstractC4257 {
        public C4263(int i) {
            super(i, null);
        }

        @Override // p138.p176.p177.p242.p246.p249.AbstractC4251.AbstractC4257
        /* JADX INFO: renamed from: ֏ */
        public final void mo6939(C4191 c4191) {
            AbstractC4251 abstractC4251 = AbstractC4251.this;
            if (abstractC4251 == null) {
                throw null;
            }
            abstractC4251.f13499.mo6900(c4191);
            if (AbstractC4251.this == null) {
                throw null;
            }
            int i = c4191.f13393;
            System.currentTimeMillis();
        }

        @Override // p138.p176.p177.p242.p246.p249.AbstractC4251.AbstractC4257
        /* JADX INFO: renamed from: ށ */
        public final boolean mo6940() {
            AbstractC4251.this.f13499.mo6900(C4191.f13391);
            return true;
        }
    }

    public AbstractC4251(Context context, Looper looper, AbstractC4269 abstractC4269, C4196 c4196, int i, InterfaceC4252 interfaceC4252, InterfaceC4253 interfaceC4253, String str) {
        C0567.m1857(context, (Object) "Context must not be null");
        this.f13492 = context;
        C0567.m1857(looper, (Object) "Looper must not be null");
        C0567.m1857(abstractC4269, (Object) "Supervisor must not be null");
        this.f13493 = abstractC4269;
        C0567.m1857(c4196, (Object) "API availability must not be null");
        this.f13494 = c4196;
        this.f13495 = new HandlerC4258(looper);
        this.f13506 = i;
        this.f13504 = interfaceC4252;
        this.f13505 = interfaceC4253;
        this.f13507 = str;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public static /* synthetic */ void m6910(AbstractC4251 abstractC4251) {
        int i;
        if (abstractC4251.m6934()) {
            i = 5;
            abstractC4251.f13509 = true;
        } else {
            i = 4;
        }
        Handler handler = abstractC4251.f13495;
        handler.sendMessage(handler.obtainMessage(i, abstractC4251.f13511.get(), 16));
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public static /* synthetic */ boolean m6911(AbstractC4251 abstractC4251) {
        if (abstractC4251.f13509 || TextUtils.isEmpty(abstractC4251.mo6931()) || TextUtils.isEmpty(null)) {
            return false;
        }
        try {
            Class.forName(abstractC4251.mo6931());
            return true;
        } catch (ClassNotFoundException unused) {
            return false;
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public abstract T mo6912(IBinder iBinder);

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m6913(int i, T t) {
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m6914(InterfaceC4254 interfaceC4254) {
        C0567.m1857(interfaceC4254, (Object) "Connection progress callbacks cannot be null.");
        this.f13499 = interfaceC4254;
        m6919(2, null);
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m6915(InterfaceC4256 interfaceC4256) {
        C4232 c4232 = (C4232) interfaceC4256;
        c4232.f13468.f13448.f13436.post(new RunnableC4233(c4232));
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public void m6916(InterfaceC4273 interfaceC4273, Set<Scope> set) {
        Bundle bundleMo6928 = mo6928();
        C4267 c4267 = new C4267(this.f13506);
        c4267.f13537 = this.f13492.getPackageName();
        c4267.f13540 = bundleMo6928;
        if (set != null) {
            c4267.f13539 = (Scope[]) set.toArray(new Scope[set.size()]);
        }
        if (mo6872()) {
            c4267.f13541 = mo6927() != null ? mo6927() : new Account("<<default account>>", "com.google");
            if (interfaceC4273 != null) {
                c4267.f13538 = interfaceC4273.asBinder();
            }
        }
        C4193[] c4193Arr = f13490;
        c4267.f13542 = c4193Arr;
        c4267.f13543 = c4193Arr;
        try {
            synchronized (this.f13497) {
                if (this.f13498 != null) {
                    this.f13498.mo6961(new BinderC4260(this, this.f13511.get()), c4267);
                } else {
                    Log.w("GmsClient", "mServiceBroker is null, client disconnected");
                }
            }
        } catch (DeadObjectException e) {
            Log.w("GmsClient", "IGmsServiceBroker.getService failed", e);
            Handler handler = this.f13495;
            handler.sendMessage(handler.obtainMessage(6, this.f13511.get(), 1));
        } catch (RemoteException e2) {
            e = e2;
            Log.w("GmsClient", "IGmsServiceBroker.getService failed", e);
            int i = this.f13511.get();
            Handler handler2 = this.f13495;
            handler2.sendMessage(handler2.obtainMessage(1, i, -1, new C4262(8, null, null)));
        } catch (SecurityException e3) {
            throw e3;
        } catch (RuntimeException e4) {
            e = e4;
            Log.w("GmsClient", "IGmsServiceBroker.getService failed", e);
            int i2 = this.f13511.get();
            Handler handler22 = this.f13495;
            handler22.sendMessage(handler22.obtainMessage(1, i2, -1, new C4262(8, null, null)));
        }
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public boolean m6917() {
        boolean z;
        synchronized (this.f13496) {
            z = this.f13503 == 4;
        }
        return z;
    }

    /* JADX INFO: renamed from: ֏, reason: contains not printable characters */
    public final boolean m6918(int i, int i2, T t) {
        synchronized (this.f13496) {
            if (this.f13503 != i) {
                return false;
            }
            m6919(i2, t);
            return true;
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public final void m6919(int i, T t) {
        C0567.m1920((i == 4) == (t != null));
        synchronized (this.f13496) {
            this.f13503 = i;
            this.f13500 = t;
            m6913(i, t);
            if (i != 1) {
                if (i == 2 || i == 3) {
                    if (this.f13502 != null && this.f13491 != null) {
                        String str = this.f13491.f13585;
                        String str2 = this.f13491.f13586;
                        StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 70 + String.valueOf(str2).length());
                        sb.append("Calling connect() while still connected, missing disconnect() for ");
                        sb.append(str);
                        sb.append(" on ");
                        sb.append(str2);
                        Log.e("GmsClient", sb.toString());
                        AbstractC4269 abstractC4269 = this.f13493;
                        String str3 = this.f13491.f13585;
                        String str4 = this.f13491.f13586;
                        int i2 = this.f13491.f13587;
                        ServiceConnectionC4261 serviceConnectionC4261 = this.f13502;
                        String strM6933 = m6933();
                        if (abstractC4269 == null) {
                            throw null;
                        }
                        abstractC4269.mo6955(new AbstractC4269.C4270(str3, str4, i2), serviceConnectionC4261, strM6933);
                        this.f13511.incrementAndGet();
                    }
                    this.f13502 = new ServiceConnectionC4261(this.f13511.get());
                    C4294 c4294 = new C4294("com.google.android.gms", mo6932(), false);
                    this.f13491 = c4294;
                    if (!this.f13493.mo6954(new AbstractC4269.C4270(c4294.f13585, c4294.f13586, c4294.f13587), this.f13502, m6933())) {
                        String str5 = this.f13491.f13585;
                        String str6 = this.f13491.f13586;
                        StringBuilder sb2 = new StringBuilder(String.valueOf(str5).length() + 34 + String.valueOf(str6).length());
                        sb2.append("unable to connect to service: ");
                        sb2.append(str5);
                        sb2.append(" on ");
                        sb2.append(str6);
                        Log.e("GmsClient", sb2.toString());
                        int i3 = this.f13511.get();
                        Handler handler = this.f13495;
                        handler.sendMessage(handler.obtainMessage(7, i3, -1, new C4263(16)));
                    }
                } else if (i == 4) {
                    System.currentTimeMillis();
                }
            } else if (this.f13502 != null) {
                AbstractC4269 abstractC42692 = this.f13493;
                String str7 = this.f13491.f13585;
                String str8 = this.f13491.f13586;
                int i4 = this.f13491.f13587;
                ServiceConnectionC4261 serviceConnectionC42612 = this.f13502;
                String strM69332 = m6933();
                if (abstractC42692 == null) {
                    throw null;
                }
                abstractC42692.mo6955(new AbstractC4269.C4270(str7, str8, i4), serviceConnectionC42612, strM69332);
                this.f13502 = null;
            }
        }
    }

    /* JADX INFO: renamed from: ؠ, reason: contains not printable characters */
    public boolean m6920() {
        return true;
    }

    /* JADX INFO: renamed from: ހ, reason: contains not printable characters */
    public abstract int mo6921();

    /* JADX INFO: renamed from: ށ, reason: contains not printable characters */
    public boolean m6922() {
        boolean z;
        synchronized (this.f13496) {
            z = this.f13503 == 2 || this.f13503 == 3;
        }
        return z;
    }

    /* JADX INFO: renamed from: ނ, reason: contains not printable characters */
    public final C4193[] m6923() {
        C4288 c4288 = this.f13510;
        if (c4288 == null) {
            return null;
        }
        return c4288.f13571;
    }

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public String m6924() {
        C4294 c4294;
        if (!m6917() || (c4294 = this.f13491) == null) {
            throw new RuntimeException("Failed to connect when checking package");
        }
        return c4294.f13586;
    }

    /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
    public void m6925() {
        this.f13511.incrementAndGet();
        synchronized (this.f13501) {
            int size = this.f13501.size();
            for (int i = 0; i < size; i++) {
                this.f13501.get(i).m6943();
            }
            this.f13501.clear();
        }
        synchronized (this.f13497) {
            this.f13498 = null;
        }
        m6919(1, null);
    }

    /* JADX INFO: renamed from: ކ */
    public boolean mo6872() {
        return false;
    }

    /* JADX INFO: renamed from: އ, reason: contains not printable characters */
    public void m6926() {
        int iMo6844 = this.f13494.mo6844(this.f13492, mo6921());
        if (iMo6844 == 0) {
            m6914(new C4255());
            return;
        }
        m6919(1, null);
        C4255 c4255 = new C4255();
        C0567.m1857(c4255, (Object) "Connection progress callbacks cannot be null.");
        this.f13499 = c4255;
        Handler handler = this.f13495;
        handler.sendMessage(handler.obtainMessage(3, this.f13511.get(), iMo6844, null));
    }

    /* JADX INFO: renamed from: ވ, reason: contains not printable characters */
    public Account mo6927() {
        return null;
    }

    /* JADX INFO: renamed from: މ, reason: contains not printable characters */
    public Bundle mo6928() {
        return new Bundle();
    }

    /* JADX INFO: renamed from: ފ, reason: contains not printable characters */
    public Set<Scope> mo6929() {
        return Collections.EMPTY_SET;
    }

    /* JADX INFO: renamed from: ދ, reason: contains not printable characters */
    public final T m6930() {
        T t;
        synchronized (this.f13496) {
            if (this.f13503 == 5) {
                throw new DeadObjectException();
            }
            if (!m6917()) {
                throw new IllegalStateException("Not connected. Call connect() and wait for onConnected() to be called.");
            }
            C0567.m1921(this.f13500 != null, "Client is connected but service is null");
            t = this.f13500;
        }
        return t;
    }

    /* JADX INFO: renamed from: ތ, reason: contains not printable characters */
    public abstract String mo6931();

    /* JADX INFO: renamed from: ލ, reason: contains not printable characters */
    public abstract String mo6932();

    /* JADX INFO: renamed from: ގ, reason: contains not printable characters */
    public final String m6933() {
        String str = this.f13507;
        return str == null ? this.f13492.getClass().getName() : str;
    }

    /* JADX INFO: renamed from: ޏ, reason: contains not printable characters */
    public final boolean m6934() {
        boolean z;
        synchronized (this.f13496) {
            z = this.f13503 == 3;
        }
        return z;
    }
}
