45 lines
1.7 KiB
Java
45 lines
1.7 KiB
Java
|
package com.google.android.gms.security;
|
||
|
|
||
|
import android.content.Context;
|
||
|
import android.os.AsyncTask;
|
||
|
import com.google.android.gms.common.GoogleApiAvailabilityLight;
|
||
|
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
|
||
|
import com.google.android.gms.common.GooglePlayServicesRepairableException;
|
||
|
import com.google.android.gms.security.ProviderInstaller;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
final class zza extends AsyncTask {
|
||
|
final Context zza;
|
||
|
final ProviderInstaller.ProviderInstallListener zzb;
|
||
|
|
||
|
/* JADX INFO: Access modifiers changed from: package-private */
|
||
|
public zza(Context context, ProviderInstaller.ProviderInstallListener providerInstallListener) {
|
||
|
this.zza = context;
|
||
|
this.zzb = providerInstallListener;
|
||
|
}
|
||
|
|
||
|
@Override // android.os.AsyncTask
|
||
|
protected final /* synthetic */ Object doInBackground(Object[] objArr) {
|
||
|
try {
|
||
|
ProviderInstaller.installIfNeeded(this.zza);
|
||
|
return 0;
|
||
|
} catch (GooglePlayServicesNotAvailableException e) {
|
||
|
return Integer.valueOf(e.errorCode);
|
||
|
} catch (GooglePlayServicesRepairableException e2) {
|
||
|
return Integer.valueOf(e2.getConnectionStatusCode());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // android.os.AsyncTask
|
||
|
protected final /* synthetic */ void onPostExecute(Object obj) {
|
||
|
GoogleApiAvailabilityLight googleApiAvailabilityLight;
|
||
|
Integer num = (Integer) obj;
|
||
|
if (num.intValue() == 0) {
|
||
|
this.zzb.onProviderInstalled();
|
||
|
return;
|
||
|
}
|
||
|
googleApiAvailabilityLight = ProviderInstaller.zza;
|
||
|
this.zzb.onProviderInstallFailed(num.intValue(), googleApiAvailabilityLight.getErrorResolutionIntent(this.zza, num.intValue(), "pi"));
|
||
|
}
|
||
|
}
|