You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by zs...@apache.org on 2017/05/25 06:51:36 UTC

[2/5] incubator-weex git commit: * [android] handle exception when so is not found

* [android] handle exception when so is not found


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/2c9ace00
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/2c9ace00
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/2c9ace00

Branch: refs/heads/0.13-dev
Commit: 2c9ace00d04b8a2d1d0e28194b6cdd030b5dadd2
Parents: 9b03daa
Author: zshshr <zh...@gmail.com>
Authored: Fri May 19 15:45:24 2017 +0800
Committer: zshshr <zh...@gmail.com>
Committed: Fri May 19 15:45:24 2017 +0800

----------------------------------------------------------------------
 .../src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/2c9ace00/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
----------------------------------------------------------------------
diff --git a/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java b/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
index 75b4840..a7fba8a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
+++ b/android/sdk/src/main/java/com/taobao/weex/utils/WXSoInstallMgrSdk.java
@@ -21,6 +21,7 @@ package com.taobao.weex.utils;
 import android.content.Context;
 import android.content.pm.ApplicationInfo;
 import android.os.Build;
+import android.text.TextUtils;
 
 import com.taobao.weex.IWXStatisticsListener;
 import com.taobao.weappplus_sdk.BuildConfig;
@@ -204,6 +205,9 @@ public class WXSoInstallMgrSdk {
       if(WXSoInstallMgrSdk.class.getClassLoader() instanceof PathClassLoader ) {
 
         String path = ((PathClassLoader) (WXSoInstallMgrSdk.class.getClassLoader())).findLibrary(libName);
+        if(TextUtils.isEmpty(path) ){
+          return false;
+        }
         File file = new File(path);
 
         if (!file.exists() || size == file.length()) {