Skip to content

Fix crash on screen rotation while entering SoundCloud import URL#12995

Merged
TobiGr merged 3 commits intoTeamNewPipe:devfrom
siddhesh-06:siddhesh-06/fix/crash-on-soundcloud-import
Jan 9, 2026
Merged

Fix crash on screen rotation while entering SoundCloud import URL#12995
TobiGr merged 3 commits intoTeamNewPipe:devfrom
siddhesh-06:siddhesh-06/fix/crash-on-soundcloud-import

Conversation

@siddhesh-06
Copy link
Contributor

@siddhesh-06 siddhesh-06 commented Jan 3, 2026

What is it?

  • Bugfix (user facing)

Description of the changes in your PR

  • Fixed the below IllegalStateException
Screenshot 2026-01-04 003632
  • Preserved the service Intent across configuration changes (e.g. screen rotation)
  • Ensured the dialog safely restores its state after recreation
  • Prevented null access when the dialog is recreated by the system

Before/After Screenshots/Screen Record

  • Before:
before-fix.mp4
  • After:
after-fix.mp4

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label Jan 3, 2026
@TobiGr TobiGr added bug Issue is related to a bug GUI Issue is related to the graphical user interface import/export anything related to Import/export of data, subscriptions labels Jan 3, 2026
@TobiGr
Copy link
Contributor

TobiGr commented Jan 7, 2026

LGTM, are we able to remove the state now? At least I do not see areason to keep it now.
remove-state.patch

diff --git a/app/src/main/java/org/schabi/newpipe/local/subscription/ImportConfirmationDialog.java b/app/src/main/java/org/schabi/newpipe/local/subscription/ImportConfirmationDialog.java
index b586ad3..0054bd2 100644
--- a/app/src/main/java/org/schabi/newpipe/local/subscription/ImportConfirmationDialog.java
+++ b/app/src/main/java/org/schabi/newpipe/local/subscription/ImportConfirmationDialog.java
@@ -10,13 +10,11 @@ import androidx.appcompat.app.AlertDialog;
 import androidx.fragment.app.DialogFragment;
 import androidx.fragment.app.Fragment;
 
-import com.evernote.android.state.State;
 import com.livefront.bridge.Bridge;
 
 import org.schabi.newpipe.R;
 
 public class ImportConfirmationDialog extends DialogFragment {
-    @State
     protected Intent resultServiceIntent;
     private static final String EXTRA_RESULT_SERVICE_INTENT = "extra_result_service_intent";
 
@@ -48,10 +46,7 @@ public class ImportConfirmationDialog extends DialogFragment {
     @Override
     public void onCreate(@Nullable final Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
-
         resultServiceIntent = requireArguments().getParcelable(EXTRA_RESULT_SERVICE_INTENT);
-
-        Bridge.restoreInstanceState(this, savedInstanceState);
     }
 
     @Override

@siddhesh-06 siddhesh-06 requested a review from TobiGr January 8, 2026 16:02
Copy link
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you!

@TobiGr TobiGr merged commit cafb139 into TeamNewPipe:dev Jan 9, 2026
5 checks passed
@TobiGr
Copy link
Contributor

TobiGr commented Jan 9, 2026

/backport release-0-28.1

@github-actions
Copy link

github-actions bot commented Jan 9, 2026

Successfully created backport PR for release-0-28.1:

dustdfg added a commit to dustdfg/NewPipe that referenced this pull request Jan 9, 2026
dustdfg added a commit to dustdfg/NewPipe that referenced this pull request Jan 9, 2026
dustdfg added a commit to dustdfg/NewPipe that referenced this pull request Jan 11, 2026
dustdfg added a commit to dustdfg/NewPipe that referenced this pull request Jan 11, 2026
@theimpulson theimpulson mentioned this pull request Jan 26, 2026
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is related to a bug GUI Issue is related to the graphical user interface import/export anything related to Import/export of data, subscriptions size/small PRs with less than 50 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI error crash when rotating screen while typing url to import soundcloud file

3 participants