Skip to content

Commit

Permalink
* [android] fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
sospartan committed Jul 27, 2016
1 parent 01d2479 commit 82a03fd
Showing 1 changed file with 31 additions and 31 deletions.
Expand Up @@ -293,47 +293,47 @@ public static boolean initSo(String libName, int version, IWXUserTrackAdapter ut
System.loadLibrary(libName);
commit(utAdapter, null, null);

InitSuc = true;
} catch (Exception | Error e2) {
if (cpuType.contains(ARMEABI)||cpuType.contains(X86)) {
commit(utAdapter, WXErrorCode.WX_ERR_LOAD_SO.getErrorCode(), WXErrorCode.WX_ERR_LOAD_SO.getErrorMsg() + ":" + e2.getMessage());
InitSuc = true;
} catch (Exception | Error e2) {
if (cpuType.contains(ARMEABI) || cpuType.contains(X86)) {
commit(utAdapter, WXErrorCode.WX_ERR_LOAD_SO.getErrorCode(), WXErrorCode.WX_ERR_LOAD_SO.getErrorMsg() + ":" + e2.getMessage());
}
InitSuc = false;
}
InitSuc = false;
}

try {
try {

if (!InitSuc) {
if (!InitSuc) {

//File extracted from apk already exists.
if (isExist(libName, version)) {
boolean res = _loadUnzipSo(libName, version, utAdapter);
if (res) {
return res;
} else {
//Delete the corrupt so library, and extract it again.
removeSoIfExit(libName, version);
//File extracted from apk already exists.
if (isExist(libName, version)) {
boolean res = _loadUnzipSo(libName, version, utAdapter);
if (res) {
return res;
} else {
//Delete the corrupt so library, and extract it again.
removeSoIfExit(libName, version);
}
}
}

//Fail for loading file from libs, extract so library from so and load it.
if (cpuType.equalsIgnoreCase(MIPS)) {
return false;
} else {
try {
InitSuc = unZipSelectedFiles(libName, version, utAdapter);
} catch (IOException e2) {
e2.printStackTrace();
//Fail for loading file from libs, extract so library from so and load it.
if (cpuType.equalsIgnoreCase(MIPS)) {
return false;
} else {
try {
InitSuc = unZipSelectedFiles(libName, version, utAdapter);
} catch (IOException e2) {
e2.printStackTrace();
}
}
}

}
} catch (Exception | Error e) {
InitSuc = false;
e.printStackTrace();
}
} catch (Exception | Error e) {
InitSuc = false;
e.printStackTrace();
}
return InitSuc;

return InitSuc;
}

private static String _getFieldReflectively(Build build, String fieldName) {
Expand Down

0 comments on commit 82a03fd

Please sign in to comment.