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,14 +786,11 @@ void HotwordService::SetAudioHistoryHandler(
void HotwordService::DisableHotwordPreferences() {
if (IsSometimesOnEnabled()) {
if (profile_->GetPrefs()->HasPrefPath(prefs::kHotwordSearchEnabled))
profile_->GetPrefs()->SetBoolean(prefs::kHotwordSearchEnabled, false);
} else if (IsAlwaysOnEnabled()) {
if (profile_->GetPrefs()->HasPrefPath(
prefs::kHotwordAlwaysOnSearchEnabled)) {
profile_->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled,
false);
}
profile_->GetPrefs()->SetBoolean(prefs::kHotwordSearchEnabled, false);
}
if (IsAlwaysOnEnabled()) {
profile_->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled,
false);
}
}
......
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