move multi catches to multi-catch (java 7), fixed pkg id not being correctly read from apktool.yml

This commit is contained in:
Connor Tumbleson 2013-05-12 10:15:36 -05:00
parent ed67a3d94d
commit c6861e1241
3 changed files with 20 additions and 35 deletions

View File

@ -16,6 +16,7 @@ v2.0.0 (TBA)
-Fixed (issue #427) - Correctly handles `--frame-path` on [b]uild
-Fixed (issue #396) - Correctly handle android:debuggable while in debug mode.
-Fixed (issue #340) - Fixed superclass errors on debug mode.
-Fixed (issue #458) - Fixed pkg id not being correctly set in framework files.
-Updated known bytes for configurations to 38 (from addition of layout direction)
-Fixed NPE when handling odex apks even with --no-src specified. (Thanks Rodrigo Chiossi)

View File

@ -268,7 +268,7 @@ public class Androlib {
flags.put("compression", meta.get("compressionType") == null ? false
: (Boolean) meta.get("compressionType"));
mAndRes.setSdkInfo((Map<String, String>) meta.get("sdkInfo"));
mAndRes.setPackageId((String)meta.get("packageId"));
mAndRes.setPackageId((Map<String, String>) meta.get("packageInfo"));
mAndRes.setVersionInfo((Map<String, String>) meta.get("versionInfo"));
if (outFile == null) {

View File

@ -183,15 +183,7 @@ final public class AndrolibResources {
StreamResult result = new StreamResult(new File(filePath));
transformer.transform(source, result);
} catch (ParserConfigurationException ex) {
throw new AndrolibException(ex);
} catch (SAXException ex) {
throw new AndrolibException(ex);
} catch (IOException ex) {
throw new AndrolibException(ex);
} catch (TransformerConfigurationException ex) {
throw new AndrolibException(ex);
} catch (TransformerException ex) {
} catch (SAXException | ParserConfigurationException | IOException | TransformerException ex) {
throw new AndrolibException(ex);
}
}
@ -233,13 +225,7 @@ final public class AndrolibResources {
StreamResult result = new StreamResult(new File(filePath));
transformer.transform(source, result);
} catch (ParserConfigurationException ex) {
throw new AndrolibException(ex);
} catch (TransformerException ex) {
throw new AndrolibException(ex);
} catch (IOException ex) {
throw new AndrolibException(ex);
} catch (SAXException ex) {
} catch (SAXException | ParserConfigurationException | IOException | TransformerException ex) {
throw new AndrolibException(ex);
}
}
@ -279,15 +265,7 @@ final public class AndrolibResources {
StreamResult result = new StreamResult(new File(filePath));
transformer.transform(source, result);
} catch (ParserConfigurationException ex) {
throw new AndrolibException(ex);
} catch (SAXException ex) {
throw new AndrolibException(ex);
} catch (IOException ex) {
throw new AndrolibException(ex);
} catch (TransformerConfigurationException ex) {
throw new AndrolibException(ex);
} catch (TransformerException ex) {
} catch (SAXException | ParserConfigurationException | IOException | TransformerException ex) {
throw new AndrolibException(ex);
}
}
@ -372,8 +350,10 @@ final public class AndrolibResources {
}
}
public void setPackageId(String id) {
mPackageId = id;
public void setPackageId(Map<String, String> map) {
if (map != null) {
mPackageId = map.get("cur_package_id");
}
}
public void aaptPackage(File apkFile, File manifest, File resDir,
@ -495,6 +475,10 @@ final public class AndrolibResources {
}
try {
OS.exec(cmd.toArray(new String[0]));
if (flags.get("verbose")) {
LOGGER.info("command ran: ");
LOGGER.info(cmd.toString());
}
} catch (BrutException ex) {
throw new AndrolibException(ex);
}