Fix installer crashing when a checksum is provided.

pull/70/head
Fox2Code 2 years ago
parent 5de88091f6
commit 2c666ad00b

@ -133,7 +133,9 @@ public class InstallerActivity extends CompatActivity {
if (this.canceled) return;
if (checksum != null && !checksum.isEmpty()) {
Log.d(TAG, "Checking for checksum: " + checksum);
this.installerTerminal.addLine("- Checking file integrity");
this.runOnUiThread(() -> {
this.installerTerminal.addLine("- Checking file integrity");
});
if (!Hashes.checkSumMatch(rawModule, checksum)) {
this.setInstallStateFinished(false,
"! File integrity check failed", "");

@ -81,7 +81,7 @@ public class Hashes {
checksum.length() * 8 + "bit checksums");
return false;
}
Log.d(TAG, "Checksum result (data: " + hash+ ",expected: " + checksum);
Log.d(TAG, "Checksum result (data: " + hash+ ",expected: " + checksum + ")");
return hash.equals(checksum.toLowerCase(Locale.ROOT));
}
}

Loading…
Cancel
Save