Filter out trouble-making feature

This commit is contained in:
Ciaran Gultnieks 2011-10-07 13:29:13 +01:00
parent 49293319b7
commit 87e7d42b2f

View file

@ -127,9 +127,12 @@ for apkfile in glob.glob(os.path.join('repo','*.apk')):
if line.startswith("uses-feature:"): if line.startswith("uses-feature:"):
pat = re.compile(".*'([^']*)'.*") pat = re.compile(".*'([^']*)'.*")
perm = re.match(pat, line).group(1) perm = re.match(pat, line).group(1)
if perm.startswith("android.feature."): #Filter out this, it's only added with the latest SDK tools and
perm = perm[16:] #causes problems for lots of apps.
thisinfo['features'].append(perm) if perm != "android.hardware.screen.portrait":
if perm.startswith("android.feature."):
perm = perm[16:]
thisinfo['features'].append(perm)
if not thisinfo.has_key('sdkversion'): if not thisinfo.has_key('sdkversion'):
print " WARNING: no SDK version information found" print " WARNING: no SDK version information found"