Commit eead91c0 authored by kcarattini's avatar kcarattini Committed by Commit bot

Hotword: Decouple sometimes and always on prefs when disabling. They can both exist independently.

BUG=

Review URL: https://codereview.chromium.org/1011963002

Cr-Commit-Position: refs/heads/master@{#320896}
parent eba228e0
...@@ -786,15 +786,12 @@ void HotwordService::SetAudioHistoryHandler( ...@@ -786,15 +786,12 @@ void HotwordService::SetAudioHistoryHandler(
void HotwordService::DisableHotwordPreferences() { void HotwordService::DisableHotwordPreferences() {
if (IsSometimesOnEnabled()) { if (IsSometimesOnEnabled()) {
if (profile_->GetPrefs()->HasPrefPath(prefs::kHotwordSearchEnabled))
profile_->GetPrefs()->SetBoolean(prefs::kHotwordSearchEnabled, false); profile_->GetPrefs()->SetBoolean(prefs::kHotwordSearchEnabled, false);
} else if (IsAlwaysOnEnabled()) { }
if (profile_->GetPrefs()->HasPrefPath( if (IsAlwaysOnEnabled()) {
prefs::kHotwordAlwaysOnSearchEnabled)) {
profile_->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled, profile_->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled,
false); false);
} }
}
} }
void HotwordService::OnHotwordSearchEnabledChanged( void HotwordService::OnHotwordSearchEnabledChanged(
......
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