我在手机拍照,传照片到手机自带的剪切界面的时候:会造成之前的Activity被杀掉;
按返回键直接崩溃,异常为:java.lang.RuntimeException: Performing stop of activity that is not resumed
解决方法是:把图片压缩下,保存到之前路径,传递到Crop界面;
private void dealCameraPh(){
String cameraPath_Icon=BitmapHelper.getLastPhotoByPath();
File file = new File(cameraPath_Icon);
if (file.exists()) {//
if (BitmapHelper.getDegress(cameraPath_Icon) == 0) {
// Uri uri = Uri.fromFile(file);
// gotoCrop(uri);
BitmapHelper.compressBitmap(cameraPath_Icon, 150, 150);//压缩下图片在传过去,减少OOM异常概率
BitmapHelper.saveBitmap2FilePath(cameraPath_Icon, BitmapHelper.compressBitmap(cameraPath_Icon, 150, 150));
Log.e("ReqUpdateMineLocal", "dealCameraPh getDegress==0");
} else {
BitmapHelper.saveBitmap2RotateFilePath(cameraPath_Icon);
BitmapHelper.compressBitmap(cameraPath_Icon, 150, 150);
BitmapHelper.saveBitmap2FilePath(cameraPath_Icon, BitmapHelper.compressBitmap(cameraPath_Icon, 150, 150));
Log.e("ReqUpdateMineLocal", "dealCameraPh getDegress!=0");
}
asHandler.sendMessage(asHandler.obtainMessage(CountSetActivity.CAMERA_RESULT_DEAL_SUCC, file));
}else {
asHandler.sendEmptyMessage(CountSetActivity.CAMERA_RESULT_DEAL_NONE);
}
}