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,7 +335,7 @@ public class ShareIMActivity extends AppCompatActivity { | ||
| 335 | /* } | 335 | /* } |
| 336 | }, 5000);*/ | 336 | }, 5000);*/ |
| 337 | } else if (AndroidQUtil.isAndroidQ() && !(textUri + "").contains("file://")) { | 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 | if (textUri.toString().contains(".") && "".equals(chromePath)) { | 339 | if (textUri.toString().contains(".") && "".equals(chromePath)) { |
| 340 | String fileName = textUri.toString().substring(textUri.toString().lastIndexOf("/"), textUri.toString().lastIndexOf(".")); | 340 | String fileName = textUri.toString().substring(textUri.toString().lastIndexOf("/"), textUri.toString().lastIndexOf(".")); |
| 341 | String fileType = textUri.toString().substring(textUri.toString().lastIndexOf("."), textUri.toString().length()); | 341 | String fileType = textUri.toString().substring(textUri.toString().lastIndexOf("."), textUri.toString().length()); |
| @@ -397,7 +397,7 @@ public class ShareIMActivity extends AppCompatActivity { | @@ -397,7 +397,7 @@ public class ShareIMActivity extends AppCompatActivity { | ||
| 397 | AlertUtil.showDeftToast(context, "网家家暂不支持此格式图片分享."); | 397 | AlertUtil.showDeftToast(context, "网家家暂不支持此格式图片分享."); |
| 398 | killTime(); | 398 | killTime(); |
| 399 | } else { | 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 | sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, imageUri)); | 401 | sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, imageUri)); |
| 402 | if (AndroidQUtil.isAndroidQ()) { | 402 | if (AndroidQUtil.isAndroidQ()) { |
| 403 | path = AndroidQUtil.copyAndroidQFile(ShareIMActivity.this, imageUri.toString(), System.currentTimeMillis() + ".png"); | 403 | path = AndroidQUtil.copyAndroidQFile(ShareIMActivity.this, imageUri.toString(), System.currentTimeMillis() + ".png"); |
| @@ -522,7 +522,7 @@ public class ShareIMActivity extends AppCompatActivity { | @@ -522,7 +522,7 @@ public class ShareIMActivity extends AppCompatActivity { | ||
| 522 | } | 522 | } |
| 523 | } | 523 | } |
| 524 | } else if (type.startsWith("video/")) { | 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 | if (videoUri == null) { | 526 | if (videoUri == null) { |
| 527 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); | 527 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); |
| 528 | killTime(); | 528 | killTime(); |
| @@ -609,8 +609,8 @@ public class ShareIMActivity extends AppCompatActivity { | @@ -609,8 +609,8 @@ public class ShareIMActivity extends AppCompatActivity { | ||
| 609 | } | 609 | } |
| 610 | } else if (type.startsWith("audio/")) { | 610 | } else if (type.startsWith("audio/")) { |
| 611 | String pathAudio; | 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 | if (audioUri == null) { | 614 | if (audioUri == null) { |
| 615 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); | 615 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); |
| 616 | killTime(); | 616 | killTime(); |
| @@ -652,8 +652,8 @@ public class ShareIMActivity extends AppCompatActivity { | @@ -652,8 +652,8 @@ public class ShareIMActivity extends AppCompatActivity { | ||
| 652 | String pathapi; | 652 | String pathapi; |
| 653 | String fileName = ""; | 653 | String fileName = ""; |
| 654 | String fileType; | 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 | if (aplUri == null && "".equals(chromePath)) { | 657 | if (aplUri == null && "".equals(chromePath)) { |
| 658 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); | 658 | AlertUtil.showDeftToast(this, "网家家暂不支持此类型信息分享."); |
| 659 | killTime(); | 659 | killTime(); |
config.gradle