Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
▼▼▼
Browse files Browse the repository at this point in the history
- Probably fix race condition when clearing the cache
- Unload unneeded launcher activity while in game
  • Loading branch information
artdeell committed Dec 13, 2021
1 parent 2478758 commit ad8d115
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ public PojavLauncherActivity() {
protected void onDestroy() {
ExtraCore.removeExtraListenerFromValue("back_preference", backPreferenceListener);
super.onDestroy();
ProfileAdapter.clearIconCache();
Log.i("LauncherActivity","Destroyed!");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,8 @@ protected void onPostExecute(Throwable p1)
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);
Expand Down

0 comments on commit ad8d115

Please sign in to comment.