Skip to content

Commit

Permalink
Fix bug for #21
Browse files Browse the repository at this point in the history
  • Loading branch information
wildma committed May 31, 2020
1 parent a21cecd commit 32d0365
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ public static Intent crop(Activity activity, Uri uri, int w, int h, int aspectX,
Intent intent = new Intent("com.android.camera.action.CROP");
intent.setDataAndType(uri, "image/*");
intent.putExtra("crop", "true");
if (aspectX / aspectY == 1) {
/*宽高比例为 1:1 时,华为设备的系统默认裁剪框是圆形的,这里统一改成方形的*/
if (aspectX == aspectY) {
/*宽高比例相同时,华为设备的系统默认裁剪框是圆形的,这里统一改成方形的*/
if (Build.MANUFACTURER.equals("HUAWEI")) {
aspectX = 9998;
aspectY = 9999;
Expand Down

0 comments on commit 32d0365

Please sign in to comment.