use of com.android.apksig.ApkSignerEngine in project LSPatch by LSPosed.
the class SigningExtension method onZipEntryOutput.
private void onZipEntryOutput(StoredEntry entry) throws IOException {
setDirty();
String entryName = entry.getCentralDirectoryHeader().getName();
// report the addition of the entry to ApkSignerEngine.
if (entry.isDeleted()) {
return;
}
ApkSignerEngine.InspectJarEntryRequest inspectEntryRequest = signer.outputJarEntry(entryName);
signerProcessedOutputEntryNames.add(entryName);
if (inspectEntryRequest != null) {
try (InputStream inputStream = new BufferedInputStream(entry.open())) {
copyStreamToDataSink(inputStream, inspectEntryRequest.getDataSink());
}
inspectEntryRequest.done();
}
}
Aggregations