// Path: app/src/main/java/com/rance/chatui/base/BaseFragment.java
// public class BaseFragment extends Fragment {
//     public Activity mActivity;
// 
//     @Nullable
//     @Override
//     public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
//         mActivity = getActivity();
//         return super.onCreateView(inflater, container, savedInstanceState);
//     }
// 
//     @Override
//     public void onViewCreated(View view, Bundle savedInstanceState) {
//         super.onViewCreated(view, savedInstanceState);
//         mActivity = getActivity();
//     }
// 
//     public void toastShow(int resId) {
//         Toast.makeText(mActivity, resId, Toast.LENGTH_SHORT).show();
//     }
// 
//     public void toastShow(String resId) {
//         Toast.makeText(mActivity, resId, Toast.LENGTH_SHORT).show();
//     }
// 
//     public ProgressDialog progressDialog;
// 
//     public ProgressDialog showProgressDialog() {
//         progressDialog = new ProgressDialog(mActivity);
//         progressDialog.setMessage("加载中");
//         progressDialog.show();
//         return progressDialog;
//     }
// 
//     public ProgressDialog showProgressDialog(CharSequence message) {
//         progressDialog = new ProgressDialog(mActivity);
//         progressDialog.setMessage(message);
//         progressDialog.show();
//         return progressDialog;
//     }
// 
//     public void dismissProgressDialog() {
//         if (progressDialog != null && progressDialog.isShowing()) {
//             // progressDialog.hide();会导致android.view.WindowLeaked
//             progressDialog.dismiss();
//         }
//     }
// }


import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.provider.MediaStore;
import android.support.v4.app.Fragment;
import android.util.Log;
import com.rance.chatui.base.BaseFragment;
package com.rance.chatui.util;



/**
 * Created by chengz
 *
 * @date 2017/8/1.
 */

public class PhotoUtils {
    private static final String TAG = "PhotoUtils";

    /**
     * 拍照方法
     * @param baseFragment
     * @param imageUri
     * @param requestCodeCamera
     */
// Path: app/src/main/java/com/rance/chatui/base/BaseFragment.java
// public class BaseFragment extends Fragment {
//     public Activity mActivity;
// 
//     @Nullable
//     @Override
//     public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
//         mActivity = getActivity();
//         return super.onCreateView(inflater, container, savedInstanceState);
//     }
// 
//     @Override
//     public void onViewCreated(View view, Bundle savedInstanceState) {
//         super.onViewCreated(view, savedInstanceState);
//         mActivity = getActivity();
//     }
// 
//     public void toastShow(int resId) {
//         Toast.makeText(mActivity, resId, Toast.LENGTH_SHORT).show();
//     }
// 
//     public void toastShow(String resId) {
//         Toast.makeText(mActivity, resId, Toast.LENGTH_SHORT).show();
//     }
// 
//     public ProgressDialog progressDialog;
// 
//     public ProgressDialog showProgressDialog() {
//         progressDialog = new ProgressDialog(mActivity);
//         progressDialog.setMessage("加载中");
//         progressDialog.show();
//         return progressDialog;
//     }
// 
//     public ProgressDialog showProgressDialog(CharSequence message) {
//         progressDialog = new ProgressDialog(mActivity);
//         progressDialog.setMessage(message);
//         progressDialog.show();
//         return progressDialog;
//     }
// 
//     public void dismissProgressDialog() {
//         if (progressDialog != null && progressDialog.isShowing()) {
//             // progressDialog.hide();会导致android.view.WindowLeaked
//             progressDialog.dismiss();
//         }
//     }
// }


// Path: app/src/main/java/com/rance/chatui/util/PhotoUtils.java
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Build;
import android.provider.MediaStore;
import android.support.v4.app.Fragment;
import android.util.Log;
import com.rance.chatui.base.BaseFragment;

package com.rance.chatui.util;



/**
 * Created by chengz
 *
 * @date 2017/8/1.
 */

public class PhotoUtils {
    private static final String TAG = "PhotoUtils";

    /**
     * 拍照方法
     * @param baseFragment
     * @param imageUri
     * @param requestCodeCamera
     */
    public static void takePicture(BaseFragment baseFragment, Uri imageUri, int requestCodeCamera) {