summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorByteHamster <ByteHamster@users.noreply.github.com>2024-03-24 01:38:10 +0100
committerGitHub <noreply@github.com>2024-03-24 01:38:10 +0100
commit79856b7931eebc7093013861de78ac68228ea7e6 (patch)
tree10e723ea34593d87bb235c9675e2117956f45531
parenta065d3fc338371d1e5f0782bb99a847cc5a9ea93 (diff)
downloadAntennaPod-79856b7931eebc7093013861de78ac68228ea7e6.zip
Launch splash activity after restoring backup (#7020)
-rw-r--r--app/src/main/java/de/danoeh/antennapod/fragment/preferences/ImportExportPreferencesFragment.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/ImportExportPreferencesFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/ImportExportPreferencesFragment.java
index 1cf19aa68..37022dd68 100644
--- a/app/src/main/java/de/danoeh/antennapod/fragment/preferences/ImportExportPreferencesFragment.java
+++ b/app/src/main/java/de/danoeh/antennapod/fragment/preferences/ImportExportPreferencesFragment.java
@@ -5,6 +5,7 @@ import android.app.ProgressDialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
+import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
@@ -37,7 +38,6 @@ import de.danoeh.antennapod.storage.importexport.FavoritesWriter;
import de.danoeh.antennapod.storage.importexport.HtmlWriter;
import de.danoeh.antennapod.storage.importexport.OpmlWriter;
import de.danoeh.antennapod.storage.preferences.UserPreferences;
-import de.danoeh.antennapod.ui.appstartintent.MainActivityStarter;
import io.reactivex.Completable;
import io.reactivex.Observable;
import io.reactivex.android.schedulers.AndroidSchedulers;
@@ -363,7 +363,9 @@ public class ImportExportPreferencesFragment extends PreferenceFragmentCompat {
}
private void forceRestart() {
- Intent intent = new MainActivityStarter(getContext()).getIntent();
+ PackageManager pm = getContext().getPackageManager();
+ Intent intent = pm.getLaunchIntentForPackage(getContext().getPackageName());
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getContext().getApplicationContext().startActivity(intent);
Runtime.getRuntime().exit(0);
}