Write to crash report file if app is unable to open
This commit is contained in:
parent
4b252250c0
commit
045790eaa1
|
@ -13,9 +13,9 @@ import android.widget.ProgressBar;
|
||||||
|
|
||||||
import de.danoeh.antennapod.R;
|
import de.danoeh.antennapod.R;
|
||||||
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
||||||
|
import de.danoeh.antennapod.error.CrashReportWriter;
|
||||||
import io.reactivex.Completable;
|
import io.reactivex.Completable;
|
||||||
import io.reactivex.android.schedulers.AndroidSchedulers;
|
import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||||
import io.reactivex.disposables.Disposable;
|
|
||||||
import io.reactivex.schedulers.Schedulers;
|
import io.reactivex.schedulers.Schedulers;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,13 +44,15 @@ public class SplashActivity extends AppCompatActivity {
|
||||||
})
|
})
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
.observeOn(AndroidSchedulers.mainThread())
|
.observeOn(AndroidSchedulers.mainThread())
|
||||||
.subscribe(() -> {
|
.subscribe(
|
||||||
|
() -> {
|
||||||
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
overridePendingTransition(0, 0);
|
overridePendingTransition(0, 0);
|
||||||
finish();
|
finish();
|
||||||
}, error -> {
|
}, error -> {
|
||||||
error.printStackTrace();
|
error.printStackTrace();
|
||||||
|
CrashReportWriter.write(error);
|
||||||
Toast.makeText(this, error.getLocalizedMessage(), Toast.LENGTH_LONG).show();
|
Toast.makeText(this, error.getLocalizedMessage(), Toast.LENGTH_LONG).show();
|
||||||
finish();
|
finish();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue