From 60a0d3d2d15f5794210fadd25dfaa77e85731bda Mon Sep 17 00:00:00 2001 From: superpoussin22 Date: Thu, 16 May 2019 06:08:41 +0200 Subject: [PATCH] handle adaptive icon (#924) * handle adaptive icon --- StaticAnalyzer/views/android/icon_analysis.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/StaticAnalyzer/views/android/icon_analysis.py b/StaticAnalyzer/views/android/icon_analysis.py index 59e6f3bd..930c5d96 100755 --- a/StaticAnalyzer/views/android/icon_analysis.py +++ b/StaticAnalyzer/views/android/icon_analysis.py @@ -116,10 +116,16 @@ def get_icon(apk_path, res_dir): icon_resolution = 0xFFFE - 1 icon_name = a.get_app_icon(max_dpi=icon_resolution) if icon_name: - return { - 'path': os.path.join(os.path.dirname(apk_path), icon_name), - 'hidden': False - } + if '.xml' in icon_name: + return { + 'path': guess_icon_path(res_dir), + 'hidden': False + } + else: + return { + 'path': os.path.join(os.path.dirname(apk_path), icon_name), + 'hidden': False + } return { 'path': guess_icon_path(res_dir), 'hidden': True