Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Side by Side Diff: build/android/incremental_install/generate_android_manifest.py

Issue 2488443003: Force android:extractNativeLibs="false" for incremental apks (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2015 The Chromium Authors. All rights reserved. 3 # Copyright 2015 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 """Creates an AndroidManifest.xml for an incremental APK. 6 """Creates an AndroidManifest.xml for an incremental APK.
7 7
8 Given the manifest file for the real APK, generates an AndroidManifest.xml with 8 Given the manifest file for the real APK, generates an AndroidManifest.xml with
9 the application class changed to IncrementalApplication. 9 the application class changed to IncrementalApplication.
10 """ 10 """
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 disable_isolated_processes: Whether to set all isolatedProcess attributes to 61 disable_isolated_processes: Whether to set all isolatedProcess attributes to
62 false 62 false
63 63
64 Returns: 64 Returns:
65 The transformed AndroidManifest.xml. 65 The transformed AndroidManifest.xml.
66 """ 66 """
67 if disable_isolated_processes: 67 if disable_isolated_processes:
68 main_manifest = main_manifest.replace('isolatedProcess="true"', 68 main_manifest = main_manifest.replace('isolatedProcess="true"',
69 'isolatedProcess="false"') 69 'isolatedProcess="false"')
70 70
71 # Disable check for page-aligned native libraries.
72 main_manifest = main_manifest.replace('extractNativeLibs="false"',
73 'extractNativeLibs="true"')
74
71 doc = ElementTree.fromstring(main_manifest) 75 doc = ElementTree.fromstring(main_manifest)
72 app_node = doc.find('application') 76 app_node = doc.find('application')
73 if app_node is None: 77 if app_node is None:
74 app_node = ElementTree.SubElement(doc, 'application') 78 app_node = ElementTree.SubElement(doc, 'application')
75 79
76 real_app_class = app_node.get(_AddNamespace('name'), 80 real_app_class = app_node.get(_AddNamespace('name'),
77 _DEFAULT_APPLICATION_CLASS) 81 _DEFAULT_APPLICATION_CLASS)
78 app_node.set(_AddNamespace('name'), _INCREMENTAL_APP_NAME) 82 app_node.set(_AddNamespace('name'), _INCREMENTAL_APP_NAME)
79 _CreateMetaData(app_node, _META_DATA_APP_NAME, real_app_class) 83 _CreateMetaData(app_node, _META_DATA_APP_NAME, real_app_class)
80 84
(...skipping 19 matching lines...) Expand all
100 with open(options.out_manifest, 'w') as f: 104 with open(options.out_manifest, 'w') as f:
101 f.write(new_manifest_data) 105 f.write(new_manifest_data)
102 106
103 if options.depfile: 107 if options.depfile:
104 deps = [options.src_manifest] 108 deps = [options.src_manifest]
105 build_utils.WriteDepfile(options.depfile, options.out_manifest, deps) 109 build_utils.WriteDepfile(options.depfile, options.out_manifest, deps)
106 110
107 111
108 if __name__ == '__main__': 112 if __name__ == '__main__':
109 main() 113 main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698