ProviderInstaller.java
3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
package com.google.android.gms.security;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.util.Log;
import com.google.android.gms.common.GooglePlayServicesNotAvailableException;
import com.google.android.gms.common.GooglePlayServicesRepairableException;
import com.google.android.gms.common.internal.zzac;
import com.google.android.gms.common.zze;
import com.google.android.gms.common.zzg;
import java.lang.reflect.Method;
public class ProviderInstaller
{
public static final String PROVIDER_NAME = "GmsCore_OpenSSL";
private static final zze a = ;
private static final Object b = new Object();
private static Method c = null;
public static void installIfNeeded(Context paramContext)
throws GooglePlayServicesRepairableException, GooglePlayServicesNotAvailableException
{
zzac.zzb(paramContext, "Context must not be null");
a.zzaE(paramContext);
paramContext = zzg.getRemoteContext(paramContext);
if (paramContext == null)
{
Log.e("ProviderInstaller", "Failed to get remote context");
throw new GooglePlayServicesNotAvailableException(8);
}
for (;;)
{
synchronized (b)
{
try
{
if (c == null) {
c = paramContext.getClassLoader().loadClass("com.google.android.gms.common.security.ProviderInstallerImpl").getMethod("insertProvider", new Class[] { Context.class });
}
c.invoke(null, new Object[] { paramContext });
return;
}
catch (Exception paramContext)
{
paramContext = String.valueOf(paramContext.getMessage());
if (paramContext.length() == 0) {
break label143;
}
}
paramContext = "Failed to install provider: ".concat(paramContext);
Log.e("ProviderInstaller", paramContext);
throw new GooglePlayServicesNotAvailableException(8);
}
label143:
paramContext = new String("Failed to install provider: ");
}
}
public static void installIfNeededAsync(Context paramContext, final ProviderInstallListener paramProviderInstallListener)
{
zzac.zzb(paramContext, "Context must not be null");
zzac.zzb(paramProviderInstallListener, "Listener must not be null");
zzac.zzdj("Must be called on the UI thread");
new AsyncTask()
{
private Integer a()
{
try
{
ProviderInstaller.installIfNeeded(ProviderInstaller.this);
return Integer.valueOf(0);
}
catch (GooglePlayServicesRepairableException localGooglePlayServicesRepairableException)
{
return Integer.valueOf(localGooglePlayServicesRepairableException.getConnectionStatusCode());
}
catch (GooglePlayServicesNotAvailableException localGooglePlayServicesNotAvailableException)
{
return Integer.valueOf(localGooglePlayServicesNotAvailableException.errorCode);
}
}
}.execute(new Void[0]);
}
public static abstract interface ProviderInstallListener
{
public abstract void onProviderInstallFailed(int paramInt, Intent paramIntent);
public abstract void onProviderInstalled();
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/android/gms/security/ProviderInstaller.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/