Updating Framework Support

This commit is contained in:
Connor Tumbleson
2015-04-19 10:29:28 -05:00
committed by Connor Tumbleson
parent 466319ad51
commit daa1e1d753
4 changed files with 41 additions and 9 deletions

View File

@ -684,6 +684,10 @@ public class Androlib {
mAndRes.installFramework(frameFile);
}
public void updateFramework() throws AndrolibException {
mAndRes.updateFramework();
}
public boolean isFrameworkApk(ResTable resTable) {
for (ResPackage pkg : resTable.listMainPackages()) {
if (pkg.getId() < 64) {

View File

@ -19,6 +19,7 @@ import java.util.Collection;
public class ApkOptions {
public boolean forceBuildAll = false;
public boolean forceDeleteFramework = false;
public boolean debugMode = false;
public boolean verbose = false;
public boolean copyOriginalFiles = false;

View File

@ -591,6 +591,19 @@ final public class AndrolibResources {
throw new CantFindFrameworkResException(id);
}
public void updateFramework() throws AndrolibException {
File dir = getFrameworkDir();
File apk;
apk = new File(dir, "1.apk");
if (! apk.exists()) {
LOGGER.warning("Can't update framework, no file found at: " + apk.getAbsolutePath());
} else {
}
}
public void installFramework(File frameFile) throws AndrolibException {
installFramework(frameFile, apkOptions.frameworkTag);
}