FingerprintManagerCompatApi23.java
5.23 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
package android.support.v4.hardware.fingerprint;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.pm.PackageManager;
import android.hardware.fingerprint.FingerprintManager;
import android.hardware.fingerprint.FingerprintManager.AuthenticationCallback;
import android.hardware.fingerprint.FingerprintManager.AuthenticationResult;
import android.hardware.fingerprint.FingerprintManager.CryptoObject;
import android.os.CancellationSignal;
import android.os.Handler;
import android.support.annotation.RequiresApi;
import android.support.annotation.RestrictTo;
import java.security.Signature;
import javax.crypto.Cipher;
import javax.crypto.Mac;
@TargetApi(23)
@RequiresApi(23)
@RestrictTo({android.support.annotation.RestrictTo.Scope.LIBRARY_GROUP})
public final class FingerprintManagerCompatApi23
{
private static FingerprintManager a(Context paramContext)
{
if (paramContext.getPackageManager().hasSystemFeature("android.hardware.fingerprint")) {
return (FingerprintManager)paramContext.getSystemService(FingerprintManager.class);
}
return null;
}
public static void authenticate(Context paramContext, CryptoObject paramCryptoObject, int paramInt, Object paramObject, AuthenticationCallback paramAuthenticationCallback, Handler paramHandler)
{
FingerprintManager localFingerprintManager = a(paramContext);
if (localFingerprintManager != null)
{
if (paramCryptoObject == null) {
break label101;
}
if (paramCryptoObject.getCipher() == null) {
break label57;
}
paramContext = new FingerprintManager.CryptoObject(paramCryptoObject.getCipher());
}
for (;;)
{
localFingerprintManager.authenticate(paramContext, (CancellationSignal)paramObject, paramInt, new FingerprintManager.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(FingerprintManager.AuthenticationResult paramAnonymousAuthenticationResult)
{
this.a.onAuthenticationSucceeded(new FingerprintManagerCompatApi23.AuthenticationResultInternal(FingerprintManagerCompatApi23.a(paramAnonymousAuthenticationResult.getCryptoObject())));
}
}, paramHandler);
return;
label57:
if (paramCryptoObject.getSignature() != null) {
paramContext = new FingerprintManager.CryptoObject(paramCryptoObject.getSignature());
} else if (paramCryptoObject.getMac() != null) {
paramContext = new FingerprintManager.CryptoObject(paramCryptoObject.getMac());
} else {
label101:
paramContext = null;
}
}
}
public static boolean hasEnrolledFingerprints(Context paramContext)
{
paramContext = a(paramContext);
return (paramContext != null) && (paramContext.hasEnrolledFingerprints());
}
public static boolean isHardwareDetected(Context paramContext)
{
paramContext = a(paramContext);
return (paramContext != null) && (paramContext.isHardwareDetected());
}
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(FingerprintManagerCompatApi23.AuthenticationResultInternal paramAuthenticationResultInternal) {}
}
public static final class AuthenticationResultInternal
{
private FingerprintManagerCompatApi23.CryptoObject a;
public AuthenticationResultInternal(FingerprintManagerCompatApi23.CryptoObject paramCryptoObject)
{
this.a = paramCryptoObject;
}
public final FingerprintManagerCompatApi23.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;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/android/support/v4/hardware/fingerprint/FingerprintManagerCompatApi23.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/