From: Hans-Christoph Steiner Date: Tue, 20 Feb 2018 16:08:55 +0000 (+0100) Subject: update: 'features' list only includes required features X-Git-Tag: 1.0.1~2^2~10 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=63d4d462914daae01dbccfff6219f6ccad7f4cf2;p=fdroidserver.git update: 'features' list only includes required features The F-Droid index 'features' list is not the same as what is in the AndroidManifest.xml. It only includes "required" features, for example. --- diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 51112982..1da8405f 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -1268,7 +1268,9 @@ def scan_apk_androguard(apk, apkfile): and feature != "android.hardware.screen.landscape": if feature.startswith("android.feature."): feature = feature[16:] - apk['features'].append(feature) + required = item.attrib.get('{' + xml.nsmap['android'] + '}required') + if required is None or required == 'true': + apk['features'].append(feature) def process_apk(apkcache, apkfilename, repodir, knownapks, use_date_from_apk=False,