diff options
author | Sergei Kozelko <KozelkoS@yandex.ru> | 2022-11-19 09:25:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-19 09:25:38 +0000 |
commit | da586885860db5996a7df6ceac61f84f9e68d962 (patch) | |
tree | 4179f128ec211f44a3e7d3a935fa0be3f08c04d8 /app | |
parent | a1df8f4d3855afe7b2060a8e0d151bf2847113b6 (diff) | |
download | infinity-for-reddit-da586885860db5996a7df6ceac61f84f9e68d962.tar infinity-for-reddit-da586885860db5996a7df6ceac61f84f9e68d962.tar.gz infinity-for-reddit-da586885860db5996a7df6ceac61f84f9e68d962.tar.bz2 infinity-for-reddit-da586885860db5996a7df6ceac61f84f9e68d962.tar.lz infinity-for-reddit-da586885860db5996a7df6ceac61f84f9e68d962.tar.xz infinity-for-reddit-da586885860db5996a7df6ceac61f84f9e68d962.tar.zst infinity-for-reddit-da586885860db5996a7df6ceac61f84f9e68d962.zip |
Remove unused download events (#1236)
* Remove unused DownloadRedditVideoEvent
* Remove unused DownloadMediaEvent
Diffstat (limited to 'app')
4 files changed, 0 insertions, 29 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/events/DownloadMediaEvent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/events/DownloadMediaEvent.java deleted file mode 100644 index 6398cf5e..00000000 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/events/DownloadMediaEvent.java +++ /dev/null @@ -1,9 +0,0 @@ -package ml.docilealligator.infinityforreddit.events; - -public class DownloadMediaEvent { - public boolean isSuccessful; - - public DownloadMediaEvent(boolean isSuccessful) { - this.isSuccessful = isSuccessful; - } -} diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/events/DownloadRedditVideoEvent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/events/DownloadRedditVideoEvent.java deleted file mode 100644 index e6b1a9ca..00000000 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/events/DownloadRedditVideoEvent.java +++ /dev/null @@ -1,9 +0,0 @@ -package ml.docilealligator.infinityforreddit.events; - -public class DownloadRedditVideoEvent { - public boolean isSuccessful; - - public DownloadRedditVideoEvent(boolean isSuccessful) { - this.isSuccessful = isSuccessful; - } -} 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 4f511821..61fe0bea 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadMediaService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadMediaService.java @@ -27,8 +27,6 @@ import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationManagerCompat; import androidx.documentfile.provider.DocumentFile; -import org.greenrobot.eventbus.EventBus; - import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -45,7 +43,6 @@ import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.apis.DownloadFile; import ml.docilealligator.infinityforreddit.broadcastreceivers.DownloadedMediaDeleteActionBroadcastReceiver; import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper; -import ml.docilealligator.infinityforreddit.events.DownloadMediaEvent; import ml.docilealligator.infinityforreddit.utils.APIUtils; import ml.docilealligator.infinityforreddit.utils.NotificationUtils; import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils; @@ -337,14 +334,12 @@ public class DownloadMediaService extends Service { -1, randomNotificationIdOffset, null, null); break; } - EventBus.getDefault().post(new DownloadMediaEvent(false)); } else { MediaScannerConnection.scanFile( DownloadMediaService.this, new String[]{destinationFileUri.toString()}, null, (path, uri) -> { updateNotification(mediaType, R.string.downloading_media_finished, -1, randomNotificationIdOffset, destinationFileUri, mimeType); - EventBus.getDefault().post(new DownloadMediaEvent(true)); } ); } 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 5fcefa03..43565dd7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadRedditVideoService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/services/DownloadRedditVideoService.java @@ -25,15 +25,12 @@ import android.os.Looper; import android.os.Message; import android.os.Process; import android.provider.MediaStore; -import android.util.Log; import androidx.core.app.NotificationChannelCompat; import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationManagerCompat; import androidx.documentfile.provider.DocumentFile; -import org.greenrobot.eventbus.EventBus; - import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; @@ -52,7 +49,6 @@ import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.apis.DownloadFile; import ml.docilealligator.infinityforreddit.broadcastreceivers.DownloadedMediaDeleteActionBroadcastReceiver; import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper; -import ml.docilealligator.infinityforreddit.events.DownloadRedditVideoEvent; import ml.docilealligator.infinityforreddit.utils.NotificationUtils; import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils; import okhttp3.OkHttpClient; @@ -594,13 +590,11 @@ public class DownloadRedditVideoService extends Service { randomNotificationIdOffset, null); break; } - EventBus.getDefault().post(new DownloadRedditVideoEvent(false)); } else { MediaScannerConnection.scanFile( this, new String[]{destinationFileUri.toString()}, null, (path, uri) -> { updateNotification(R.string.downloading_reddit_video_finished, -1, randomNotificationIdOffset, destinationFileUri); - EventBus.getDefault().post(new DownloadRedditVideoEvent(true)); } ); } |