Commit fee26002e5a113ae458b74f7ee1d3558c83ce609
1 parent
30b2e67a
子线程添加消息队列循环
Showing
1 changed file
with
3 additions
and
0 deletions
OutSide_Share/src/main/java/com/cnlive/outside_share/activity/ShareIMActivity.java
| @@ -11,6 +11,7 @@ import android.net.Uri; | @@ -11,6 +11,7 @@ import android.net.Uri; | ||
| 11 | import android.os.Build; | 11 | import android.os.Build; |
| 12 | import android.os.Bundle; | 12 | import android.os.Bundle; |
| 13 | import android.os.Environment; | 13 | import android.os.Environment; |
| 14 | +import android.os.Looper; | ||
| 14 | import android.provider.MediaStore; | 15 | import android.provider.MediaStore; |
| 15 | import android.text.TextUtils; | 16 | import android.text.TextUtils; |
| 16 | import android.util.Log; | 17 | import android.util.Log; |
| @@ -462,8 +463,10 @@ public class ShareIMActivity extends AppCompatActivity { | @@ -462,8 +463,10 @@ public class ShareIMActivity extends AppCompatActivity { | ||
| 462 | cursor.getLong(cursor.getColumnIndex(MediaStore.Images.Media._ID))); | 463 | cursor.getLong(cursor.getColumnIndex(MediaStore.Images.Media._ID))); |
| 463 | startUriAddress(context, uri); | 464 | startUriAddress(context, uri); |
| 464 | } else { | 465 | } else { |
| 466 | + Looper.prepare(); | ||
| 465 | AlertUtil.showDeftToast(context, "媒体库中暂未找到相关资源,请从手机相册中分享"); | 467 | AlertUtil.showDeftToast(context, "媒体库中暂未找到相关资源,请从手机相册中分享"); |
| 466 | killTime(); | 468 | killTime(); |
| 469 | + Looper.loop(); | ||
| 467 | } | 470 | } |
| 468 | if (cursor != null) cursor.close(); | 471 | if (cursor != null) cursor.close(); |
| 469 | } | 472 | } |