1.解决打开二级和设置等多层级页面按Home键app被杀死和跳转到Launcher两种情况,针对被杀死的处理

This commit is contained in:
2026-03-20 15:40:39 +08:00
parent c7600b014a
commit 2f7539febb

View File

@@ -293,6 +293,10 @@ public class Launcher extends FragmentActivity implements SplashView.SplashAdLi
ADSWindowManager.init(this);
bindAdsWindowMultiView();
//内存不足时释放单列所有Fragment 打开设置按Home出现单个Fragment异常
if(FragmentManager.getInstance()!=null){
FragmentManager.getInstance().destory();
}
}
@@ -711,6 +715,7 @@ public boolean onGenericMotionEvent(MotionEvent event) {
displayStatus();
}else if(MessageEvent.ACTION_UPADATE_APPS_SOURCE.equals(event.action)){
if(currentFragment!=null&&currentFragment instanceof AppsFragment){
LogUtils.loge("Launcher onMessageEvent===>"+event.action);
currentFragment.onResumeFragment(event);
}
@@ -718,6 +723,11 @@ public boolean onGenericMotionEvent(MotionEvent event) {
}
@Override
public void setFragmentsDisableRefreshDataFlag() {
}
private void displayStatus() {
runOnUiThread(new Runnable() {