diff --git a/app/src/main/java/org/schabi/newpipe/download/ExtSDDownloadFailedActivity.java b/app/src/main/java/org/schabi/newpipe/download/ExtSDDownloadFailedActivity.java index 2d98f4665..c02ef92eb 100644 --- a/app/src/main/java/org/schabi/newpipe/download/ExtSDDownloadFailedActivity.java +++ b/app/src/main/java/org/schabi/newpipe/download/ExtSDDownloadFailedActivity.java @@ -25,12 +25,10 @@ public class ExtSDDownloadFailedActivity extends AppCompatActivity { .setTitle(R.string.download_to_sdcard_error_title) .setMessage(R.string.download_to_sdcard_error_message) .setPositiveButton(R.string.yes, (DialogInterface dialogInterface, int i) -> { - NewPipeSettings.resetDownloadFolders(this); finish(); }) .setNegativeButton(R.string.cancel, (DialogInterface dialogInterface, int i) -> { - dialogInterface.dismiss(); finish(); }) diff --git a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java index 7339dd50f..db8c3fd5b 100644 --- a/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/BasePlayer.java @@ -69,6 +69,7 @@ import org.schabi.newpipe.player.playqueue.PlayQueue; import org.schabi.newpipe.player.playqueue.PlayQueueAdapter; import org.schabi.newpipe.player.playqueue.PlayQueueItem; import org.schabi.newpipe.player.resolver.MediaSourceTag; +import org.schabi.newpipe.report.ErrorActivity; import org.schabi.newpipe.util.ImageDisplayConstants; import org.schabi.newpipe.util.SerializedCache; @@ -86,6 +87,7 @@ import static com.google.android.exoplayer2.Player.DISCONTINUITY_REASON_INTERNAL import static com.google.android.exoplayer2.Player.DISCONTINUITY_REASON_PERIOD_TRANSITION; import static com.google.android.exoplayer2.Player.DISCONTINUITY_REASON_SEEK; import static com.google.android.exoplayer2.Player.DISCONTINUITY_REASON_SEEK_ADJUSTMENT; +import static org.schabi.newpipe.report.UserAction.PLAY_STREAM; /** * Base for the players, joining the common properties @@ -363,7 +365,10 @@ public abstract class BasePlayer implements try { context.unregisterReceiver(broadcastReceiver); } catch (final IllegalArgumentException unregisteredException) { - Log.e(TAG, "Broadcast receiver already unregistered.", unregisteredException); + ErrorActivity.reportError(context, unregisteredException, null, null, + ErrorActivity.ErrorInfo.make(PLAY_STREAM, + "none", + "play stream", R.string.general_error)); } } @@ -1001,6 +1006,8 @@ public abstract class BasePlayer implements try { metadata = (MediaSourceTag) simpleExoPlayer.getCurrentTag(); } catch (IndexOutOfBoundsException | ClassCastException error) { + if(DEBUG) Log.d(TAG, "Could not update metadata: " + error.getMessage()); + if(DEBUG) error.printStackTrace(); return; } @@ -1087,6 +1094,9 @@ public abstract class BasePlayer implements return simpleExoPlayer.isCurrentWindowDynamic(); } catch (@NonNull IndexOutOfBoundsException ignored) { // Why would this even happen =( + // But lets log it anyway. Save is save + if(DEBUG) Log.d(TAG, "Could not update metadata: " + ignored.getMessage()); + if(DEBUG) ignored.printStackTrace(); return false; } } diff --git a/app/src/main/java/org/schabi/newpipe/report/UserAction.java b/app/src/main/java/org/schabi/newpipe/report/UserAction.java index 93a3ce16c..00a25ed8d 100644 --- a/app/src/main/java/org/schabi/newpipe/report/UserAction.java +++ b/app/src/main/java/org/schabi/newpipe/report/UserAction.java @@ -15,7 +15,8 @@ public enum UserAction { REQUESTED_CHANNEL("requested channel"), REQUESTED_PLAYLIST("requested playlist"), REQUESTED_KIOSK("requested kiosk"), - DELETE_FROM_HISTORY("delete from history"); + DELETE_FROM_HISTORY("delete from history"), + PLAY_STREAM("Play stream"); private final String message;