FingerprintManagerCompat.java
7.64 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
package android.support.v4.hardware.fingerprint;
import android.content.Context;
import android.os.Build.VERSION;
import android.os.Handler;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.os.CancellationSignal;
import java.security.Signature;
import javax.crypto.Cipher;
import javax.crypto.Mac;
public final class FingerprintManagerCompat
{
static final b a = new c();
private Context b;
static
{
if (Build.VERSION.SDK_INT >= 23)
{
a = new a();
return;
}
}
private FingerprintManagerCompat(Context paramContext)
{
this.b = paramContext;
}
public static FingerprintManagerCompat from(Context paramContext)
{
return new FingerprintManagerCompat(paramContext);
}
public final void authenticate(@Nullable CryptoObject paramCryptoObject, int paramInt, @Nullable CancellationSignal paramCancellationSignal, @NonNull AuthenticationCallback paramAuthenticationCallback, @Nullable Handler paramHandler)
{
a.a(this.b, paramCryptoObject, paramInt, paramCancellationSignal, paramAuthenticationCallback, paramHandler);
}
public final boolean hasEnrolledFingerprints()
{
return a.a(this.b);
}
public final boolean isHardwareDetected()
{
return a.b(this.b);
}
public static abstract class AuthenticationCallback
{
public void onAuthenticationError(int paramInt, CharSequence paramCharSequence) {}
public void onAuthenticationFailed() {}
public void onAuthenticationHelp(int paramInt, CharSequence paramCharSequence) {}
public void onAuthenticationSucceeded(FingerprintManagerCompat.AuthenticationResult paramAuthenticationResult) {}
}
public static final class AuthenticationResult
{
private FingerprintManagerCompat.CryptoObject a;
public AuthenticationResult(FingerprintManagerCompat.CryptoObject paramCryptoObject)
{
this.a = paramCryptoObject;
}
public final FingerprintManagerCompat.CryptoObject getCryptoObject()
{
return this.a;
}
}
public static class CryptoObject
{
private final Signature a;
private final Cipher b;
private final Mac c;
public CryptoObject(Signature paramSignature)
{
this.a = paramSignature;
this.b = null;
this.c = null;
}
public CryptoObject(Cipher paramCipher)
{
this.b = paramCipher;
this.a = null;
this.c = null;
}
public CryptoObject(Mac paramMac)
{
this.c = paramMac;
this.b = null;
this.a = null;
}
public Cipher getCipher()
{
return this.b;
}
public Mac getMac()
{
return this.c;
}
public Signature getSignature()
{
return this.a;
}
}
static final class a
implements FingerprintManagerCompat.b
{
public final void a(Context paramContext, FingerprintManagerCompat.CryptoObject paramCryptoObject, int paramInt, CancellationSignal paramCancellationSignal, FingerprintManagerCompat.AuthenticationCallback paramAuthenticationCallback, Handler paramHandler)
{
Object localObject = null;
if (paramCryptoObject != null) {
if (paramCryptoObject.getCipher() != null) {
paramCryptoObject = new FingerprintManagerCompatApi23.CryptoObject(paramCryptoObject.getCipher());
}
}
for (;;)
{
if (paramCancellationSignal != null) {
localObject = paramCancellationSignal.getCancellationSignalObject();
}
FingerprintManagerCompatApi23.authenticate(paramContext, paramCryptoObject, paramInt, localObject, new FingerprintManagerCompatApi23.AuthenticationCallback()
{
public final void onAuthenticationError(int paramAnonymousInt, CharSequence paramAnonymousCharSequence)
{
this.a.onAuthenticationError(paramAnonymousInt, paramAnonymousCharSequence);
}
public final void onAuthenticationFailed()
{
this.a.onAuthenticationFailed();
}
public final void onAuthenticationHelp(int paramAnonymousInt, CharSequence paramAnonymousCharSequence)
{
this.a.onAuthenticationHelp(paramAnonymousInt, paramAnonymousCharSequence);
}
public final void onAuthenticationSucceeded(FingerprintManagerCompatApi23.AuthenticationResultInternal paramAnonymousAuthenticationResultInternal)
{
FingerprintManagerCompat.AuthenticationCallback localAuthenticationCallback = this.a;
paramAnonymousAuthenticationResultInternal = paramAnonymousAuthenticationResultInternal.getCryptoObject();
if (paramAnonymousAuthenticationResultInternal != null) {
if (paramAnonymousAuthenticationResultInternal.getCipher() != null) {
paramAnonymousAuthenticationResultInternal = new FingerprintManagerCompat.CryptoObject(paramAnonymousAuthenticationResultInternal.getCipher());
}
}
for (;;)
{
localAuthenticationCallback.onAuthenticationSucceeded(new FingerprintManagerCompat.AuthenticationResult(paramAnonymousAuthenticationResultInternal));
return;
if (paramAnonymousAuthenticationResultInternal.getSignature() != null) {
paramAnonymousAuthenticationResultInternal = new FingerprintManagerCompat.CryptoObject(paramAnonymousAuthenticationResultInternal.getSignature());
} else if (paramAnonymousAuthenticationResultInternal.getMac() != null) {
paramAnonymousAuthenticationResultInternal = new FingerprintManagerCompat.CryptoObject(paramAnonymousAuthenticationResultInternal.getMac());
} else {
paramAnonymousAuthenticationResultInternal = null;
}
}
}
}, paramHandler);
return;
if (paramCryptoObject.getSignature() != null) {
paramCryptoObject = new FingerprintManagerCompatApi23.CryptoObject(paramCryptoObject.getSignature());
} else if (paramCryptoObject.getMac() != null) {
paramCryptoObject = new FingerprintManagerCompatApi23.CryptoObject(paramCryptoObject.getMac());
} else {
paramCryptoObject = null;
}
}
}
public final boolean a(Context paramContext)
{
return FingerprintManagerCompatApi23.hasEnrolledFingerprints(paramContext);
}
public final boolean b(Context paramContext)
{
return FingerprintManagerCompatApi23.isHardwareDetected(paramContext);
}
}
static abstract interface b
{
public abstract void a(Context paramContext, FingerprintManagerCompat.CryptoObject paramCryptoObject, int paramInt, CancellationSignal paramCancellationSignal, FingerprintManagerCompat.AuthenticationCallback paramAuthenticationCallback, Handler paramHandler);
public abstract boolean a(Context paramContext);
public abstract boolean b(Context paramContext);
}
static final class c
implements FingerprintManagerCompat.b
{
public final void a(Context paramContext, FingerprintManagerCompat.CryptoObject paramCryptoObject, int paramInt, CancellationSignal paramCancellationSignal, FingerprintManagerCompat.AuthenticationCallback paramAuthenticationCallback, Handler paramHandler) {}
public final boolean a(Context paramContext)
{
return false;
}
public final boolean b(Context paramContext)
{
return false;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/hardware/fingerprint/FingerprintManagerCompat.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/