Commit 03b7c9123478866a441755d9ab89bb6740ac945a
1 parent
23d1081a
外分生活圈修改
Showing
2 changed files
with
20 additions
and
20 deletions
OutSide_Share/src/main/java/com/cnlive/outside_share/activity/ShareIMActivity.java
| ... | ... | @@ -219,19 +219,19 @@ public class ShareIMActivity extends AppCompatActivity { |
| 219 | 219 | String s = rich_media_content.replaceAll(reg, ""); |
| 220 | 220 | String desc = s.substring(0, Math.min(s.length(), 40)); |
| 221 | 221 | startSelectForwardActivity(context, h2 == null ? equals ? preferences.getString(SUBJECT, "") : bundle.get(SUBJECT) + "" : h2, desc, srcjs == null ? AppConfig.getShareLink() : srcjs, processUrlData(equals ? preferences.getString("extratext", "") : bundle.get(TEXT) + ""), TYPE_SHARE_LINK); |
| 222 | - finish(); | |
| 222 | + killTime(); | |
| 223 | 223 | } |
| 224 | 224 | }).start(); |
| 225 | 225 | } else { |
| 226 | 226 | startSelectForwardActivity(context, equals ? preferences.getString(SUBJECT, "") : bundle.get(SUBJECT) + "", "", AppConfig.getShareLink(), processUrlData(equals ? preferences.getString("extratext", "") : bundle.get(TEXT) + ""), TYPE_SHARE_LINK); |
| 227 | - finish(); | |
| 227 | + killTime(); | |
| 228 | 228 | } |
| 229 | 229 | } else if ((equals ? preferences.getString("extratext", "") : bundle.get(TEXT) + "").contains("http") && !Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().startsWith("http") && !(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().contains("mp.weixin.qq.com")) { |
| 230 | 230 | int begin = Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().indexOf("http"); |
| 231 | 231 | int end = Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().length(); |
| 232 | 232 | if (begin > 0 && end > 0) { |
| 233 | 233 | startSelectForwardActivity(context, Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().substring(0, begin), Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().substring(0, begin), AppConfig.getShareLink(), processUrlData(Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().substring(begin, end)), TYPE_SHARE_LINK); |
| 234 | - finish(); | |
| 234 | + killTime(); | |
| 235 | 235 | } |
| 236 | 236 | } else if ((equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().contains("http") && !Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().startsWith("http") && (equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().contains("mp.weixin.qq.com")) { |
| 237 | 237 | new Thread(new Runnable() { |
| ... | ... | @@ -272,17 +272,17 @@ public class ShareIMActivity extends AppCompatActivity { |
| 272 | 272 | } |
| 273 | 273 | } |
| 274 | 274 | startSelectForwardActivity(context, h2, "", srcjsoup, processUrlData(substring), TYPE_SHARE_LINK); |
| 275 | - finish(); | |
| 275 | + killTime(); | |
| 276 | 276 | } |
| 277 | 277 | }).start(); |
| 278 | 278 | } else { |
| 279 | 279 | startSelectForwardActivity(context, (equals ? preferences.getString("extratext", "") : bundle.get(TEXT)) == null ? (equals ? preferences.getString(SUBJECT, "") : bundle.get(SUBJECT)).toString() : (equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString(), TYPE_SHARE_TEXT, IN_TYPE_EXT_SHARE); |
| 280 | - finish(); | |
| 280 | + killTime(); | |
| 281 | 281 | } |
| 282 | 282 | } else { |
| 283 | 283 | if (Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().startsWith("http")) { |
| 284 | 284 | startSelectForwardActivity(context, "链接", "", AppConfig.getShareLink(), processUrlData(Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString()), TYPE_SHARE_LINK); |
| 285 | - finish(); | |
| 285 | + killTime(); | |
| 286 | 286 | } else { |
| 287 | 287 | String linkcontext = Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().replaceAll("\\s*", ""); |
| 288 | 288 | int end; |
| ... | ... | @@ -295,10 +295,10 @@ public class ShareIMActivity extends AppCompatActivity { |
| 295 | 295 | |
| 296 | 296 | if (begin > 0 && end > 0) { |
| 297 | 297 | startSelectForwardActivity(context, Objects.requireNonNull(equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString().substring(0, begin), "", AppConfig.getShareLink(), linkcontext.substring(begin, end), TYPE_SHARE_LINK); |
| 298 | - finish(); | |
| 298 | + killTime(); | |
| 299 | 299 | } else { |
| 300 | 300 | startSelectForwardActivity(context, (equals ? preferences.getString(SUBJECT, "") : bundle.get(SUBJECT)) == null ? (equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString() : (equals ? preferences.getString(SUBJECT, "") : bundle.get(SUBJECT)).toString() + " " + (equals ? preferences.getString("extratext", "") : bundle.get(TEXT)).toString(), TYPE_SHARE_TEXT, IN_TYPE_EXT_SHARE); |
| 301 | - finish(); | |
| 301 | + killTime(); | |
| 302 | 302 | } |
| 303 | 303 | } |
| 304 | 304 | } |
| ... | ... | @@ -385,14 +385,14 @@ public class ShareIMActivity extends AppCompatActivity { |
| 385 | 385 | String qqLink = bundle.get(TEXT).toString().substring(bundle.get(TEXT).toString().indexOf("http")); |
| 386 | 386 | String qqTitle = bundle.get(TEXT).toString().substring(0, bundle.get(TEXT).toString().indexOf("http")); |
| 387 | 387 | startSelectForwardActivity(context, qqTitle, "", AppConfig.getShareLink(), qqLink, TYPE_SHARE_LINK); |
| 388 | - finish(); | |
| 388 | + killTime(); | |
| 389 | 389 | } |
| 390 | 390 | } else if (bundle != null && bundle.get(TEXT) == null && bundle.get("weixin_text") != null && bundle.get("weixin_text").toString().contains("liebao.cn")) { |
| 391 | 391 | String weixin_text = bundle.get("weixin_text").toString().substring(bundle.get("weixin_text").toString().indexOf("http")); |
| 392 | 392 | String weixin_title = bundle.get("weixin_title").toString(); |
| 393 | 393 | String weixin_img_url = bundle.get("weixin_img_url").toString(); |
| 394 | 394 | startSelectForwardActivity(context, weixin_title, "", weixin_img_url, weixin_text, TYPE_SHARE_LINK); |
| 395 | - finish(); | |
| 395 | + killTime(); | |
| 396 | 396 | } else { |
| 397 | 397 | if ("image/gif".equals(type) || "image/vnd.wap.wbmp".equals(type)) { |
| 398 | 398 | if (DoublePressed.onDoublePressed()) return; |
| ... | ... | @@ -570,7 +570,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 570 | 570 | } |
| 571 | 571 | if (file.length() <= VIDEO_MAX_SIZE) { |
| 572 | 572 | startSelectForwardActivity(context, pathVideo, TYPE_SHARE_VIDEO, IN_TYPE_EXT_SHARE); |
| 573 | - finish(); | |
| 573 | + killTime(); | |
| 574 | 574 | } else if (file.length() > VIDEO_MAX_SIZE) { |
| 575 | 575 | AlertUtil.showDeftToast(context, "文件太大无法压缩发送(原文件大小需小于100MB)"); |
| 576 | 576 | killTime(); |
| ... | ... | @@ -602,7 +602,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 602 | 602 | } |
| 603 | 603 | if (file.length() <= VIDEO_MAX_SIZE) { |
| 604 | 604 | startSelectForwardActivity(context, pathVideo, TYPE_SHARE_VIDEO, IN_TYPE_EXT_SHARE); |
| 605 | - finish(); | |
| 605 | + killTime(); | |
| 606 | 606 | } else if (file.length() > VIDEO_MAX_SIZE) { |
| 607 | 607 | AlertUtil.showDeftToast(context, "文件太大无法压缩发送(原文件大小需小于100MB)"); |
| 608 | 608 | killTime(); |
| ... | ... | @@ -643,7 +643,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 643 | 643 | killTime(); |
| 644 | 644 | } else { |
| 645 | 645 | startSelectForwardActivity(context, pathAudio, TYPE_SHARE_FILE, IN_TYPE_EXT_SHARE); |
| 646 | - finish(); | |
| 646 | + killTime(); | |
| 647 | 647 | } |
| 648 | 648 | } else { |
| 649 | 649 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); |
| ... | ... | @@ -824,7 +824,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 824 | 824 | } else { |
| 825 | 825 | startSelectForwardActivity(context, path1, TYPE_SHARE_IMAGE, IN_TYPE_EXT_SHARE); |
| 826 | 826 | } |
| 827 | - finish(); | |
| 827 | + killTime(); | |
| 828 | 828 | //TODO 文件缓存已经完成 待优化~!! |
| 829 | 829 | } catch (Exception e) { |
| 830 | 830 | Log.e("ShareIM", "Exception ", e); |
| ... | ... | @@ -890,7 +890,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 890 | 890 | killTime(); |
| 891 | 891 | } else { |
| 892 | 892 | startSelectForwardActivity(context, imgurilist, TYPE_SHARE_IMAGE); |
| 893 | - finish(); | |
| 893 | + killTime(); | |
| 894 | 894 | } |
| 895 | 895 | } |
| 896 | 896 | } | ... | ... |
OutSide_Share/src/main/java/com/cnlive/outside_share/activity/ShareMomentActivity.java
| ... | ... | @@ -383,7 +383,7 @@ public class ShareMomentActivity extends AppCompatActivity { |
| 383 | 383 | Media media = new Media(filevideo.getPath(), filevideo.getName(), 1, 3, filevideo.length(), 0, "", (int) time, ""); |
| 384 | 384 | medialist.add(media); |
| 385 | 385 | jumpReleaseActivity(context, medialist, 3, "", "nocircle"); |
| 386 | - finish(); | |
| 386 | + killTime(); | |
| 387 | 387 | } |
| 388 | 388 | } else if (("jpg".equals(fileType) || "png".equals(fileType)) && !(imageUri + "").contains("com.tencent.mtt")) { //媒体文件类型混乱问题处理 //pic 1 video 3 |
| 389 | 389 | File file = new File(pathreal); |
| ... | ... | @@ -391,7 +391,7 @@ public class ShareMomentActivity extends AppCompatActivity { |
| 391 | 391 | Media media = new Media(file.getPath(), file.getName(), 1, 1, file.length(), 0, "", ""); |
| 392 | 392 | medialist.add(media); |
| 393 | 393 | jumpReleaseActivity(context, medialist, 3, "", "nocircle"); |
| 394 | - finish(); | |
| 394 | + killTime(); | |
| 395 | 395 | } else if ((equals ? preferences.getString("extratext", null) : bundle.get(TEXT)) != null && |
| 396 | 396 | bundle.get(TEXT) != null && !(bundle.get(TEXT) + "").contains("http")) { //腾讯文件Android Q |
| 397 | 397 | String pathImg = getPath(context, imageUri); |
| ... | ... | @@ -459,7 +459,7 @@ public class ShareMomentActivity extends AppCompatActivity { |
| 459 | 459 | Media media = new Media(file.getPath(), file.getName(), 1, 1, file.length(), 0, "", ""); |
| 460 | 460 | medialist.add(media); |
| 461 | 461 | jumpReleaseActivity(context, medialist, 3, "", "nocircle"); |
| 462 | - finish(); | |
| 462 | + killTime(); | |
| 463 | 463 | } |
| 464 | 464 | } |
| 465 | 465 | } |
| ... | ... | @@ -517,7 +517,7 @@ public class ShareMomentActivity extends AppCompatActivity { |
| 517 | 517 | Media media = new Media(filevideo.getPath(), filevideo.getName(), 1, 3, filevideo.length(), 0, "", (int) time, ""); |
| 518 | 518 | medialist.add(media); |
| 519 | 519 | jumpReleaseActivity(context, medialist, 3, "", "nocircle"); |
| 520 | - finish(); | |
| 520 | + killTime(); | |
| 521 | 521 | } |
| 522 | 522 | } else { |
| 523 | 523 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); |
| ... | ... | @@ -822,7 +822,7 @@ public class ShareMomentActivity extends AppCompatActivity { |
| 822 | 822 | killTime(); |
| 823 | 823 | } else { |
| 824 | 824 | jumpReleaseActivity(context, medialist, 3, "", "nocircle"); |
| 825 | - finish(); | |
| 825 | + killTime(); | |
| 826 | 826 | } |
| 827 | 827 | } |
| 828 | 828 | } | ... | ... |