use of android.taobao.atlas.framework.bundlestorage.BundleArchive in project atlas by alibaba.
the class Framework method getInstalledBundle.
/**
* 存在隐患 storelocation后期被更改
*/
public static File getInstalledBundle(String location, String bundleVersion) {
try {
if (new File(STORAGE_LOCATION + location).exists()) {
BundleArchive archive = new BundleArchive(location, new File(STORAGE_LOCATION + location), 0, 0);
String version = archive.getCurrentRevision().getVersion();
if (TextUtils.isEmpty(bundleVersion) || version.equals(bundleVersion)) {
return archive.getArchiveFile();
} else {
return null;
}
}
return null;
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
Aggregations