diff options
| author | Xavier Ducrohet <xav@android.com> | 2010-05-07 13:49:28 -0700 |
|---|---|---|
| committer | Xavier Ducrohet <xav@android.com> | 2010-05-07 14:02:03 -0700 |
| commit | b26643946b689de13af299f1b4c28fba5c8409b2 (patch) | |
| tree | 37332730308f0dc10f24bbdee868acd425d0f0fa /apkbuilder | |
| parent | 90827a2dedca04b818a313dde19261f2f20a8683 (diff) | |
| download | sdk-b26643946b689de13af299f1b4c28fba5c8409b2.tar.gz sdk-b26643946b689de13af299f1b4c28fba5c8409b2.tar.bz2 sdk-b26643946b689de13af299f1b4c28fba5c8409b2.zip | |
ApkBuilderTask is now more lenient with missing libs/ folders.
Change-Id: Ic40c35e7074a91fb40094d3c5e5a605ff1ea2fef
Diffstat (limited to 'apkbuilder')
| -rw-r--r-- | apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderImpl.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderImpl.java b/apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderImpl.java index 3189c4135..2bc762597 100644 --- a/apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderImpl.java +++ b/apkbuilder/src/com/android/apkbuilder/internal/ApkBuilderImpl.java @@ -246,9 +246,10 @@ public final class ApkBuilderImpl { * @param file the {@link File} to process * @param resourcesJars the collection of FileInputStream to fill up with jar files. * @throws FileNotFoundException + * @throws ApkCreationException */ public static void processJar(File file, Collection<FileInputStream> resourcesJars) - throws FileNotFoundException { + throws FileNotFoundException, ApkCreationException { if (file.isDirectory()) { String[] filenames = file.list(new FilenameFilter() { public boolean accept(File dir, String name) { @@ -260,8 +261,10 @@ public final class ApkBuilderImpl { File f = new File(file, filename); processJarFile(f, resourcesJars); } - } else { + } else if (file.isFile()) { processJarFile(file, resourcesJars); + } else { + throw new ApkCreationException(file.getAbsolutePath()+ " does not exist!"); } } |
