Commit 3e475485 authored by Andrew Grieve's avatar Andrew Grieve Committed by Chromium LUCI CQ

Android: Remove android:debuggable in AndroidManifest.xml expectations

I've seen it come in code reviews several times where devs are thinking
that android:debuggable="true" should be added. This is caused because
the AndroidManifest.xml expecations check will locally tell you to add
it if you build without is_official_build=true.

There is no risk of this attribute slipping in unnoticed since play
store won't allow apps to be uploaded with it set, so this filters it
out to remove the annoyance.

Bug: None
Change-Id: I1459f6af3f78f34f12cc9f6e14157e97fe7d91e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2620643
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarPeter Kotwicz <pkotwicz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#842089}
parent 7983979c
...@@ -257,11 +257,18 @@ def NormalizeManifest(manifest_contents): ...@@ -257,11 +257,18 @@ def NormalizeManifest(manifest_contents):
root = ElementTree.fromstring(manifest_contents) root = ElementTree.fromstring(manifest_contents)
package = GetPackage(root) package = GetPackage(root)
# Trichrome's static library version number is updated daily. To avoid
# frequent manifest check failures, we remove the exact version number
# during normalization.
app_node = root.find('application') app_node = root.find('application')
if app_node is not None: if app_node is not None:
# android:debuggable is added when !is_official_build. Strip it out to avoid
# expectation diffs caused by not adding is_official_build. Play store
# blocks uploading apps with it set, so there's no risk of it slipping in.
debuggable_name = '{%s}debuggable' % ANDROID_NAMESPACE
if debuggable_name in app_node.attrib:
del app_node.attrib[debuggable_name]
# Trichrome's static library version number is updated daily. To avoid
# frequent manifest check failures, we remove the exact version number
# during normalization.
for node in app_node.getchildren(): for node in app_node.getchildren():
if (node.tag in ['uses-static-library', 'static-library'] if (node.tag in ['uses-static-library', 'static-library']
and '{%s}version' % ANDROID_NAMESPACE in node.keys() and '{%s}version' % ANDROID_NAMESPACE in node.keys()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment