From d5f89a9dd97abf2d96379c571e8d4d8097336f86 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Wed, 31 Jul 2024 23:48:28 -0400 Subject: Fix app crashes on downloading media, submitting posts and editing profile on Android < 14. --- .../infinityforreddit/services/DownloadMediaService.java | 2 ++ .../infinityforreddit/services/DownloadRedditVideoService.java | 1 + .../docilealligator/infinityforreddit/services/EditProfileService.java | 1 + .../docilealligator/infinityforreddit/services/SubmitPostService.java | 1 + 4 files changed, 5 insertions(+) (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadMediaService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadMediaService.java index 8d008539..6ef5b921 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadMediaService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadMediaService.java @@ -21,6 +21,7 @@ import android.os.Build; import android.os.Environment; import android.os.PersistableBundle; import android.provider.MediaStore; +import android.util.Log; import androidx.core.app.NotificationChannelCompat; import androidx.core.app.NotificationCompat; @@ -94,6 +95,7 @@ public class DownloadMediaService extends JobService { .build(); } else { return new JobInfo.Builder(JOB_ID++, new ComponentName(context, DownloadMediaService.class)) + .setExtras(extras) .build(); } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadRedditVideoService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadRedditVideoService.java index 54ec726e..9bf0aa2b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadRedditVideoService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadRedditVideoService.java @@ -103,6 +103,7 @@ public class DownloadRedditVideoService extends JobService { .build(); } else { return new JobInfo.Builder(JOB_ID++, new ComponentName(context, DownloadRedditVideoService.class)) + .setExtras(extras) .build(); } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/services/EditProfileService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/services/EditProfileService.java index a9d2105c..fc25add7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/EditProfileService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/EditProfileService.java @@ -83,6 +83,7 @@ public class EditProfileService extends JobService { .build(); } else { return new JobInfo.Builder(JOB_ID++, new ComponentName(context, EditProfileService.class)) + .setExtras(extras) .build(); } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/services/SubmitPostService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/services/SubmitPostService.java index 6b13ce72..13e2015f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/SubmitPostService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/SubmitPostService.java @@ -129,6 +129,7 @@ public class SubmitPostService extends JobService { .build(); } else { return new JobInfo.Builder(JOB_ID++, new ComponentName(context, SubmitPostService.class)) + .setExtras(extras) .build(); } } -- cgit v1.2.3