Skip to content

Commit

Permalink
Merge pull request #11428 from Two-Ai/remove-returnActivity-test
Browse files Browse the repository at this point in the history
Remove outdated returnActivity test code
  • Loading branch information
TobiGr authored Aug 14, 2024
2 parents 51ee2f8 + 38c823a commit fad3120
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 57 deletions.
22 changes: 0 additions & 22 deletions app/src/main/java/org/schabi/newpipe/error/ErrorActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static org.schabi.newpipe.util.Localization.assureCorrectAppLanguage;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
Expand All @@ -13,7 +12,6 @@
import android.view.MenuInflater;
import android.view.MenuItem;

import androidx.annotation.Nullable;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
Expand All @@ -22,7 +20,6 @@
import com.grack.nanojson.JsonWriter;

import org.schabi.newpipe.BuildConfig;
import org.schabi.newpipe.MainActivity;
import org.schabi.newpipe.R;
import org.schabi.newpipe.databinding.ActivityErrorBinding;
import org.schabi.newpipe.util.Localization;
Expand Down Expand Up @@ -187,25 +184,6 @@ private String formErrorText(final String[] el) {
.collect(Collectors.joining(separator + "\n", separator + "\n", separator));
}

/**
* Get the checked activity.
*
* @param returnActivity the activity to return to
* @return the casted return activity or null
*/
@Nullable
static Class<? extends Activity> getReturnActivity(final Class<?> returnActivity) {
Class<? extends Activity> checkedReturnActivity = null;
if (returnActivity != null) {
if (Activity.class.isAssignableFrom(returnActivity)) {
checkedReturnActivity = returnActivity.asSubclass(Activity.class);
} else {
checkedReturnActivity = MainActivity.class;
}
}
return checkedReturnActivity;
}

private void buildInfo(final ErrorInfo info) {
String text = "";

Expand Down
35 changes: 0 additions & 35 deletions app/src/test/java/org/schabi/newpipe/error/ErrorActivityTest.java

This file was deleted.

0 comments on commit fad3120

Please sign in to comment.