1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 14:30:11 +01:00

apps with no <uses-sdk> get strange values of minSdkVersion

Using this example app which does not have <uses-sdk>:
https://android.googlesource.com/platform/development/+log/master/samples/ApiDemos/assets/HelloActivity.apk

aapt then returns "sdkVersion:'IceCreamSandwich'".  minSdkVersion is only
ever supposed to be an integer, so this is a bizarre APK.  It is included
only as a binary in the git repo for Android sample code.  But who knows
what else is out there, so report and error and carry on with the update
process.
This commit is contained in:
Hans-Christoph Steiner 2014-06-03 13:28:35 -04:00
parent 57a4e03277
commit d68830418b

View File

@ -419,7 +419,12 @@ def scan_apks(apps, apkcache, repodir, knownapks):
path = match.group(2)
thisinfo['icons_src'][density] = path
elif line.startswith("sdkVersion:"):
thisinfo['sdkversion'] = re.match(sdkversion_pat, line).group(1)
m = re.match(sdkversion_pat, line)
if m is None:
logging.error(line.replace('sdkVersion:', '')
+ ' is not a valid minSdkVersion!')
else:
thisinfo['sdkversion'] = m.group(1)
elif line.startswith("maxSdkVersion:"):
thisinfo['maxsdkversion'] = re.match(sdkversion_pat, line).group(1)
elif line.startswith("native-code:"):