▼▼▼

- Probably fix race condition when clearing the cache
- Unload unneeded launcher activity while in game
This commit is contained in:
artdeell 2021-12-13 22:45:52 +03:00
parent 2478758e5d
commit ad8d115b82
3 changed files with 4 additions and 1 deletions

View file

@ -62,7 +62,6 @@ public class BaseMainActivity extends BaseActivity {
protected void initLayout(int resId) {
setContentView(resId);
ProfileAdapter.clearIconCache();
try {
Logger.getInstance().reset();
// FIXME: is it safe fot multi thread?

View file

@ -91,6 +91,8 @@ public class PojavLauncherActivity extends BaseLauncherActivity
protected void onDestroy() {
ExtraCore.removeExtraListenerFromValue("back_preference", backPreferenceListener);
super.onDestroy();
ProfileAdapter.clearIconCache();
Log.i("LauncherActivity","Destroyed!");
}
@Override

View file

@ -349,6 +349,8 @@ public class MinecraftDownloaderTask extends AsyncTask<String, String, Throwable
mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
mainIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
mActivity.startActivity(mainIntent);
mActivity.finish();
Log.i("ActCheck","mainActivity finishing="+mActivity.isFinishing()+", destroyed="+mActivity.isDestroyed());
}
catch (Throwable e) {
Tools.showError(mActivity, e);