Skip to content

Commit

Permalink
解决小米 6 出现 does not have permission to content 的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
wildma committed Aug 4, 2019
1 parent a937765 commit f3f909e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pictureselector/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 113
versionName "1.1.3"
versionCode 114
versionName "1.1.4"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@ public static Intent crop(Uri uri, int w, int h, int aspectX, int aspectY) {
intent.putExtra("scaleUpIfNeeded", true);

/*解决跳转到裁剪提示“图片加载失败”问题*/
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
}

/*解决小米miui系统调用系统裁剪图片功能camera.action.CROP后崩溃或重新打开app的问题*/
StringBuffer buffer = new StringBuffer();
Expand Down

0 comments on commit f3f909e

Please # to comment.