mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-24 15:09:34 -05:00
af57c5c857
Signed-off-by: Tad <tad@spotco.us>
51 lines
1.8 KiB
Diff
51 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Khaled Abdelmohsen <khelmy@google.com>
|
|
Date: Mon, 24 Feb 2020 16:59:21 +0000
|
|
Subject: [PATCH] Create source stamp verifier
|
|
|
|
Bug: 148005911
|
|
Test: gradlew test
|
|
Change-Id: I7008c9567ad5e8b63e7f6ba192d38b10c5c9a2dc
|
|
Merged-In: I7008c9567ad5e8b63e7f6ba192d38b10c5c9a2dc
|
|
(cherry picked from commit a3970357d65d59b70c6ccf2c5c55000cb4310953)
|
|
---
|
|
.../internal/apk/ApkSigningBlockUtils.java | 18 ++++++++++++++++++
|
|
1 file changed, 18 insertions(+)
|
|
|
|
diff --git a/src/main/java/com/android/apksig/internal/apk/ApkSigningBlockUtils.java b/src/main/java/com/android/apksig/internal/apk/ApkSigningBlockUtils.java
|
|
index 2330f6d..f15597b 100644
|
|
--- a/src/main/java/com/android/apksig/internal/apk/ApkSigningBlockUtils.java
|
|
+++ b/src/main/java/com/android/apksig/internal/apk/ApkSigningBlockUtils.java
|
|
@@ -998,6 +998,20 @@ public class ApkSigningBlockUtils {
|
|
return false;
|
|
}
|
|
|
|
+ public boolean containsWarnings() {
|
|
+ if (!mWarnings.isEmpty()) {
|
|
+ return true;
|
|
+ }
|
|
+ if (!signers.isEmpty()) {
|
|
+ for (SignerInfo signer : signers) {
|
|
+ if (signer.containsWarnings()) {
|
|
+ return true;
|
|
+ }
|
|
+ }
|
|
+ }
|
|
+ return false;
|
|
+ }
|
|
+
|
|
public void addError(ApkVerifier.Issue msg, Object... parameters) {
|
|
mErrors.add(new ApkVerifier.IssueWithParams(msg, parameters));
|
|
}
|
|
@@ -1042,6 +1056,10 @@ public class ApkSigningBlockUtils {
|
|
return !mErrors.isEmpty();
|
|
}
|
|
|
|
+ public boolean containsWarnings() {
|
|
+ return !mWarnings.isEmpty();
|
|
+ }
|
|
+
|
|
public List<ApkVerifier.IssueWithParams> getErrors() {
|
|
return mErrors;
|
|
}
|