Disable new hotwording in the launcher for non-ChromeOS.
Voice input in general is unsupported in the launcher for non-ChromeOS. BUG=397019 Review URL: https://codereview.chromium.org/721093002 Cr-Commit-Position: refs/heads/master@{#304003}
This commit is contained in:
@@ -202,13 +202,15 @@ void StartPageService::ToggleSpeechRecognition() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool StartPageService::HotwordEnabled() {
|
bool StartPageService::HotwordEnabled() {
|
||||||
|
// Voice input for the launcher is unsupported on non-ChromeOS platforms.
|
||||||
|
// TODO(amistry): Make speech input, and hotwording, work on non-ChromeOS.
|
||||||
|
#if defined(OS_CHROMEOS)
|
||||||
if (HotwordService::IsExperimentalHotwordingEnabled()) {
|
if (HotwordService::IsExperimentalHotwordingEnabled()) {
|
||||||
auto prefs = profile_->GetPrefs();
|
auto prefs = profile_->GetPrefs();
|
||||||
return HotwordServiceFactory::IsServiceAvailable(profile_) &&
|
return HotwordServiceFactory::IsServiceAvailable(profile_) &&
|
||||||
(prefs->GetBoolean(prefs::kHotwordSearchEnabled) ||
|
(prefs->GetBoolean(prefs::kHotwordSearchEnabled) ||
|
||||||
prefs->GetBoolean(prefs::kHotwordAlwaysOnSearchEnabled));
|
prefs->GetBoolean(prefs::kHotwordAlwaysOnSearchEnabled));
|
||||||
}
|
}
|
||||||
#if defined(OS_CHROMEOS)
|
|
||||||
return HotwordServiceFactory::IsServiceAvailable(profile_) &&
|
return HotwordServiceFactory::IsServiceAvailable(profile_) &&
|
||||||
profile_->GetPrefs()->GetBoolean(prefs::kHotwordSearchEnabled);
|
profile_->GetPrefs()->GetBoolean(prefs::kHotwordSearchEnabled);
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user