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

Side by Side Diff: build/android/rezip/RezipApk.java

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « build/android/pylib/utils/md5sum_test.py ('k') | build/android/screenshot.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import java.io.File; 5 import java.io.File;
6 import java.io.FileOutputStream; 6 import java.io.FileOutputStream;
7 import java.io.IOException; 7 import java.io.IOException;
8 import java.io.InputStream; 8 import java.io.InputStream;
9 import java.io.OutputStream; 9 import java.io.OutputStream;
10 import java.util.ArrayList; 10 import java.util.ArrayList;
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 JarEntry outEntry = null; 316 JarEntry outEntry = null;
317 boolean isCrazy = isCrazyLibraryFilename(name); 317 boolean isCrazy = isCrazyLibraryFilename(name);
318 if (isCrazy) { 318 if (isCrazy) {
319 // "crazy" libraries are alway output uncompressed (STORED). 319 // "crazy" libraries are alway output uncompressed (STORED).
320 outEntry = makeStoredEntry(name, inEntry, in); 320 outEntry = makeStoredEntry(name, inEntry, in);
321 numCrazy++; 321 numCrazy++;
322 if (numCrazy > 1) { 322 if (numCrazy > 1) {
323 throw new UnsupportedOperationException( 323 throw new UnsupportedOperationException(
324 "Found more than one library\n" 324 "Found more than one library\n"
325 + "Multiple libraries are not supported for APKs tha t use " 325 + "Multiple libraries are not supported for APKs tha t use "
326 + "'load_library_from_zip_file'.\n" 326 + "'load_library_from_zip'.\n"
327 + "See crbug/388223.\n" 327 + "See crbug/388223.\n"
328 + "Note, check that your build is clean.\n" 328 + "Note, check that your build is clean.\n"
329 + "An unclean build can incorrectly incorporate old " 329 + "An unclean build can incorrectly incorporate old "
330 + "libraries in the APK."); 330 + "libraries in the APK.");
331 } 331 }
332 } else if (inEntry.getMethod() == JarEntry.STORED) { 332 } else if (inEntry.getMethod() == JarEntry.STORED) {
333 // Preserve the STORED method of the input entry. 333 // Preserve the STORED method of the input entry.
334 outEntry = new JarEntry(inEntry); 334 outEntry = new JarEntry(inEntry);
335 outEntry.setExtra(null); 335 outEntry.setExtra(null);
336 } else { 336 } else {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 outputJar.setLevel(9); 439 outputJar.setLevel(9);
440 440
441 rezip(inputJar, outputJar, outCount, addAlignment, rename); 441 rezip(inputJar, outputJar, outCount, addAlignment, rename);
442 outputJar.close(); 442 outputJar.close();
443 } finally { 443 } finally {
444 if (inputJar != null) inputJar.close(); 444 if (inputJar != null) inputJar.close();
445 if (outputFile != null) outputFile.close(); 445 if (outputFile != null) outputFile.close();
446 } 446 }
447 } 447 }
448 } 448 }
OLDNEW
« no previous file with comments | « build/android/pylib/utils/md5sum_test.py ('k') | build/android/screenshot.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698