Commit fe96d329d773722d0aeb337bf7fbb0b131eb00ec

Authored by 袁思汶
1 parent 87176aed

bundle判空异常处理

OutSide_Share/src/main/java/com/cnlive/outside_share/activity/ShareMomentActivity.java
... ... @@ -322,9 +322,9 @@ public class ShareMomentActivity extends AppCompatActivity {
322 322 } else {
323 323 canNotDo();
324 324 }
325   - } else if (type.startsWith("image/")) {
  325 + } else if (type.startsWith("image/") && bundle!=null) {
326 326 //兼容QQ浏览器链接类型
327   - if (bundle!=null && bundle.get(TEXT) != null && bundle.getParcelable(Intent.EXTRA_STREAM) == null) {
  327 + if (bundle.get(TEXT) != null && bundle.getParcelable(Intent.EXTRA_STREAM) == null) {
328 328 String bundleText = bundle.get(TEXT) + "";
329 329 if (bundleText.contains("@QQ浏览器") || bundleText.contains("html5.qq.com") || bundleText.contains("mbrowser.baidu.com")) {
330 330 String qqLink = bundleText.substring(bundleText.indexOf("http"));
... ... @@ -339,7 +339,7 @@ public class ShareMomentActivity extends AppCompatActivity {
339 339 shareConfig.shareRelease(context);
340 340 finish();
341 341 }
342   - } else if (bundle!=null && bundle.get(TEXT) == null && bundle.get("weixin_text") != null && (bundle.get("weixin_text") + "").contains("liebao.cn")) { //兼容舔狗猎豹浏览器内置图片分享问题
  342 + } else if (bundle.get(TEXT) == null && bundle.get("weixin_text") != null && (bundle.get("weixin_text") + "").contains("liebao.cn")) { //兼容舔狗猎豹浏览器内置图片分享问题
343 343 String weixin_text = (bundle.get("weixin_text") + "").substring((bundle.get("weixin_text") + "").indexOf("http"));
344 344 String weixin_title = bundle.get("weixin_title") + "";
345 345 String weixin_img_url = bundle.get("weixin_img_url") + "";
... ... @@ -471,7 +471,7 @@ public class ShareMomentActivity extends AppCompatActivity {
471 471 }
472 472 }
473 473 }
474   - } else if (type.startsWith("video/")) {
  474 + } else if (type.startsWith("video/") && bundle!=null) {
475 475 Uri videoUri = equals ? Uri.parse(preferences.getString("extrastream", "")) : bundle.getParcelable(Intent.EXTRA_STREAM);
476 476 if (videoUri == null) {
477 477 canNotDo();
... ...
config.gradle
... ... @@ -21,7 +21,7 @@ ext {
21 21 //编译方式
22 22 debug : false,
23 23 //版本号
24   - version: "1.0.2.7",
  24 + version: "1.0.2.8",
25 25 //Lib库前缀
26 26 packeg : "com.cnlive.outside_share",
27 27 //Lib库名称
... ...