Fixed the app restarting not working properly

* Using [``process-phoenix``](https://github.com/JakeWharton/ProcessPhoenix)
This commit is contained in:
litetex 2021-09-06 20:47:44 +02:00
parent 6a1d81fcf3
commit fda0a550fd
4 changed files with 19 additions and 3 deletions

View file

@ -11,6 +11,8 @@ import androidx.core.app.NotificationManagerCompat;
import androidx.multidex.MultiDexApplication;
import androidx.preference.PreferenceManager;
import com.jakewharton.processphoenix.ProcessPhoenix;
import org.acra.ACRA;
import org.acra.config.ACRAConfigurationException;
import org.acra.config.CoreConfiguration;
@ -86,6 +88,12 @@ public class App extends MultiDexApplication {
app = this;
if (ProcessPhoenix.isPhoenixProcess(this)) {
Log.i(TAG, "This is a phoenix process! "
+ "Aborting initialization of App[onCreate]");
return;
}
// Initialize settings first because others inits can use its values
NewPipeSettings.initSettings(this);