Skip to content

Commit 418e341

Browse files
committed
Removed restoreInstanceState and resultServiceIntent condition
1 parent a3673f8 commit 418e341

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

app/src/main/java/org/schabi/newpipe/local/subscription/ImportConfirmationDialog.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@
1010
import androidx.fragment.app.DialogFragment;
1111
import androidx.fragment.app.Fragment;
1212

13-
import com.evernote.android.state.State;
1413
import com.livefront.bridge.Bridge;
1514

1615
import org.schabi.newpipe.R;
1716

1817
public class ImportConfirmationDialog extends DialogFragment {
19-
@State
2018
protected Intent resultServiceIntent;
2119
private static final String EXTRA_RESULT_SERVICE_INTENT = "extra_result_service_intent";
2220

@@ -37,9 +35,7 @@ public Dialog onCreateDialog(@Nullable final Bundle savedInstanceState) {
3735
.setCancelable(true)
3836
.setNegativeButton(R.string.cancel, null)
3937
.setPositiveButton(R.string.ok, (dialogInterface, i) -> {
40-
if (resultServiceIntent != null && getContext() != null) {
41-
getContext().startService(resultServiceIntent);
42-
}
38+
requireContext().startService(resultServiceIntent);
4339
dismiss();
4440
})
4541
.create();
@@ -50,8 +46,6 @@ public void onCreate(@Nullable final Bundle savedInstanceState) {
5046
super.onCreate(savedInstanceState);
5147

5248
resultServiceIntent = requireArguments().getParcelable(EXTRA_RESULT_SERVICE_INTENT);
53-
54-
Bridge.restoreInstanceState(this, savedInstanceState);
5549
}
5650

5751
@Override

0 commit comments

Comments
 (0)