mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-09 00:40: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:
parent
57a4e03277
commit
d68830418b
@ -419,7 +419,12 @@ def scan_apks(apps, apkcache, repodir, knownapks):
|
|||||||
path = match.group(2)
|
path = match.group(2)
|
||||||
thisinfo['icons_src'][density] = path
|
thisinfo['icons_src'][density] = path
|
||||||
elif line.startswith("sdkVersion:"):
|
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:"):
|
elif line.startswith("maxSdkVersion:"):
|
||||||
thisinfo['maxsdkversion'] = re.match(sdkversion_pat, line).group(1)
|
thisinfo['maxsdkversion'] = re.match(sdkversion_pat, line).group(1)
|
||||||
elif line.startswith("native-code:"):
|
elif line.startswith("native-code:"):
|
||||||
|
Loading…
Reference in New Issue
Block a user