Commit 03b7c9123478866a441755d9ab89bb6740ac945a

Authored by 袁思汶
1 parent 23d1081a

外分生活圈修改

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