summaryrefslogtreecommitdiff
path: root/scripts/manifest_fixer_test.py
diff options
context:
space:
mode:
author Andrew Wheeler <awheeler@motorola.com> 2021-01-12 21:02:03 -0600
committer Andrew Wheeler <awheeler@motorola.com> 2021-01-14 14:11:39 -0600
commit18dcd046ad91c4a11267969529add509b44bde9a (patch)
tree50c647c3c8fa280273b97ecd8291676ea847e5db /scripts/manifest_fixer_test.py
parent2bcb4940bbda88b4142d2db17208c5aa62f2d7dc (diff)
manifest_fixer: Set targetSdkVersion to '16' for libraries
manifest_fixer.py sets a lib's targetSdkVersion to '15' if it is not explicitly set. But ManifestMerger will add dangerous permissions CALL_LOG_READ/CALL_LOG_WRITE if the following conditions are met: - The app's targetSdkVersion is >16 - A linked lib's targetSdkVersion is <16 - The app has CONTACTS_READ/CONTACTS_WRITE permissions This condition is triggered for some (OEM) app builds (of Settings). Update manifest_fixer.py to use '16' as its default targetSdkVersion so that manifest_merge doesn't add these dangerous permissions. Change-Id: Id5f41f7da98c190c8d145fceba0085cf473f4c7a
Diffstat (limited to 'scripts/manifest_fixer_test.py')
-rwxr-xr-xscripts/manifest_fixer_test.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/manifest_fixer_test.py b/scripts/manifest_fixer_test.py
index d6e7f2674..3a0a25d1c 100755
--- a/scripts/manifest_fixer_test.py
+++ b/scripts/manifest_fixer_test.py
@@ -173,7 +173,7 @@ class RaiseMinSdkVersionTest(unittest.TestCase):
"""Tests inserting targetSdkVersion when minSdkVersion exists."""
manifest_input = self.manifest_tmpl % self.uses_sdk(min='27')
- expected = self.manifest_tmpl % self.uses_sdk(min='28', target='15')
+ expected = self.manifest_tmpl % self.uses_sdk(min='28', target='16')
output = self.raise_min_sdk_version_test(manifest_input, '28', '29', True)
self.assertEqual(output, expected)
@@ -189,7 +189,7 @@ class RaiseMinSdkVersionTest(unittest.TestCase):
"""Tests inserting targetSdkVersion when minSdkVersion does not exist."""
manifest_input = self.manifest_tmpl % ''
- expected = self.manifest_tmpl % self.uses_sdk(min='28', target='15')
+ expected = self.manifest_tmpl % self.uses_sdk(min='28', target='16')
output = self.raise_min_sdk_version_test(manifest_input, '28', '29', True)
self.assertEqual(output, expected)