!1667 switch to a already existed user, OOBE will be launched

Merge pull request !1667 from zhoujun62/fix_bug
This commit is contained in:
openharmony_ci
2022-05-04 07:22:18 +00:00
committed by Gitee
2 changed files with 6 additions and 1 deletions
@@ -3544,7 +3544,6 @@ void AbilityManagerService::StartUserApps(int32_t userId, bool isBoot)
if (currentMissionListManager_ && currentMissionListManager_->IsStarted()) {
HILOG_INFO("missionListManager ResumeManager");
currentMissionListManager_->ResumeManager();
return;
}
StartSystemAbilityByUser(userId, isBoot);
}
@@ -1850,6 +1850,12 @@ void MissionListManager::BackToLauncher()
HILOG_WARN("no root launcher ability, no need back to launcher.");
return;
}
if (launcherRootAbility->GetAbilityInfo().bundleName != AbilityConfig::LAUNCHER_BUNDLE_NAME) {
HILOG_WARN("not launcher mission, no need back to launcher.");
return;
}
auto launcherRootMission = launcherRootAbility->GetMission();
if (!launcherRootMission) {
HILOG_WARN("no root launcher mission, no need back to launcher.");