Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
0dcd0735
Commit
0dcd0735
authored
Jan 12, 2018
by
topjohnwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crashes on Lollipop
parent
2fe35d57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
2 deletions
+30
-2
FingerprintHelper.java
...in/java/com/topjohnwu/magisk/utils/FingerprintHelper.java
+30
-2
No files found.
src/main/java/com/topjohnwu/magisk/utils/FingerprintHelper.java
View file @
0dcd0735
...
@@ -18,7 +18,7 @@ import javax.crypto.KeyGenerator;
...
@@ -18,7 +18,7 @@ import javax.crypto.KeyGenerator;
import
javax.crypto.SecretKey
;
import
javax.crypto.SecretKey
;
@TargetApi
(
Build
.
VERSION_CODES
.
M
)
@TargetApi
(
Build
.
VERSION_CODES
.
M
)
public
abstract
class
FingerprintHelper
extends
FingerprintManager
.
AuthenticationCallback
{
public
abstract
class
FingerprintHelper
{
private
FingerprintManager
manager
;
private
FingerprintManager
manager
;
private
Cipher
cipher
;
private
Cipher
cipher
;
...
@@ -54,10 +54,38 @@ public abstract class FingerprintHelper extends FingerprintManager.Authenticatio
...
@@ -54,10 +54,38 @@ public abstract class FingerprintHelper extends FingerprintManager.Authenticatio
}
}
}
}
public
abstract
void
onAuthenticationError
(
int
errorCode
,
CharSequence
errString
);
public
abstract
void
onAuthenticationHelp
(
int
helpCode
,
CharSequence
helpString
);
public
abstract
void
onAuthenticationSucceeded
(
FingerprintManager
.
AuthenticationResult
result
);
public
abstract
void
onAuthenticationFailed
();
public
void
startAuth
()
{
public
void
startAuth
()
{
cancel
=
new
CancellationSignal
();
cancel
=
new
CancellationSignal
();
FingerprintManager
.
CryptoObject
cryptoObject
=
new
FingerprintManager
.
CryptoObject
(
cipher
);
FingerprintManager
.
CryptoObject
cryptoObject
=
new
FingerprintManager
.
CryptoObject
(
cipher
);
manager
.
authenticate
(
cryptoObject
,
cancel
,
0
,
this
,
null
);
manager
.
authenticate
(
cryptoObject
,
cancel
,
0
,
new
FingerprintManager
.
AuthenticationCallback
()
{
@Override
public
void
onAuthenticationError
(
int
errorCode
,
CharSequence
errString
)
{
FingerprintHelper
.
this
.
onAuthenticationError
(
errorCode
,
errString
);
}
@Override
public
void
onAuthenticationHelp
(
int
helpCode
,
CharSequence
helpString
)
{
FingerprintHelper
.
this
.
onAuthenticationHelp
(
helpCode
,
helpString
);
}
@Override
public
void
onAuthenticationSucceeded
(
FingerprintManager
.
AuthenticationResult
result
)
{
FingerprintHelper
.
this
.
onAuthenticationSucceeded
(
result
);
}
@Override
public
void
onAuthenticationFailed
()
{
FingerprintHelper
.
this
.
onAuthenticationFailed
();
}
},
null
);
}
}
public
void
cancel
()
{
public
void
cancel
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment