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

Unified Diff: build/android/gyp/process_resources.py

Issue 1092843003: Revert of Roll Android SDK and AppCompat. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/process_resources.py
diff --git a/build/android/gyp/process_resources.py b/build/android/gyp/process_resources.py
index 4e6c27dcb8fb71dba499d33e2ee5962460fd0bce..52cf1439b942e3de56d33bc4b5b5a02a3ef11151 100755
--- a/build/android/gyp/process_resources.py
+++ b/build/android/gyp/process_resources.py
@@ -10,7 +10,6 @@
(see generate_v14_compatible_resources.py).
"""
-import codecs
import optparse
import os
import re
@@ -113,15 +112,14 @@
if len(java_files) != 1:
return
r_java_file = java_files[0]
- r_java_contents = codecs.open(r_java_file, encoding='utf-8').read()
+ r_java_contents = open(r_java_file).read()
for package in extra_packages:
package_r_java_dir = os.path.join(r_dir, *package.split('.'))
build_utils.MakeDirectory(package_r_java_dir)
package_r_java_path = os.path.join(package_r_java_dir, 'R.java')
- new_r_java = re.sub(r'package [.\w]*;', u'package %s;' % package,
- r_java_contents)
- codecs.open(package_r_java_path, 'w', encoding='utf-8').write(new_r_java)
+ open(package_r_java_path, 'w').write(
+ re.sub(r'package [.\w]*;', 'package %s;' % package, r_java_contents))
# TODO(cjhopman): These extra package's R.java files should be filtered to
# only contain the resources listed in their R.txt files. At this point, we
# have already compiled those other libraries, so doing this would only
« no previous file with comments | « DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698