Skip to content

Commit

Permalink
修复多线程同时加载资源出现Resource覆盖问题
Browse files Browse the repository at this point in the history
  • Loading branch information
原枫 committed Apr 17, 2017
1 parent a913c71 commit 8413fa7
Showing 1 changed file with 6 additions and 2 deletions.
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 8413fa7

Please sign in to comment.