Replaced System.Exit calls with FinishAffinity and Start Activity calls
Implemented "RestartApp" method defined in NavigationHelper.java. This method is used in ExitActivity.java and ContentSettingsFragment.java
This commit is contained in:
parent
547a1a9970
commit
90de75968d
3 changed files with 17 additions and 2 deletions
|
|
@ -27,6 +27,7 @@ import org.schabi.newpipe.extractor.NewPipe;
|
|||
import org.schabi.newpipe.extractor.localization.ContentCountry;
|
||||
import org.schabi.newpipe.extractor.localization.Localization;
|
||||
import org.schabi.newpipe.streams.io.StoredFileHelper;
|
||||
import org.schabi.newpipe.util.NavigationHelper;
|
||||
import org.schabi.newpipe.util.ZipHelper;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -255,7 +256,7 @@ public class ContentSettingsFragment extends BasePreferenceFragment {
|
|||
// save import path only on success; save immediately because app is about to exit
|
||||
saveLastImportExportDataUri(true);
|
||||
// restart app to properly load db
|
||||
System.exit(0);
|
||||
NavigationHelper.restartApp(requireActivity());
|
||||
}
|
||||
|
||||
private Uri getImportExportDataUri() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue