From 7a2e7afc2c6ce34136bb1b8d5a2f726af7a35d1e Mon Sep 17 00:00:00 2001 From: Jumpei Matsuda Date: Tue, 31 Oct 2023 22:21:04 +0900 Subject: [PATCH] feat: Skip unsigned span instead of keeping it --- lib/android_apk/app_signature.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/android_apk/app_signature.rb b/lib/android_apk/app_signature.rb index 7875e2d..6d52c69 100644 --- a/lib/android_apk/app_signature.rb +++ b/lib/android_apk/app_signature.rb @@ -90,6 +90,9 @@ def rotated? private def merge_fingerprints(fingerprints:) merged_fingerprints = fingerprints.each_with_object([]) do |fingerprint, acc| + # SKip unsigned span + next if fingerprint[::AndroidApk::SignatureDigest::SHA256].nil? + if !(last_entry = acc.last).nil? && (last_entry.fetch(::AndroidApk::SignatureDigest::SHA256) == fingerprint.fetch(::AndroidApk::SignatureDigest::SHA256)) last_max_sdk_version = last_entry.fetch("max_sdk_version") min_sdk_version = fingerprint.fetch("min_sdk_version")