Skip to content

Commit

Permalink
Fixed camera crash
Browse files Browse the repository at this point in the history
  • Loading branch information
brodeurlv committed May 2, 2021
1 parent e817974 commit 6b9f3cf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACTION_HEADSET_PLUG" />
<uses-permission android:name="android.permission.CAMERA" />
<!--<uses-permission android:name="android.permission.CAMERA" />-->

<uses-feature
android:name="android.hardware.camera"
Expand Down
1 change: 1 addition & 0 deletions app/src/main/java/com/easyfitness/ProfileFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode == Activity.RESULT_OK) {
profileViMo.setPhoto(imgUtil.getFilePath());
requestForSave();
mCurrentPhotoPath = imgUtil.getFilePath();
ImageUtil.setPic(roundProfile, mCurrentPhotoPath);
ImageUtil.saveThumb(mCurrentPhotoPath);
imgUtil.galleryAddPic(this, mCurrentPhotoPath);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/easyfitness/utils/ImageUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ public boolean CreatePhotoSourceDialog(Fragment pF) {
// Camera
case 0:
dispatchTakePictureIntent(pF);
/* CropImage.activity()
/*CropImage.activity()
.setGuidelines(CropImageView.Guidelines.ON)
.start(pF.getContext(), pF); */
.start(pF.getContext(), pF);*/
break;
case 2: // Delete picture
if (mDeleteImageListener != null)
Expand Down

0 comments on commit 6b9f3cf

Please sign in to comment.