Use AppComponentFactory to replace ClassLoader

This commit is contained in:
topjohnwu
2022-02-01 22:43:44 -08:00
parent 7f65f7d3ca
commit 355341f0ab
7 changed files with 139 additions and 83 deletions
@@ -118,8 +118,7 @@ public class DownloadActivity extends Activity {
File apk = dynLoad ? DynAPK.current(this) : new File(getCacheDir(), "manager.apk");
request(apkLink).setExecutor(AsyncTask.THREAD_POOL_EXECUTOR).getAsFile(apk, file -> {
if (dynLoad) {
DynLoad.setup(this);
runOnUiThread(onSuccess);
// TODO
} else {
var receiver = APKInstall.register(this, BuildConfig.APPLICATION_ID, onSuccess);
APKInstall.installapk(this, file);