| Index: chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.cc
|
| diff --git a/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.cc b/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.cc
|
| index b9435042b0381fb415e516b1c315eb791a2f66f0..d3ffd16064db918c44167e69f43ff64a34c63ccc 100644
|
| --- a/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.cc
|
| +++ b/chrome/browser/chromeos/app_mode/arc/arc_kiosk_app_service.cc
|
| @@ -65,8 +65,18 @@ void ArcKioskAppService::OnTaskDestroyed(int32_t task_id) {
|
| }
|
| }
|
|
|
| +void ArcKioskAppService::MaintenanceSessionCreated() {
|
| + maintenance_session_running_ = true;
|
| + PreconditionsChanged();
|
| +}
|
| +
|
| +void ArcKioskAppService::MaintenanceSessionFinished() {
|
| + maintenance_session_running_ = false;
|
| + PreconditionsChanged();
|
| +}
|
| +
|
| ArcKioskAppService::ArcKioskAppService(Profile* profile, ArcAppListPrefs* prefs)
|
| - : profile_(profile), prefs_(prefs) {
|
| + : profile_(profile), prefs_(prefs), maintenance_session_running_(false) {
|
| if (prefs_)
|
| prefs_->AddObserver(this);
|
| app_manager_ = ArcKioskAppManager::Get();
|
| @@ -94,7 +104,8 @@ ArcKioskAppService::~ArcKioskAppService() {
|
| void ArcKioskAppService::PreconditionsChanged() {
|
| app_info_ = prefs_->GetApp(app_id_);
|
| if (app_info_ && app_info_->ready &&
|
| - profile_->GetPrefs()->GetBoolean(prefs::kArcPolicyCompliant)) {
|
| + profile_->GetPrefs()->GetBoolean(prefs::kArcPolicyCompliant) &&
|
| + !maintenance_session_running_) {
|
| if (!app_launcher_)
|
| app_launcher_.reset(new ArcKioskAppLauncher(profile_, prefs_, app_id_));
|
| } else if (task_id_ != -1) {
|
|
|