diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-03-15 20:09:39 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-03-15 20:09:39 +0000 |
commit | 8e6a4d1e14f55fb7ce41b252f9335a08e35de791 (patch) | |
tree | ca1bc7eddc4be5b1fa796dd1f9a07e1afa5911c7 /app/src | |
parent | da6191f60f08aaa3f1801f24ddff05d78bdc718e (diff) | |
download | infinity-for-reddit-8e6a4d1e14f55fb7ce41b252f9335a08e35de791.tar infinity-for-reddit-8e6a4d1e14f55fb7ce41b252f9335a08e35de791.tar.gz infinity-for-reddit-8e6a4d1e14f55fb7ce41b252f9335a08e35de791.tar.bz2 infinity-for-reddit-8e6a4d1e14f55fb7ce41b252f9335a08e35de791.tar.lz infinity-for-reddit-8e6a4d1e14f55fb7ce41b252f9335a08e35de791.tar.xz infinity-for-reddit-8e6a4d1e14f55fb7ce41b252f9335a08e35de791.tar.zst infinity-for-reddit-8e6a4d1e14f55fb7ce41b252f9335a08e35de791.zip |
Fix app crashes after selecting capture image in UploadedImagesBottomSheetFragment
Diffstat (limited to 'app/src')
6 files changed, 6 insertions, 6 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java index 58f03537..3760b4cb 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CommentActivity.java @@ -558,7 +558,7 @@ public class CommentActivity extends BaseActivity implements UploadImageEnabledA public void captureImage() { Intent pictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); try { - capturedImageUri = FileProvider.getUriForFile(this, "ml.docilealligator.infinityforreddit.provider", + capturedImageUri = FileProvider.getUriForFile(this, getPackageName() + ".provider", File.createTempFile("captured_image", ".jpg", getExternalFilesDir(Environment.DIRECTORY_PICTURES))); pictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, capturedImageUri); startActivityForResult(pictureIntent, CAPTURE_IMAGE_REQUEST_CODE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditCommentActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditCommentActivity.java index c9dfc79e..1eadb47b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditCommentActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditCommentActivity.java @@ -371,7 +371,7 @@ public class EditCommentActivity extends BaseActivity implements UploadImageEnab public void captureImage() { Intent pictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); try { - capturedImageUri = FileProvider.getUriForFile(this, "ml.docilealligator.infinityforreddit.provider", + capturedImageUri = FileProvider.getUriForFile(this, getPackageName() + ".provider", File.createTempFile("captured_image", ".jpg", getExternalFilesDir(Environment.DIRECTORY_PICTURES))); pictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, capturedImageUri); startActivityForResult(pictureIntent, CAPTURE_IMAGE_REQUEST_CODE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditPostActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditPostActivity.java index fb3e5261..7f668adc 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditPostActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/EditPostActivity.java @@ -341,7 +341,7 @@ public class EditPostActivity extends BaseActivity implements UploadImageEnabled public void captureImage() { Intent pictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); try { - capturedImageUri = FileProvider.getUriForFile(this, "ml.docilealligator.infinityforreddit.provider", + capturedImageUri = FileProvider.getUriForFile(this, getPackageName() + ".provider", File.createTempFile("captured_image", ".jpg", getExternalFilesDir(Environment.DIRECTORY_PICTURES))); pictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, capturedImageUri); startActivityForResult(pictureIntent, CAPTURE_IMAGE_REQUEST_CODE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostGalleryActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostGalleryActivity.java index bf82df4a..c949a737 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostGalleryActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostGalleryActivity.java @@ -472,7 +472,7 @@ public class PostGalleryActivity extends BaseActivity implements FlairBottomShee public void captureImage() { Intent pictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); try { - imageUri = FileProvider.getUriForFile(this, "ml.docilealligator.infinityforreddit.provider", + imageUri = FileProvider.getUriForFile(this, getPackageName() + ".provider", File.createTempFile("temp_img", ".jpg", getExternalFilesDir(Environment.DIRECTORY_PICTURES))); pictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri); startActivityForResult(pictureIntent, CAPTURE_IMAGE_REQUEST_CODE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostPollActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostPollActivity.java index 813d1ec4..c3f6e508 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostPollActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostPollActivity.java @@ -734,7 +734,7 @@ public class PostPollActivity extends BaseActivity implements FlairBottomSheetFr public void captureImage() { Intent pictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); try { - capturedImageUri = FileProvider.getUriForFile(this, "ml.docilealligator.infinityforreddit.provider", + capturedImageUri = FileProvider.getUriForFile(this, getPackageName() + ".provider", File.createTempFile("captured_image", ".jpg", getExternalFilesDir(Environment.DIRECTORY_PICTURES))); pictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, capturedImageUri); startActivityForResult(pictureIntent, CAPTURE_IMAGE_REQUEST_CODE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java index 038076c5..81f41bd5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java @@ -711,7 +711,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr public void captureImage() { Intent pictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); try { - capturedImageUri = FileProvider.getUriForFile(this, "ml.docilealligator.infinityforreddit.provider", + capturedImageUri = FileProvider.getUriForFile(this, getPackageName() + ".provider", File.createTempFile("captured_image", ".jpg", getExternalFilesDir(Environment.DIRECTORY_PICTURES))); pictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, capturedImageUri); startActivityForResult(pictureIntent, CAPTURE_IMAGE_REQUEST_CODE); |