File tree 1 file changed +14
-2
lines changed
1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -547,9 +547,21 @@ public void onAuthenticated(boolean withFingerprint) {
547
547
+ e .getMessage ();
548
548
Log .e (TAG , errorMessage );
549
549
} catch (IllegalBlockSizeException e ) {
550
+ String message = e .getMessage ();
551
+ String exception = e .getClass ().getSimpleName ();
552
+ if (message == null ) {
553
+ Throwable cause = e .getCause ();
554
+ if (cause != null ) {
555
+ message = cause .getMessage ();
556
+ exception = cause .getClass ().getSimpleName ();
557
+ }
558
+ }
550
559
errorMessage = "Failed to encrypt the data with the generated key: "
551
- + "IllegalBlockSizeException: "
552
- + e .getMessage ();
560
+ + exception + ": " + message ;
561
+ if (message .equals ("Key user not authenticated" )) {
562
+ removePermanentlyInvalidatedKey ();
563
+ errorMessage = "KeyPermanentlyInvalidatedException" ;
564
+ }
553
565
Log .e (TAG , errorMessage );
554
566
}
555
567
You can’t perform that action at this time.
0 commit comments