Commit 4f71db2ce5c48f123d4e3257d86bf53a7e48796e
1 parent
f2b90c36
waifen
Showing
3 changed files
with
5 additions
and
5 deletions
OutSide_Share/src/main/java/com/cnlive/outside_share/activity/ShareIMActivity.java
| ... | ... | @@ -442,7 +442,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 442 | 442 | startSelectForwardActivity(context, path, TYPE_SHARE_IMAGE, IN_TYPE_EXT_SHARE); |
| 443 | 443 | killTime(); |
| 444 | 444 | } else if ((equals ? preferences.getString("extratext", null) : bundle.get(TEXT)) != null && |
| 445 | - bundle.get(TEXT) != null && !(bundle.get(TEXT) + "").contains("http")) { //腾讯文件Android Q | |
| 445 | + bundle!= null && !(bundle.get(TEXT) + "").contains("http")) { //腾讯文件Android Q | |
| 446 | 446 | photoTimer.schedule(new TimerTask() { |
| 447 | 447 | @Override |
| 448 | 448 | public void run() { |
| ... | ... | @@ -474,7 +474,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 474 | 474 | } |
| 475 | 475 | }, 3000); |
| 476 | 476 | } else if ((equals ? preferences.getString("extratext", "") : bundle.get(TEXT)) != null && |
| 477 | - bundle.get(TEXT) != null && (bundle.get(TEXT) + "").contains("http")) { | |
| 477 | + bundle != null && (bundle.get(TEXT) + "").contains("http")) { | |
| 478 | 478 | String link = Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString(); |
| 479 | 479 | if (link.contains("http") && !link.startsWith("http")) { |
| 480 | 480 | int begin = link.indexOf("http"); |
| ... | ... | @@ -486,7 +486,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 486 | 486 | } |
| 487 | 487 | killTime(); |
| 488 | 488 | } |
| 489 | - } else if (imageUri == null) { | |
| 489 | + } else if (imageUri == null && path.endsWith("gif")) { | |
| 490 | 490 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); |
| 491 | 491 | killTime(); |
| 492 | 492 | } else if (String.valueOf(imageUri).startsWith("content://") && !"wbmp".equals(fileType)) { | ... | ... |
OutSide_Share/src/main/java/com/cnlive/outside_share/activity/ShareMomentActivity.java
| ... | ... | @@ -361,7 +361,7 @@ public class ShareMomentActivity extends AppCompatActivity { |
| 361 | 361 | sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, imageUri)); |
| 362 | 362 | String pathreal = getPath(context, imageUri); |
| 363 | 363 | String fileType = FileType.getFileType(pathreal); |
| 364 | - if ("wbmp".equals(fileType) || pathreal == null) { | |
| 364 | + if ("wbmp".equals(fileType) || pathreal == null || pathreal.endsWith("gif")) { | |
| 365 | 365 | AlertUtil.showDeftToast(context, "网家家暂不支持此格式图片分享."); |
| 366 | 366 | killTime(); |
| 367 | 367 | } else if ("video".equals(fileType) || "avi".equals(fileType)) { //兼容部分浏览器视频类型文件以图片type封装intent传递 | ... | ... |