Loading core/java/android/os/RecoverySystem.java +11 −1 Original line number Diff line number Diff line Loading @@ -117,7 +117,10 @@ public class RecoverySystem { * exception. * * Verification of a package can take significant time, so this * function should not be called from a UI thread. * function should not be called from a UI thread. Interrupting * the thread while this function is in progress will result in a * SecurityException being thrown (and the thread's interrupt flag * will be cleared). * * @param packageFile the package to be verified * @param listener an object to receive periodic progress Loading Loading @@ -259,7 +262,10 @@ public class RecoverySystem { long soFar = 0; raf.seek(0); byte[] buffer = new byte[4096]; boolean interrupted = false; while (soFar < toRead) { interrupted = Thread.interrupted(); if (interrupted) break; int size = buffer.length; if (soFar + size > toRead) { size = (int)(toRead - soFar); Loading @@ -283,6 +289,10 @@ public class RecoverySystem { listener.onProgress(100); } if (interrupted) { throw new SignatureException("verification was interrupted"); } if (!sig.verify(sigInfo.getEncryptedDigest())) { throw new SignatureException("signature digest verification failed"); } Loading Loading
core/java/android/os/RecoverySystem.java +11 −1 Original line number Diff line number Diff line Loading @@ -117,7 +117,10 @@ public class RecoverySystem { * exception. * * Verification of a package can take significant time, so this * function should not be called from a UI thread. * function should not be called from a UI thread. Interrupting * the thread while this function is in progress will result in a * SecurityException being thrown (and the thread's interrupt flag * will be cleared). * * @param packageFile the package to be verified * @param listener an object to receive periodic progress Loading Loading @@ -259,7 +262,10 @@ public class RecoverySystem { long soFar = 0; raf.seek(0); byte[] buffer = new byte[4096]; boolean interrupted = false; while (soFar < toRead) { interrupted = Thread.interrupted(); if (interrupted) break; int size = buffer.length; if (soFar + size > toRead) { size = (int)(toRead - soFar); Loading @@ -283,6 +289,10 @@ public class RecoverySystem { listener.onProgress(100); } if (interrupted) { throw new SignatureException("verification was interrupted"); } if (!sig.verify(sigInfo.getEncryptedDigest())) { throw new SignatureException("signature digest verification failed"); } Loading