Commit 102e452bd193639476e8d9e5b46dba646d1565b1
1 parent
094aa7f7
未登录分享至好友修改
Showing
2 changed files
with
8 additions
and
8 deletions
OutSide_Share/src/main/java/com/cnlive/outside_share/activity/ShareIMActivity.java
| ... | ... | @@ -335,7 +335,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 335 | 335 | /* } |
| 336 | 336 | }, 5000);*/ |
| 337 | 337 | } else if (AndroidQUtil.isAndroidQ() && !(textUri + "").contains("file://")) { |
| 338 | - String chromePath = "shareIM".equals(type) ? preferences.getString("chromePath", "") : ""; | |
| 338 | + String chromePath = equals ? preferences.getString("chromePath", "") : ""; | |
| 339 | 339 | if (textUri.toString().contains(".") && "".equals(chromePath)) { |
| 340 | 340 | String fileName = textUri.toString().substring(textUri.toString().lastIndexOf("/"), textUri.toString().lastIndexOf(".")); |
| 341 | 341 | String fileType = textUri.toString().substring(textUri.toString().lastIndexOf("."), textUri.toString().length()); |
| ... | ... | @@ -397,7 +397,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 397 | 397 | AlertUtil.showDeftToast(context, "网家家暂不支持此格式图片分享."); |
| 398 | 398 | killTime(); |
| 399 | 399 | } else { |
| 400 | - Uri imageUri = "shareIM".equals(type) ? Uri.parse(preferences.getString("extrastream", "")) : bundle.getParcelable(Intent.EXTRA_STREAM); | |
| 400 | + Uri imageUri = equals ? Uri.parse(preferences.getString("extrastream", "")) : bundle.getParcelable(Intent.EXTRA_STREAM); | |
| 401 | 401 | sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, imageUri)); |
| 402 | 402 | if (AndroidQUtil.isAndroidQ()) { |
| 403 | 403 | path = AndroidQUtil.copyAndroidQFile(ShareIMActivity.this, imageUri.toString(), System.currentTimeMillis() + ".png"); |
| ... | ... | @@ -522,7 +522,7 @@ public class ShareIMActivity extends AppCompatActivity { |
| 522 | 522 | } |
| 523 | 523 | } |
| 524 | 524 | } else if (type.startsWith("video/")) { |
| 525 | - Uri videoUri = "shareIM".equals(type) ? Uri.parse(preferences.getString("extrastream", "")) : bundle.getParcelable(Intent.EXTRA_STREAM); | |
| 525 | + Uri videoUri = equals ? Uri.parse(preferences.getString("extrastream", "")) : bundle.getParcelable(Intent.EXTRA_STREAM); | |
| 526 | 526 | if (videoUri == null) { |
| 527 | 527 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); |
| 528 | 528 | killTime(); |
| ... | ... | @@ -609,8 +609,8 @@ public class ShareIMActivity extends AppCompatActivity { |
| 609 | 609 | } |
| 610 | 610 | } else if (type.startsWith("audio/")) { |
| 611 | 611 | String pathAudio; |
| 612 | - Uri audioUri = "shareIM".equals(type) ? Uri.parse(preferences.getString("extrastream", "")) : bundle.getParcelable(Intent.EXTRA_STREAM); | |
| 613 | - String chromePath = "shareIM".equals(type) ? preferences.getString("chromePath", "") : ""; | |
| 612 | + Uri audioUri = equals ? Uri.parse(preferences.getString("extrastream", "")) : bundle.getParcelable(Intent.EXTRA_STREAM); | |
| 613 | + String chromePath = equals ? preferences.getString("chromePath", "") : ""; | |
| 614 | 614 | if (audioUri == null) { |
| 615 | 615 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); |
| 616 | 616 | killTime(); |
| ... | ... | @@ -652,8 +652,8 @@ public class ShareIMActivity extends AppCompatActivity { |
| 652 | 652 | String pathapi; |
| 653 | 653 | String fileName = ""; |
| 654 | 654 | String fileType; |
| 655 | - Uri aplUri = "shareIM".equals(type) ? Uri.parse(preferences.getString("extrastream", "")) : bundle.getParcelable(Intent.EXTRA_STREAM); | |
| 656 | - String chromePath = "shareIM".equals(type) ? preferences.getString("chromePath", "") : ""; | |
| 655 | + Uri aplUri = equals ? Uri.parse(preferences.getString("extrastream", "")) : bundle.getParcelable(Intent.EXTRA_STREAM); | |
| 656 | + String chromePath = equals ? preferences.getString("chromePath", "") : ""; | |
| 657 | 657 | if (aplUri == null && "".equals(chromePath)) { |
| 658 | 658 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); |
| 659 | 659 | killTime(); | ... | ... |