Fix toast

This commit is contained in:
vvb2060 2021-12-15 14:38:10 +08:00 committed by John Wu
parent d3ade06421
commit afcc60066e

View File

@ -77,7 +77,6 @@ public class DownloadActivity extends Activity {
private void error(Throwable e) { private void error(Throwable e) {
Log.e(getClass().getSimpleName(), "", e); Log.e(getClass().getSimpleName(), "", e);
Toast.makeText(themed, e.getMessage(), Toast.LENGTH_LONG).show();
finish(); finish();
} }
@ -120,7 +119,7 @@ public class DownloadActivity extends Activity {
request(apkLink).setExecutor(AsyncTask.THREAD_POOL_EXECUTOR).getAsFile(apk, file -> { request(apkLink).setExecutor(AsyncTask.THREAD_POOL_EXECUTOR).getAsFile(apk, file -> {
if (dynLoad) { if (dynLoad) {
DynLoad.setup(this); DynLoad.setup(this);
onSuccess.run(); runOnUiThread(onSuccess);
} else { } else {
var receiver = APKInstall.register(this, BuildConfig.APPLICATION_ID, onSuccess); var receiver = APKInstall.register(this, BuildConfig.APPLICATION_ID, onSuccess);
APKInstall.installapk(this, file); APKInstall.installapk(this, file);