Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#	atlas-core/src/main/java/android/taobao/atlas/framework/BundleInstaller.java
  • Loading branch information
关杰 committed Apr 24, 2017
2 parents 229ef67 + 32e19be commit 685b5a4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -616,6 +616,11 @@ public static synchronized void resolveInternalBundles() {

/**
* 获取bundle源文件地址
*
* bundle finding order by follwing paths:
* 1) ${getApplicationInfo().dataDir}/lib/
* 2) ${getApplicationInfo().nativeLibraryDir}
* 3) apk's "lib/armeabi" path.
* @param location
*/
private void findBundleSource(String location) throws IOException{
Expand All @@ -625,8 +630,10 @@ private void findBundleSource(String location) throws IOException{
String bundleFileName = String.format("lib%s.so",location.replace(".","_"));
String bundlePath = String.format("%s/lib/%s", dataDir,bundleFileName);
File bundleFile = new File(bundlePath);
BundleListing.BundleInfo info = AtlasBundleInfoManager.instance().getBundleInfo(location);
if(bundleFile.exists() && info.isInternal()){
if(!bundleFile.exists()){
bundleFile = new File(RuntimeVariables.androidApplication.getApplicationInfo().nativeLibraryDir,bundleFileName);
}
if(bundleFile.exists() && AtlasBundleInfoManager.instance().isInternalBundle(location)){
mTmpBundleSourceFile = bundleFile;
Log.e("BundleInstaller","find valid bundle : "+bundleFile.getAbsolutePath());
}else{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,17 @@ public static void reset(){
}

public static void addBundleResources(String assetPath) throws Exception{
updateResources(RuntimeVariables.delegateResources, assetPath, BUNDLE_RES);
synchronized (DelegateResources.class) {
updateResources(RuntimeVariables.delegateResources, assetPath, BUNDLE_RES);
}
}

public static void addApkpatchResources(String assetPath) throws Exception{
AtlasHacks.defineAndVerify();
sKernalPathPath = assetPath;
updateResources(RuntimeVariables.delegateResources, assetPath, APK_RES);
synchronized (DelegateResources.class) {
updateResources(RuntimeVariables.delegateResources, assetPath, APK_RES);
}
}

public static String getCurrentAssetpathStr(AssetManager manager){
Expand Down

0 comments on commit 685b5a4

Please sign in to comment.