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 |