@@ -489,7 +489,7 @@ void ArcVoiceInteractionFrameworkService::SetVoiceInteractionSetupCompleted() {
489
489
490
490
PrefService* prefs = Profile::FromBrowserContext (context_)->GetPrefs ();
491
491
prefs->SetBoolean (prefs::kArcVoiceInteractionValuePropAccepted , true );
492
- prefs-> SetBoolean (prefs:: kVoiceInteractionEnabled , true );
492
+ SetVoiceInteractionEnabled ( true );
493
493
prefs->SetBoolean (prefs::kVoiceInteractionContextEnabled , true );
494
494
495
495
ash::Shell::Get ()->NotifyVoiceInteractionSetupCompleted ();
@@ -564,22 +564,25 @@ bool ArcVoiceInteractionFrameworkService::ValidateTimeSinceUserInteraction() {
564
564
return true ;
565
565
}
566
566
567
+ void ArcVoiceInteractionFrameworkService::StartVoiceInteractionOobe () {
568
+ if (chromeos::LoginDisplayHost::default_host ())
569
+ return ;
570
+ gfx::Rect screen_bounds (chromeos::CalculateScreenBounds (gfx::Size ()));
571
+ // The display host will be destructed at the end of OOBE flow.
572
+ chromeos::LoginDisplayHostImpl* display_host =
573
+ new chromeos::LoginDisplayHostImpl (screen_bounds);
574
+ display_host->StartVoiceInteractionOobe ();
575
+ }
576
+
567
577
bool ArcVoiceInteractionFrameworkService::InitiateUserInteraction () {
568
578
VLOG (1 ) << " Start voice interaction." ;
569
579
PrefService* prefs = Profile::FromBrowserContext (context_)->GetPrefs ();
570
580
if (!prefs->GetBoolean (prefs::kArcVoiceInteractionValuePropAccepted )) {
571
581
VLOG (1 ) << " Voice interaction feature not accepted." ;
572
- // If voice interaction value prop already showing, return.
573
- if (chromeos::LoginDisplayHost::default_host ())
574
- return false ;
582
+ should_start_runtime_flow_ = true ;
575
583
// If voice interaction value prop has not been accepted, show the value
576
584
// prop OOBE page again.
577
- gfx::Rect screen_bounds (chromeos::CalculateScreenBounds (gfx::Size ()));
578
- // The display host will be destructed at the end of OOBE flow.
579
- chromeos::LoginDisplayHostImpl* display_host =
580
- new chromeos::LoginDisplayHostImpl (screen_bounds);
581
- should_start_runtime_flow_ = true ;
582
- display_host->StartVoiceInteractionOobe ();
585
+ StartVoiceInteractionOobe ();
583
586
return false ;
584
587
}
585
588
0 commit comments