Commit c8595cec authored by yoshiki iguchi's avatar yoshiki iguchi Committed by Commit Bot

Enable lock screen notification by default

This CL makes the lock screen notification feature available for users.
To actually show notifications on the lock screen, the user need to
explicitly enable this feature on the ChromeOS setting.

Bug: b/111391270

Change-Id: Ibbe767f74dd1440dae4047fb1bd74bbe6e849906
Reviewed-on: https://chromium-review.googlesource.com/1166604Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Yoshiki Iguchi <yoshiki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583467}
parent f21d67fe
...@@ -33,8 +33,12 @@ AshMessageCenterLockScreenController::GetMode() { ...@@ -33,8 +33,12 @@ AshMessageCenterLockScreenController::GetMode() {
if (!features::IsLockScreenNotificationsEnabled()) if (!features::IsLockScreenNotificationsEnabled())
return Mode::HIDE; return Mode::HIDE;
// User prefs may be null in some tests.
PrefService* user_prefs = PrefService* user_prefs =
Shell::Get()->session_controller()->GetLastActiveUserPrefService(); Shell::Get()->session_controller()->GetLastActiveUserPrefService();
if (!user_prefs)
return Mode::HIDE;
const std::string& mode = const std::string& mode =
user_prefs->GetString(prefs::kMessageCenterLockScreenMode); user_prefs->GetString(prefs::kMessageCenterLockScreenMode);
if (mode == prefs::kMessageCenterLockScreenModeShow) if (mode == prefs::kMessageCenterLockScreenModeShow)
......
...@@ -26,14 +26,14 @@ const base::Feature kKeyboardShortcutViewerApp{ ...@@ -26,14 +26,14 @@ const base::Feature kKeyboardShortcutViewerApp{
"KeyboardShortcutViewerApp", base::FEATURE_ENABLED_BY_DEFAULT}; "KeyboardShortcutViewerApp", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kLockScreenNotifications{"LockScreenNotifications", const base::Feature kLockScreenNotifications{"LockScreenNotifications",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kLockScreenInlineReply{"LockScreenInlineReply", const base::Feature kLockScreenInlineReply{"LockScreenInlineReply",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kLockScreenHideSensitiveNotificationsSupport{ const base::Feature kLockScreenHideSensitiveNotificationsSupport{
"LockScreenHideSensitiveNotificationsSupport", "LockScreenHideSensitiveNotificationsSupport",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kNewWallpaperPicker{"NewWallpaperPicker", const base::Feature kNewWallpaperPicker{"NewWallpaperPicker",
base::FEATURE_ENABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
......
...@@ -246,11 +246,18 @@ cr.define('settings_people_page_quick_unlock', function() { ...@@ -246,11 +246,18 @@ cr.define('settings_people_page_quick_unlock', function() {
CrSettingsPrefs.deferInitialization = true; CrSettingsPrefs.deferInitialization = true;
// Build pref fakes. // Build pref fakes.
const fakePrefs = [{ const fakePrefs = [
key: ENABLE_LOCK_SCREEN_PREF, {
type: chrome.settingsPrivate.PrefType.BOOLEAN, key: ENABLE_LOCK_SCREEN_PREF,
value: true type: chrome.settingsPrivate.PrefType.BOOLEAN,
}]; value: true
},
{
key: 'ash.message_center.lock_screen_mode',
type: chrome.settingsPrivate.PrefType.STRING,
value: 'hide'
}
];
fakeSettings = new settings.FakeSettingsPrivate(fakePrefs); fakeSettings = new settings.FakeSettingsPrivate(fakePrefs);
fakeUma = new settings.FakeQuickUnlockUma(); fakeUma = new settings.FakeQuickUnlockUma();
setLockScreenPref(true); setLockScreenPref(true);
......
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