Commit f3a20ac4 by sikang

bug fix

parent 995937d9
......@@ -103,6 +103,11 @@ public class TakePhotoActivity extends BaseActivity {
}
File file = BitmapUtils.saveBitmapToSDCard(bitmap, image, 100);
if(file==null){
setResult(RESULT_CANCELED);
finish();
return;
}
//如果图片过大,则压缩
long size=FileUtils.getFileSize(file)/1024;
if (FileUtils.getFileSize(file) / 1024 > 1024) {
......
......@@ -124,7 +124,7 @@ public class FragmentLauncher {
listener.onFragmentCreated(fragment);
}
//提交
transaction.commit();
transaction.commitAllowingStateLoss();
return fragment;
}
......
......@@ -86,8 +86,10 @@ public class PermissionsHelper {
* 摄像头权限
*/
public static void checkCameraPermission(FragmentActivity activity, OnPermissionListener listener) {
if (activity != null) {
checkPermission(activity, CAMERA, listener);
}
}
/**
* 所有权限
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment