From b94cbcfb98056a08582114804870e098c52403eb Mon Sep 17 00:00:00 2001 From: Jumpei Matsuda Date: Fri, 6 Dec 2019 19:11:07 +0900 Subject: [PATCH 1/2] Fixed a bug when reading adaptive icon file --- lib/android_apk.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/android_apk.rb b/lib/android_apk.rb index 95fb18e..0185565 100644 --- a/lib/android_apk.rb +++ b/lib/android_apk.rb @@ -340,8 +340,8 @@ def self.read_adaptive_icon(apk, filepath) return unless apk.icon.end_with?(".xml") && apk.icon.start_with?("res/mipmap-anydpi-v26/") # invalid xml file may throw an error - apk.adaptive_icon = File.open(apk.icon) do |f| - f.each_line.any? { |l| l.include?("adaptive-icon") } + apk.adaptive_icon = !!Zip::File.open(filepath) do |zip_file| + zip_file.find_entry(apk.icon)&.get_input_stream&.read&.include?("adaptive-icon") end rescue StandardError => _e apk.adaptive_icon = false # ensure From 68e70fd231961b21051c92ceab21b3dc4dd890b3 Mon Sep 17 00:00:00 2001 From: Jumpei Matsuda Date: Fri, 6 Dec 2019 19:41:47 +0900 Subject: [PATCH 2/2] Removed unused files --- res/mipmap-anydpi-v26/ic_launcher.xml | Bin 448 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/res/mipmap-anydpi-v26/ic_launcher.xml b/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index c809c05ea258e9270336fe17bf0fe9d43dd4050a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 448 zcmaJ-J5B>J6nrlWi4}-MK_m)Fsz`|&3Pi~fxBzn24p}8xue=MCa1A<+!p&eNS|bz* z#u|Cv$Mb9#V&qdrR4(O1M26rV$X#cR{REtXci=tv02jp|tQCmQu`<|mgMfL~i6dzC(1)Ne!J6UMNby?qGY`*Y dKYFmAIEMbuPi6SycX%$($#0_{XX+ns{svenYdZh{