chiark / gitweb /
update: 'features' list only includes required features
authorHans-Christoph Steiner <hans@eds.org>
Tue, 20 Feb 2018 16:08:55 +0000 (17:08 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Tue, 20 Feb 2018 16:08:55 +0000 (17:08 +0100)
The F-Droid index 'features' list is not the same as what is in the
AndroidManifest.xml.  It only includes "required" features, for example.

fdroidserver/update.py

index 511129822569ec43676af7b47895d7d5500f920b..1da8405f6f50b1b75dba985a2076844a53adcc0f 100644 (file)
@@ -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,