Commit d24f2533 authored by Tony de Luna's avatar Tony de Luna Committed by Commit Bot

OOBE shelf: Only update session state if showing account picker.

During OOBE enrollment flow we fetch the list of policies and this may
contain users such as a public session user.

1.If the list of users fetched is not empty we show the account picker
screen.
2 If the list of users is empty we show the GAIA login screen.

We should only update session state to LOGIN_PRIMARY if we show the
account picker screen. Session state should remain OOBE if we show the
GAIA login screen.

Setting the value of session state controls the colors of the buttons
and icons in the shelf and setting it incorrectly causes visual bugs.

Bug: 937367
Change-Id: Iaa8f5913a36936f0959da8a517ddfb21ea5d5971
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1500632
Commit-Queue: Tony De Luna <tonydeluna@chromium.org>
Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638259}
parent b0440e2e
......@@ -902,10 +902,6 @@ void WizardController::OnEnrollmentDone() {
return;
}
// This populates post-OOBE shelf and UI.
session_manager::SessionManager::Get()->SetSessionState(
session_manager::SessionState::LOGIN_PRIMARY);
if (KioskAppManager::Get()->IsAutoLaunchEnabled())
AutoLaunchKioskApp();
else
......
......@@ -93,6 +93,7 @@
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"
#include "components/session_manager/core/session_manager.h"
#include "components/strings/grit/components_strings.h"
#include "components/user_manager/known_user.h"
#include "components/user_manager/user.h"
......@@ -1289,6 +1290,11 @@ void SigninScreenHandler::HandleAccountPickerReady() {
base::BindOnce(&SigninScreenHandler::OnWallpaperBlurChanged,
weak_factory_.GetWeakPtr()));
// This updates post-OOBE shelf UI. Changes the color of shelf buttons and
// displays additional buttons that should only be shown in the login screen.
session_manager::SessionManager::Get()->SetSessionState(
session_manager::SessionState::LOGIN_PRIMARY);
if (delegate_)
delegate_->OnSigninScreenReady();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment