what-the-bank/sources/com/google/android/gms/common/internal/BaseGmsClient.java

1419 lines
46 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.google.android.gms.common.internal;
import android.accounts.Account;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
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.Process;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Log;
import android.util.TypedValue;
import android.view.Gravity;
import android.view.View;
import android.view.ViewConfiguration;
import android.widget.ExpandableListView;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.Feature;
import com.google.android.gms.common.GoogleApiAvailabilityLight;
import com.google.android.gms.common.api.CommonStatusCodes;
import com.google.android.gms.common.api.Scope;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import com.huawei.hms.framework.network.grs.GrsBaseInfo;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.Locale;
import java.util.Set;
import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicInteger;
import net.sf.scuba.smartcards.ISO7816;
import o.jTb;
import o.xzZ;
/* loaded from: classes.dex */
public abstract class BaseGmsClient<T extends IInterface> {
public static final int CONNECT_STATE_CONNECTED = 4;
public static final int CONNECT_STATE_DISCONNECTED = 1;
public static final int CONNECT_STATE_DISCONNECTING = 5;
public static final String DEFAULT_ACCOUNT = "<<default account>>";
public static final String[] GOOGLE_PLUS_REQUIRED_FEATURES;
public static final String KEY_PENDING_INTENT = "pendingIntent";
private static char a;
private static char b;
private static int c;
private static char d;
private static char e;
private static final Feature[] zze;
private volatile String zzA;
private ConnectionResult zzB;
private boolean zzC;
private volatile zzj zzD;
zzu zza;
final Handler zzb;
protected ConnectionProgressReportCallbacks zzc;
protected AtomicInteger zzd;
private int zzf;
private long zzg;
private long zzh;
private int zzi;
private long zzj;
private volatile String zzk;
private final Context zzl;
private final Looper zzm;
private final GmsClientSupervisor zzn;
private final GoogleApiAvailabilityLight zzo;
private final Object zzp;
private final Object zzq;
private IGmsServiceBroker zzr;
private IInterface zzs;
private final ArrayList zzt;
private zze zzu;
private int zzv;
private final BaseConnectionCallbacks zzw;
private final BaseOnConnectionFailedListener zzx;
private final int zzy;
private final String zzz;
private static final byte[] $$a = {61, 7, ISO7816.INS_READ_RECORD_STAMPED, 119};
private static final int $$b = 202;
private static int $10 = 0;
private static int $11 = 1;
private static int i = 1;
/* loaded from: classes.dex */
public interface BaseConnectionCallbacks {
public static final int CAUSE_DEAD_OBJECT_EXCEPTION = 3;
public static final int CAUSE_SERVICE_DISCONNECTED = 1;
void onConnected(Bundle bundle);
void onConnectionSuspended(int i);
}
/* loaded from: classes.dex */
public interface BaseOnConnectionFailedListener {
void onConnectionFailed(ConnectionResult connectionResult);
}
/* loaded from: classes.dex */
public interface ConnectionProgressReportCallbacks {
void onReportServiceBinding(ConnectionResult connectionResult);
}
/* loaded from: classes.dex */
public interface SignOutCallbacks {
void onSignOutComplete();
}
/* JADX INFO: Access modifiers changed from: protected */
public BaseGmsClient(Context context, Handler handler, GmsClientSupervisor gmsClientSupervisor, GoogleApiAvailabilityLight googleApiAvailabilityLight, int i2, BaseConnectionCallbacks baseConnectionCallbacks, BaseOnConnectionFailedListener baseOnConnectionFailedListener) {
this.zzk = null;
this.zzp = new Object();
this.zzq = new Object();
this.zzt = new ArrayList();
this.zzv = 1;
this.zzB = null;
this.zzC = false;
this.zzD = null;
this.zzd = new AtomicInteger(0);
Preconditions.checkNotNull(context, "Context must not be null");
this.zzl = context;
Preconditions.checkNotNull(handler, "Handler must not be null");
this.zzb = handler;
this.zzm = handler.getLooper();
Preconditions.checkNotNull(gmsClientSupervisor, "Supervisor must not be null");
this.zzn = gmsClientSupervisor;
Preconditions.checkNotNull(googleApiAvailabilityLight, "API availability must not be null");
this.zzo = googleApiAvailabilityLight;
this.zzy = i2;
this.zzw = baseConnectionCallbacks;
this.zzx = baseOnConnectionFailedListener;
this.zzz = null;
}
private static void g(short s, int i2, byte b2, Object[] objArr) {
int i3 = i2 * 3;
byte[] bArr = $$a;
int i4 = b2 + 4;
int i5 = 67 - s;
byte[] bArr2 = new byte[1 - i3];
int i6 = 0 - i3;
int i7 = -1;
if (bArr == null) {
i5 += i4;
i4 = i4;
i7 = -1;
}
while (true) {
int i8 = i7 + 1;
bArr2[i8] = (byte) i5;
int i9 = i4 + 1;
if (i8 == i6) {
objArr[0] = new String(bArr2, 0);
return;
} else {
i5 += bArr[i9];
i4 = i9;
i7 = i8;
}
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ void zzk(BaseGmsClient baseGmsClient, int i2) {
int i3;
int i4;
synchronized (baseGmsClient.zzp) {
i3 = baseGmsClient.zzv;
}
if (i3 == 3) {
baseGmsClient.zzC = true;
i4 = 5;
} else {
i4 = 4;
}
Handler handler = baseGmsClient.zzb;
handler.sendMessage(handler.obtainMessage(i4, baseGmsClient.zzd.get(), 16));
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ boolean zzn(BaseGmsClient baseGmsClient, int i2, int i3, IInterface iInterface) {
synchronized (baseGmsClient.zzp) {
if (baseGmsClient.zzv != i2) {
return false;
}
baseGmsClient.zzp(i3, iInterface);
return true;
}
}
/* JADX WARN: Multi-variable type inference failed */
private final void zzp(int i2, IInterface iInterface) {
zzu zzuVar;
zzu zzuVar2;
Preconditions.checkArgument((i2 == 4) == (iInterface != 0));
synchronized (this.zzp) {
this.zzv = i2;
this.zzs = iInterface;
if (i2 == 1) {
zze zzeVar = this.zzu;
if (zzeVar != null) {
GmsClientSupervisor gmsClientSupervisor = this.zzn;
String zzc = this.zza.zzc();
Preconditions.checkNotNull(zzc);
gmsClientSupervisor.zzb(zzc, this.zza.zzb(), this.zza.zza(), zzeVar, zze(), this.zza.zzd());
this.zzu = null;
}
} else if (i2 == 2 || i2 == 3) {
zze zzeVar2 = this.zzu;
if (zzeVar2 != null && (zzuVar2 = this.zza) != null) {
Log.e("GmsClient", "Calling connect() while still connected, missing disconnect() for " + zzuVar2.zzc() + " on " + zzuVar2.zzb());
GmsClientSupervisor gmsClientSupervisor2 = this.zzn;
String zzc2 = this.zza.zzc();
Preconditions.checkNotNull(zzc2);
gmsClientSupervisor2.zzb(zzc2, this.zza.zzb(), this.zza.zza(), zzeVar2, zze(), this.zza.zzd());
this.zzd.incrementAndGet();
}
zze zzeVar3 = new zze(this, this.zzd.get());
this.zzu = zzeVar3;
if (this.zzv != 3 || getLocalStartServiceAction() == null) {
zzuVar = new zzu(getStartServicePackage(), getStartServiceAction(), false, GmsClientSupervisor.getDefaultBindFlags(), getUseDynamicLookup());
} else {
zzuVar = new zzu(getContext().getPackageName(), getLocalStartServiceAction(), true, GmsClientSupervisor.getDefaultBindFlags(), false);
}
this.zza = zzuVar;
if (zzuVar.zzd() && getMinApkVersion() < 17895000) {
throw new IllegalStateException("Internal Error, the minimum apk version of this BaseGmsClient is too low to support dynamic lookup. Start service action: ".concat(String.valueOf(this.zza.zzc())));
}
GmsClientSupervisor gmsClientSupervisor3 = this.zzn;
String zzc3 = this.zza.zzc();
Preconditions.checkNotNull(zzc3);
if (!gmsClientSupervisor3.zzc(new zzn(zzc3, this.zza.zzb(), this.zza.zza(), this.zza.zzd()), zzeVar3, zze(), getBindServiceExecutor())) {
Log.w("GmsClient", "unable to connect to service: " + this.zza.zzc() + " on " + this.zza.zzb());
zzl(16, null, this.zzd.get());
}
} else if (i2 == 4) {
Preconditions.checkNotNull(iInterface);
onConnectedLocked(iInterface);
}
}
}
/* JADX INFO: Access modifiers changed from: protected */
public abstract T createServiceInterface(IBinder iBinder);
public void disconnect() {
this.zzd.incrementAndGet();
synchronized (this.zzt) {
int size = this.zzt.size();
for (int i2 = 0; i2 < size; i2++) {
((zzc) this.zzt.get(i2)).zzf();
}
this.zzt.clear();
}
synchronized (this.zzq) {
this.zzr = null;
}
zzp(1, null);
}
public void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
int i2;
IInterface iInterface;
IGmsServiceBroker iGmsServiceBroker;
synchronized (this.zzp) {
i2 = this.zzv;
iInterface = this.zzs;
}
synchronized (this.zzq) {
iGmsServiceBroker = this.zzr;
}
printWriter.append((CharSequence) str).append("mConnectState=");
if (i2 == 1) {
printWriter.print("DISCONNECTED");
} else if (i2 == 2) {
printWriter.print("REMOTE_CONNECTING");
} else if (i2 == 3) {
printWriter.print("LOCAL_CONNECTING");
} else if (i2 == 4) {
printWriter.print("CONNECTED");
} else if (i2 == 5) {
printWriter.print("DISCONNECTING");
} else {
printWriter.print(GrsBaseInfo.CountryCodeSource.UNKNOWN);
}
printWriter.append(" mService=");
if (iInterface == null) {
Object[] objArr = new Object[1];
f(new char[]{27043, 52275, 18002, 27450}, 4 - ExpandableListView.getPackedPositionType(0L), objArr);
printWriter.append((CharSequence) ((String) objArr[0]).intern());
} else {
printWriter.append((CharSequence) getServiceDescriptor()).append("@").append((CharSequence) Integer.toHexString(System.identityHashCode(iInterface.asBinder())));
}
printWriter.append(" mServiceBroker=");
if (iGmsServiceBroker == null) {
Object[] objArr2 = new Object[1];
f(new char[]{27043, 52275, 18002, 27450}, (ViewConfiguration.getMaximumFlingVelocity() >> 16) + 4, objArr2);
printWriter.println(((String) objArr2[0]).intern());
} else {
printWriter.append("IGmsServiceBroker@").println(Integer.toHexString(System.identityHashCode(iGmsServiceBroker.asBinder())));
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.US);
if (this.zzh > 0) {
PrintWriter append = printWriter.append((CharSequence) str).append("lastConnectedTime=");
long j = this.zzh;
append.println(j + " " + simpleDateFormat.format(new Date(j)));
}
if (this.zzg > 0) {
printWriter.append((CharSequence) str).append("lastSuspendedCause=");
int i3 = this.zzf;
if (i3 == 1) {
printWriter.append("CAUSE_SERVICE_DISCONNECTED");
} else if (i3 == 2) {
printWriter.append("CAUSE_NETWORK_LOST");
} else if (i3 == 3) {
printWriter.append("CAUSE_DEAD_OBJECT_EXCEPTION");
} else {
printWriter.append((CharSequence) String.valueOf(i3));
}
PrintWriter append2 = printWriter.append(" lastSuspendedTime=");
long j2 = this.zzg;
append2.println(j2 + " " + simpleDateFormat.format(new Date(j2)));
}
if (this.zzj > 0) {
printWriter.append((CharSequence) str).append("lastFailedStatus=").append((CharSequence) CommonStatusCodes.getStatusCodeString(this.zzi));
PrintWriter append3 = printWriter.append(" lastFailedTime=");
long j3 = this.zzj;
append3.println(j3 + " " + simpleDateFormat.format(new Date(j3)));
}
}
protected Bundle getGetServiceRequestExtraArgs() {
int i2 = 2 % 2;
Bundle bundle = new Bundle();
int i3 = i + 21;
c = i3 % 128;
if (i3 % 2 == 0) {
return bundle;
}
Object obj = null;
obj.hashCode();
throw null;
}
public int getMinApkVersion() {
int i2;
int i3 = 2 % 2;
int i4 = c + 123;
i = i4 % 128;
if (i4 % 2 == 0) {
i2 = GoogleApiAvailabilityLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
int i5 = 37 / 0;
} else {
i2 = GoogleApiAvailabilityLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
}
int i6 = c + 63;
i = i6 % 128;
if (i6 % 2 == 0) {
int i7 = 84 / 0;
}
return i2;
}
public void getRemoteService(IAccountAccessor iAccountAccessor, Set<Scope> set) {
Bundle getServiceRequestExtraArgs = getGetServiceRequestExtraArgs();
int i2 = this.zzy;
String str = this.zzA;
int i3 = GoogleApiAvailabilityLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
Scope[] scopeArr = GetServiceRequest.zza;
Bundle bundle = new Bundle();
Feature[] featureArr = GetServiceRequest.zzb;
GetServiceRequest getServiceRequest = new GetServiceRequest(6, i2, i3, null, null, scopeArr, bundle, null, featureArr, featureArr, true, 0, false, str);
getServiceRequest.zzf = this.zzl.getPackageName();
getServiceRequest.zzi = getServiceRequestExtraArgs;
if (set != null) {
getServiceRequest.zzh = (Scope[]) set.toArray(new Scope[0]);
}
if (requiresSignIn()) {
Account account = getAccount();
if (account == null) {
account = new Account("<<default account>>", "com.google");
}
getServiceRequest.zzj = account;
if (iAccountAccessor != null) {
getServiceRequest.zzg = iAccountAccessor.asBinder();
}
} else if (requiresAccount()) {
getServiceRequest.zzj = getAccount();
}
getServiceRequest.zzk = zze;
getServiceRequest.zzl = getApiFeatures();
if (usesClientTelemetry()) {
getServiceRequest.zzo = true;
}
try {
synchronized (this.zzq) {
IGmsServiceBroker iGmsServiceBroker = this.zzr;
if (iGmsServiceBroker != null) {
iGmsServiceBroker.getService(new zzd(this, this.zzd.get()), getServiceRequest);
} else {
Log.w("GmsClient", "mServiceBroker is null, client disconnected");
}
}
} catch (DeadObjectException e2) {
Log.w("GmsClient", "IGmsServiceBroker.getService failed", e2);
triggerConnectionSuspended(3);
} catch (RemoteException e3) {
e = e3;
Log.w("GmsClient", "IGmsServiceBroker.getService failed", e);
onPostInitHandler(8, null, null, this.zzd.get());
} catch (SecurityException e4) {
throw e4;
} catch (RuntimeException e5) {
e = e5;
Log.w("GmsClient", "IGmsServiceBroker.getService failed", e);
onPostInitHandler(8, null, null, this.zzd.get());
}
}
protected Set<Scope> getScopes() {
int i2 = 2 % 2;
int i3 = i + 31;
c = i3 % 128;
Object obj = null;
if (i3 % 2 != 0) {
Collections.emptySet();
obj.hashCode();
throw null;
}
Set<Scope> emptySet = Collections.emptySet();
int i4 = i + 79;
c = i4 % 128;
if (i4 % 2 == 0) {
return emptySet;
}
obj.hashCode();
throw null;
}
public final T getService() throws DeadObjectException {
T t;
synchronized (this.zzp) {
if (this.zzv == 5) {
throw new DeadObjectException();
}
checkConnected();
t = (T) this.zzs;
Preconditions.checkNotNull(t, "Client is connected but service is null");
}
return t;
}
/* JADX INFO: Access modifiers changed from: protected */
public abstract String getServiceDescriptor();
public Intent getSignInIntent() {
int i2 = 2 % 2;
throw new UnsupportedOperationException("Not a sign in API");
}
protected abstract String getStartServiceAction();
protected boolean getUseDynamicLookup() {
int i2 = 2 % 2;
int i3 = i + 31;
c = i3 % 128;
int i4 = i3 % 2;
if (getMinApkVersion() >= 211700000) {
return true;
}
int i5 = i + 63;
c = i5 % 128;
int i6 = i5 % 2;
return false;
}
public boolean isConnected() {
boolean z;
synchronized (this.zzp) {
z = this.zzv == 4;
}
return z;
}
public boolean isConnecting() {
boolean z;
synchronized (this.zzp) {
int i2 = this.zzv;
z = i2 == 2 || i2 == 3;
}
return z;
}
protected void onConnectedLocked(T t) {
int i2 = 2 % 2;
int i3 = i + 83;
c = i3 % 128;
int i4 = i3 % 2;
Object obj = null;
this.zzh = System.currentTimeMillis();
if (i4 != 0) {
throw null;
}
int i5 = c + 83;
i = i5 % 128;
if (i5 % 2 != 0) {
return;
}
obj.hashCode();
throw null;
}
/* JADX INFO: Access modifiers changed from: protected */
public void onConnectionSuspended(int i2) {
int i3 = 2 % 2;
int i4 = c + 13;
i = i4 % 128;
int i5 = i4 % 2;
this.zzf = i2;
this.zzg = System.currentTimeMillis();
int i6 = c + 67;
i = i6 % 128;
int i7 = i6 % 2;
}
/* JADX INFO: Access modifiers changed from: protected */
public void onPostInitHandler(int i2, IBinder iBinder, Bundle bundle, int i3) {
int i4 = 2 % 2;
Handler handler = this.zzb;
handler.sendMessage(handler.obtainMessage(1, i3, -1, new zzf(this, i2, iBinder, bundle)));
int i5 = c + 109;
i = i5 % 128;
if (i5 % 2 == 0) {
throw null;
}
}
public void onUserSignOut(SignOutCallbacks signOutCallbacks) {
int i2 = 2 % 2;
int i3 = i + 3;
c = i3 % 128;
int i4 = i3 % 2;
signOutCallbacks.onSignOutComplete();
int i5 = i + 35;
c = i5 % 128;
if (i5 % 2 != 0) {
int i6 = 88 / 0;
}
}
protected final String zze() {
int i2 = 2 % 2;
int i3 = i;
int i4 = i3 + 47;
c = i4 % 128;
if (i4 % 2 != 0) {
String str = this.zzz;
int i5 = 78 / 0;
if (str != null) {
return str;
}
} else {
String str2 = this.zzz;
if (str2 != null) {
return str2;
}
}
int i6 = i3 + 59;
c = i6 % 128;
if (i6 % 2 == 0) {
return this.zzl.getClass().getName();
}
this.zzl.getClass().getName();
throw null;
}
/* JADX INFO: Access modifiers changed from: protected */
public final void zzl(int i2, Bundle bundle, int i3) {
int i4 = 2 % 2;
Handler handler = this.zzb;
handler.sendMessage(handler.obtainMessage(7, i3, -1, new zzg(this, i2, null)));
int i5 = c + 45;
i = i5 % 128;
int i6 = i5 % 2;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ void zzj(BaseGmsClient baseGmsClient, zzj zzjVar) {
int i2 = 2 % 2;
baseGmsClient.zzD = zzjVar;
if (baseGmsClient.usesClientTelemetry()) {
int i3 = i + 113;
c = i3 % 128;
RootTelemetryConfiguration rootTelemetryConfiguration = null;
if (i3 % 2 == 0) {
ConnectionTelemetryConfiguration connectionTelemetryConfiguration = zzjVar.zzd;
RootTelemetryConfigManager rootTelemetryConfigManager = RootTelemetryConfigManager.getInstance();
if (connectionTelemetryConfiguration == null) {
int i4 = c + 57;
i = i4 % 128;
int i5 = i4 % 2;
} else {
rootTelemetryConfiguration = connectionTelemetryConfiguration.zza();
}
rootTelemetryConfigManager.zza(rootTelemetryConfiguration);
return;
}
ConnectionTelemetryConfiguration connectionTelemetryConfiguration2 = zzjVar.zzd;
RootTelemetryConfigManager.getInstance();
throw null;
}
}
protected final void checkConnected() {
int i2 = 2 % 2;
int i3 = c + 25;
i = i3 % 128;
if (i3 % 2 != 0) {
if (!isConnected()) {
throw new IllegalStateException("Not connected. Call connect() and wait for onConnected() to be called.");
}
int i4 = c + 87;
i = i4 % 128;
if (i4 % 2 == 0) {
throw null;
}
return;
}
isConnected();
throw null;
}
public void connect(ConnectionProgressReportCallbacks connectionProgressReportCallbacks) {
int i2 = 2 % 2;
int i3 = c + 39;
i = i3 % 128;
int i4 = i3 % 2;
Preconditions.checkNotNull(connectionProgressReportCallbacks, "Connection progress callbacks cannot be null.");
this.zzc = connectionProgressReportCallbacks;
zzp(2, null);
int i5 = i + 89;
c = i5 % 128;
int i6 = i5 % 2;
}
public String getEndpointPackageName() {
int i2 = 2 % 2;
if (isConnected()) {
int i3 = c + 115;
i = i3 % 128;
if (i3 % 2 == 0) {
Object obj = null;
obj.hashCode();
throw null;
}
zzu zzuVar = this.zza;
if (zzuVar != null) {
String zzb = zzuVar.zzb();
int i4 = i + 55;
c = i4 % 128;
int i5 = i4 % 2;
return zzb;
}
}
throw new RuntimeException("Failed to connect when checking package");
}
public IBinder getServiceBrokerBinder() {
synchronized (this.zzq) {
IGmsServiceBroker iGmsServiceBroker = this.zzr;
if (iGmsServiceBroker == null) {
return null;
}
return iGmsServiceBroker.asBinder();
}
}
/* JADX INFO: Access modifiers changed from: protected */
public void onConnectionFailed(ConnectionResult connectionResult) {
int i2 = 2 % 2;
int i3 = i + 65;
c = i3 % 128;
if (i3 % 2 == 0) {
this.zzi = connectionResult.getErrorCode();
this.zzj = System.currentTimeMillis();
int i4 = i + 35;
c = i4 % 128;
if (i4 % 2 != 0) {
int i5 = 6 / 0;
return;
}
return;
}
this.zzi = connectionResult.getErrorCode();
this.zzj = System.currentTimeMillis();
throw null;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ boolean zzo(BaseGmsClient baseGmsClient) {
int i2 = 2 % 2;
int i3 = i + 13;
c = i3 % 128;
if (i3 % 2 != 0) {
if (baseGmsClient.zzC) {
return false;
}
} else if (baseGmsClient.zzC) {
return false;
}
if (TextUtils.isEmpty(baseGmsClient.getServiceDescriptor())) {
int i4 = c + 115;
i = i4 % 128;
int i5 = i4 % 2;
return false;
}
if (!TextUtils.isEmpty(baseGmsClient.getLocalStartServiceAction())) {
try {
Class.forName(baseGmsClient.getServiceDescriptor());
return true;
} catch (ClassNotFoundException unused) {
return false;
}
}
int i6 = c + 31;
i = i6 % 128;
int i7 = i6 % 2;
return false;
}
public void triggerConnectionSuspended(int i2) {
Handler handler;
int i3;
int i4;
int i5 = 2 % 2;
int i6 = c + 7;
i = i6 % 128;
if (i6 % 2 == 0) {
handler = this.zzb;
i3 = this.zzd.get();
i4 = 56;
} else {
handler = this.zzb;
i3 = this.zzd.get();
i4 = 6;
}
handler.sendMessage(handler.obtainMessage(i4, i3, i2));
}
public void checkAvailabilityAndConnect() {
int i2 = 2 % 2;
int i3 = i + 101;
c = i3 % 128;
int i4 = i3 % 2;
int isGooglePlayServicesAvailable = this.zzo.isGooglePlayServicesAvailable(this.zzl, getMinApkVersion());
if (isGooglePlayServicesAvailable != 0) {
zzp(1, null);
triggerNotAvailable(new LegacyClientCallbackAdapter(this), isGooglePlayServicesAvailable, null);
return;
}
connect(new LegacyClientCallbackAdapter(this));
int i5 = c + 45;
i = i5 % 128;
if (i5 % 2 == 0) {
throw null;
}
}
protected void triggerNotAvailable(ConnectionProgressReportCallbacks connectionProgressReportCallbacks, int i2, PendingIntent pendingIntent) {
int i3 = 2 % 2;
int i4 = i + 1;
c = i4 % 128;
int i5 = i4 % 2;
Preconditions.checkNotNull(connectionProgressReportCallbacks, "Connection progress callbacks cannot be null.");
this.zzc = connectionProgressReportCallbacks;
Handler handler = this.zzb;
handler.sendMessage(handler.obtainMessage(3, this.zzd.get(), i2, pendingIntent));
int i6 = c + 37;
i = i6 % 128;
int i7 = i6 % 2;
}
/* JADX WARN: Illegal instructions before constructor call */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public BaseGmsClient(android.content.Context r10, android.os.Looper r11, int r12, com.google.android.gms.common.internal.BaseGmsClient.BaseConnectionCallbacks r13, com.google.android.gms.common.internal.BaseGmsClient.BaseOnConnectionFailedListener r14, java.lang.String r15) {
/*
r9 = this;
com.google.android.gms.common.internal.GmsClientSupervisor r3 = com.google.android.gms.common.internal.GmsClientSupervisor.getInstance(r10)
com.google.android.gms.common.GoogleApiAvailabilityLight r4 = com.google.android.gms.common.GoogleApiAvailabilityLight.getInstance()
com.google.android.gms.common.internal.Preconditions.checkNotNull(r13)
com.google.android.gms.common.internal.Preconditions.checkNotNull(r14)
r0 = r9
r1 = r10
r2 = r11
r5 = r12
r6 = r13
r7 = r14
r8 = r15
r0.<init>(r1, r2, r3, r4, r5, r6, r7, r8)
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.common.internal.BaseGmsClient.<init>(android.content.Context, android.os.Looper, int, com.google.android.gms.common.internal.BaseGmsClient$BaseConnectionCallbacks, com.google.android.gms.common.internal.BaseGmsClient$BaseOnConnectionFailedListener, java.lang.String):void");
}
public void disconnect(String str) {
int i2 = 2 % 2;
int i3 = c + 33;
i = i3 % 128;
if (i3 % 2 != 0) {
this.zzk = str;
disconnect();
} else {
this.zzk = str;
disconnect();
int i4 = 71 / 0;
}
}
/* JADX INFO: Access modifiers changed from: protected */
public BaseGmsClient(Context context, Looper looper, GmsClientSupervisor gmsClientSupervisor, GoogleApiAvailabilityLight googleApiAvailabilityLight, int i2, BaseConnectionCallbacks baseConnectionCallbacks, BaseOnConnectionFailedListener baseOnConnectionFailedListener, String str) {
this.zzk = null;
this.zzp = new Object();
this.zzq = new Object();
this.zzt = new ArrayList();
this.zzv = 1;
this.zzB = null;
this.zzC = false;
this.zzD = null;
this.zzd = new AtomicInteger(0);
Preconditions.checkNotNull(context, "Context must not be null");
this.zzl = context;
Preconditions.checkNotNull(looper, "Looper must not be null");
this.zzm = looper;
Preconditions.checkNotNull(gmsClientSupervisor, "Supervisor must not be null");
this.zzn = gmsClientSupervisor;
Preconditions.checkNotNull(googleApiAvailabilityLight, "API availability must not be null");
this.zzo = googleApiAvailabilityLight;
this.zzb = new zzb(this, looper);
this.zzy = i2;
this.zzw = baseConnectionCallbacks;
this.zzx = baseOnConnectionFailedListener;
this.zzz = str;
}
private static void f(char[] cArr, int i2, Object[] objArr) {
int i3;
int i4 = 2 % 2;
jTb jtb = new jTb();
char[] cArr2 = new char[cArr.length];
jtb.b = 0;
char[] cArr3 = new char[2];
int i5 = $10 + 37;
$11 = i5 % 128;
int i6 = i5 % 2;
while (jtb.b < cArr.length) {
int i7 = $10 + 63;
$11 = i7 % 128;
int i8 = 58224;
if (i7 % 2 == 0) {
cArr3[0] = cArr[jtb.b];
cArr3[0] = cArr[jtb.b + 1];
i3 = 1;
} else {
cArr3[0] = cArr[jtb.b];
cArr3[1] = cArr[jtb.b + 1];
i3 = 0;
}
while (i3 < 16) {
int i9 = $10 + 123;
$11 = i9 % 128;
int i10 = i9 % 2;
char c2 = cArr3[1];
char c3 = cArr3[0];
try {
Object[] objArr2 = {Integer.valueOf(c2), Integer.valueOf((c3 + i8) ^ ((c3 << 4) + ((char) (b ^ 41718355337583039L)))), Integer.valueOf(c3 >>> 5), Integer.valueOf(e)};
Object obj = xzZ.y.get(597144044);
if (obj == null) {
Class cls = (Class) xzZ.c((Process.myPid() >> 22) + 412, 5 - View.resolveSize(0, 0), (char) (TypedValue.complexToFloat(0) > BitmapDescriptorFactory.HUE_RED ? 1 : (TypedValue.complexToFloat(0) == BitmapDescriptorFactory.HUE_RED ? 0 : -1)));
byte b2 = (byte) 1;
byte b3 = (byte) (b2 - 1);
Object[] objArr3 = new Object[1];
g(b2, b3, (byte) (b3 - 1), objArr3);
obj = cls.getMethod((String) objArr3[0], Integer.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE);
xzZ.y.put(597144044, obj);
}
char charValue = ((Character) ((Method) obj).invoke(null, objArr2)).charValue();
cArr3[1] = charValue;
Object[] objArr4 = {Integer.valueOf(cArr3[0]), Integer.valueOf((charValue + i8) ^ ((charValue << 4) + ((char) (a ^ 41718355337583039L)))), Integer.valueOf(charValue >>> 5), Integer.valueOf(d)};
Object obj2 = xzZ.y.get(597144044);
if (obj2 == null) {
Class cls2 = (Class) xzZ.c((ViewConfiguration.getTapTimeout() >> 16) + 412, View.getDefaultSize(0, 0) + 5, (char) (ViewConfiguration.getMinimumFlingVelocity() >> 16));
byte b4 = (byte) 1;
byte b5 = (byte) (b4 - 1);
Object[] objArr5 = new Object[1];
g(b4, b5, (byte) (b5 - 1), objArr5);
obj2 = cls2.getMethod((String) objArr5[0], Integer.TYPE, Integer.TYPE, Integer.TYPE, Integer.TYPE);
xzZ.y.put(597144044, obj2);
}
cArr3[0] = ((Character) ((Method) obj2).invoke(null, objArr4)).charValue();
i8 -= 40503;
i3++;
} catch (Throwable th) {
Throwable cause = th.getCause();
if (cause == null) {
throw th;
}
throw cause;
}
}
cArr2[jtb.b] = cArr3[0];
cArr2[jtb.b + 1] = cArr3[1];
Object[] objArr6 = {jtb, jtb};
Object obj3 = xzZ.y.get(943004485);
if (obj3 == null) {
Class cls3 = (Class) xzZ.c(View.combineMeasuredStates(0, 0) + 98, 5 - (ViewConfiguration.getTouchSlop() >> 8), (char) Gravity.getAbsoluteGravity(0, 0));
byte b6 = (byte) 0;
byte b7 = b6;
Object[] objArr7 = new Object[1];
g(b6, b7, (byte) (b7 - 1), objArr7);
obj3 = cls3.getMethod((String) objArr7[0], Object.class, Object.class);
xzZ.y.put(943004485, obj3);
}
((Method) obj3).invoke(null, objArr6);
}
objArr[0] = new String(cArr2, 0, i2);
}
static void a() {
a = (char) 17891;
d = (char) 48761;
b = (char) 18939;
e = (char) 1665;
}
public boolean usesClientTelemetry() {
int i2 = 2 % 2;
int i3 = i + 37;
int i4 = i3 % 128;
c = i4;
int i5 = i3 % 2;
int i6 = i4 + 49;
i = i6 % 128;
int i7 = i6 % 2;
return false;
}
public void setAttributionTag(String str) {
int i2 = 2 % 2;
int i3 = i + 85;
c = i3 % 128;
int i4 = i3 % 2;
this.zzA = str;
if (i4 != 0) {
throw null;
}
}
public boolean requiresSignIn() {
int i2 = 2 % 2;
int i3 = c + 83;
int i4 = i3 % 128;
i = i4;
boolean z = i3 % 2 == 0;
int i5 = i4 + 17;
c = i5 % 128;
int i6 = i5 % 2;
return z;
}
public boolean requiresGooglePlayServices() {
int i2 = 2 % 2;
int i3 = i + 11;
int i4 = i3 % 128;
c = i4;
int i5 = i3 % 2;
int i6 = i4 + 1;
i = i6 % 128;
if (i6 % 2 != 0) {
return true;
}
Object obj = null;
obj.hashCode();
throw null;
}
public boolean requiresAccount() {
int i2 = 2 % 2;
int i3 = c;
int i4 = i3 + 7;
i = i4 % 128;
int i5 = i4 % 2;
int i6 = i3 + 39;
i = i6 % 128;
if (i6 % 2 == 0) {
int i7 = 85 / 0;
}
return false;
}
public boolean providesSignIn() {
int i2 = 2 % 2;
int i3 = c;
int i4 = i3 + 87;
i = i4 % 128;
int i5 = i4 % 2;
int i6 = i3 + 45;
i = i6 % 128;
if (i6 % 2 != 0) {
return false;
}
throw null;
}
public boolean hasConnectionInfo() {
int i2 = 2 % 2;
int i3 = c + 23;
i = i3 % 128;
if (i3 % 2 == 0) {
throw null;
}
if (this.zzD == null) {
return false;
}
int i4 = c + 57;
i = i4 % 128;
int i5 = i4 % 2;
return true;
}
public ConnectionTelemetryConfiguration getTelemetryConfiguration() {
int i2 = 2 % 2;
int i3 = i + 85;
c = i3 % 128;
Object obj = null;
if (i3 % 2 != 0) {
obj.hashCode();
throw null;
}
zzj zzjVar = this.zzD;
if (zzjVar != null) {
return zzjVar.zzd;
}
int i4 = i + 17;
c = i4 % 128;
if (i4 % 2 == 0) {
return null;
}
obj.hashCode();
throw null;
}
protected String getStartServicePackage() {
int i2 = 2 % 2;
int i3 = c;
int i4 = i3 + 15;
i = i4 % 128;
int i5 = i4 % 2;
int i6 = i3 + 65;
i = i6 % 128;
int i7 = i6 % 2;
return "com.google.android.gms";
}
public final Looper getLooper() {
int i2 = 2 % 2;
int i3 = c;
int i4 = i3 + 3;
i = i4 % 128;
int i5 = i4 % 2;
Looper looper = this.zzm;
int i6 = i3 + 105;
i = i6 % 128;
if (i6 % 2 != 0) {
return looper;
}
Object obj = null;
obj.hashCode();
throw null;
}
protected String getLocalStartServiceAction() {
int i2 = 2 % 2;
int i3 = c + 83;
i = i3 % 128;
if (i3 % 2 != 0) {
return null;
}
throw null;
}
public String getLastDisconnectMessage() {
int i2 = 2 % 2;
int i3 = c + 7;
i = i3 % 128;
int i4 = i3 % 2;
String str = this.zzk;
int i5 = c + 85;
i = i5 % 128;
if (i5 % 2 != 0) {
return str;
}
throw null;
}
public int getGCoreServiceId() {
int i2;
int i3 = 2 % 2;
int i4 = c + 69;
int i5 = i4 % 128;
i = i5;
if (i4 % 2 == 0) {
i2 = this.zzy;
int i6 = 30 / 0;
} else {
i2 = this.zzy;
}
int i7 = i5 + 107;
c = i7 % 128;
if (i7 % 2 != 0) {
int i8 = 64 / 0;
}
return i2;
}
public final Context getContext() {
int i2 = 2 % 2;
int i3 = i + 45;
int i4 = i3 % 128;
c = i4;
if (i3 % 2 != 0) {
throw null;
}
Context context = this.zzl;
int i5 = i4 + 65;
i = i5 % 128;
if (i5 % 2 != 0) {
return context;
}
throw null;
}
public Bundle getConnectionHint() {
int i2 = 2 % 2;
int i3 = i + 47;
int i4 = i3 % 128;
c = i4;
int i5 = i3 % 2;
int i6 = i4 + 101;
i = i6 % 128;
Object obj = null;
if (i6 % 2 != 0) {
return null;
}
obj.hashCode();
throw null;
}
protected Executor getBindServiceExecutor() {
int i2 = 2 % 2;
int i3 = c;
int i4 = i3 + 61;
i = i4 % 128;
int i5 = i4 % 2;
int i6 = i3 + 85;
i = i6 % 128;
Object obj = null;
if (i6 % 2 != 0) {
return null;
}
obj.hashCode();
throw null;
}
public final Feature[] getAvailableFeatures() {
int i2 = 2 % 2;
int i3 = c + 37;
i = i3 % 128;
int i4 = i3 % 2;
zzj zzjVar = this.zzD;
if (zzjVar != null) {
return zzjVar.zzb;
}
int i5 = i + 25;
c = i5 % 128;
Object obj = null;
if (i5 % 2 == 0) {
return null;
}
obj.hashCode();
throw null;
}
public Feature[] getApiFeatures() {
int i2 = 2 % 2;
int i3 = c;
int i4 = i3 + 121;
i = i4 % 128;
int i5 = i4 % 2;
Feature[] featureArr = zze;
int i6 = i3 + 103;
i = i6 % 128;
if (i6 % 2 == 0) {
int i7 = 62 / 0;
}
return featureArr;
}
public Account getAccount() {
int i2 = 2 % 2;
int i3 = c;
int i4 = i3 + 111;
i = i4 % 128;
if (i4 % 2 == 0) {
throw null;
}
int i5 = i3 + 3;
i = i5 % 128;
int i6 = i5 % 2;
return null;
}
/* JADX INFO: Access modifiers changed from: protected */
public boolean enableLocalFallback() {
int i2 = 2 % 2;
int i3 = i + 113;
int i4 = i3 % 128;
c = i4;
int i5 = i3 % 2;
int i6 = i4 + 23;
i = i6 % 128;
if (i6 % 2 != 0) {
return false;
}
Object obj = null;
obj.hashCode();
throw null;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* bridge */ /* synthetic */ boolean zzm(BaseGmsClient baseGmsClient) {
int i2 = 2 % 2;
int i3 = i;
int i4 = i3 + 21;
c = i4 % 128;
int i5 = i4 % 2;
boolean z = baseGmsClient.zzC;
int i6 = i3 + 75;
c = i6 % 128;
if (i6 % 2 != 0) {
int i7 = 29 / 0;
}
return z;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ void zzi(BaseGmsClient baseGmsClient, int i2, IInterface iInterface) {
int i3 = 2 % 2;
int i4 = i + 39;
c = i4 % 128;
int i5 = i4 % 2;
baseGmsClient.zzp(i2, null);
if (i5 != 0) {
throw null;
}
int i6 = c + 119;
i = i6 % 128;
int i7 = i6 % 2;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* bridge */ /* synthetic */ void zzh(BaseGmsClient baseGmsClient, IGmsServiceBroker iGmsServiceBroker) {
int i2 = 2 % 2;
int i3 = c + 57;
int i4 = i3 % 128;
i = i4;
int i5 = i3 % 2;
baseGmsClient.zzr = iGmsServiceBroker;
int i6 = i4 + 81;
c = i6 % 128;
if (i6 % 2 != 0) {
throw null;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* bridge */ /* synthetic */ void zzg(BaseGmsClient baseGmsClient, ConnectionResult connectionResult) {
int i2 = 2 % 2;
int i3 = i + 71;
int i4 = i3 % 128;
c = i4;
int i5 = i3 % 2;
baseGmsClient.zzB = connectionResult;
int i6 = i4 + 75;
i = i6 % 128;
int i7 = i6 % 2;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* bridge */ /* synthetic */ ArrayList zzf(BaseGmsClient baseGmsClient) {
int i2 = 2 % 2;
int i3 = i + 111;
int i4 = i3 % 128;
c = i4;
int i5 = i3 % 2;
ArrayList arrayList = baseGmsClient.zzt;
int i6 = i4 + 67;
i = i6 % 128;
int i7 = i6 % 2;
return arrayList;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* bridge */ /* synthetic */ Object zzd(BaseGmsClient baseGmsClient) {
int i2 = 2 % 2;
int i3 = c;
int i4 = i3 + 123;
i = i4 % 128;
int i5 = i4 % 2;
Object obj = baseGmsClient.zzq;
int i6 = i3 + 1;
i = i6 % 128;
int i7 = i6 % 2;
return obj;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* bridge */ /* synthetic */ BaseOnConnectionFailedListener zzc(BaseGmsClient baseGmsClient) {
int i2 = 2 % 2;
int i3 = i;
int i4 = i3 + 105;
c = i4 % 128;
int i5 = i4 % 2;
BaseOnConnectionFailedListener baseOnConnectionFailedListener = baseGmsClient.zzx;
int i6 = i3 + 39;
c = i6 % 128;
int i7 = i6 % 2;
return baseOnConnectionFailedListener;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ BaseConnectionCallbacks zzb(BaseGmsClient baseGmsClient) {
int i2 = 2 % 2;
int i3 = c + 21;
i = i3 % 128;
int i4 = i3 % 2;
BaseConnectionCallbacks baseConnectionCallbacks = baseGmsClient.zzw;
if (i4 != 0) {
return baseConnectionCallbacks;
}
Object obj = null;
obj.hashCode();
throw null;
}
/* loaded from: classes.dex */
public class LegacyClientCallbackAdapter implements ConnectionProgressReportCallbacks {
final BaseGmsClient zza;
@Override // com.google.android.gms.common.internal.BaseGmsClient.ConnectionProgressReportCallbacks
public final void onReportServiceBinding(ConnectionResult connectionResult) {
if (connectionResult.isSuccess()) {
BaseGmsClient baseGmsClient = this.zza;
baseGmsClient.getRemoteService(null, baseGmsClient.getScopes());
} else if (BaseGmsClient.zzc(this.zza) != null) {
BaseGmsClient.zzc(this.zza).onConnectionFailed(connectionResult);
}
}
public LegacyClientCallbackAdapter(BaseGmsClient baseGmsClient) {
this.zza = baseGmsClient;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ ConnectionResult zza(BaseGmsClient baseGmsClient) {
int i2 = 2 % 2;
int i3 = c;
int i4 = i3 + 7;
i = i4 % 128;
int i5 = i4 % 2;
ConnectionResult connectionResult = baseGmsClient.zzB;
int i6 = i3 + 35;
i = i6 % 128;
if (i6 % 2 != 0) {
return connectionResult;
}
Object obj = null;
obj.hashCode();
throw null;
}
static {
c = 0;
a();
zze = new Feature[0];
GOOGLE_PLUS_REQUIRED_FEATURES = new String[]{"service_esmobile", "service_googleme"};
int i2 = i + 35;
c = i2 % 128;
if (i2 % 2 == 0) {
return;
}
Object obj = null;
obj.hashCode();
throw null;
}
}