Skip to content

Commit

Permalink
[lipstick] Remove x-nemo-suppress-display-on notification hint. Fixes…
Browse files Browse the repository at this point in the history
… JB#51376

Introduced with commit e9c29a3 / JB#37024 to allow device lock
mode to have notifications that are displayed but don't turn on the
screen.

This can be now achieved with public visibility hint and I didn't
find any remaining usage.
  • Loading branch information
pvuorela committed Sep 28, 2020
1 parent f2286a2 commit 8a7fa61
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion src/notifications/lipsticknotification.cpp
Expand Up @@ -46,7 +46,6 @@ const char *LipstickNotification::HINT_REMOTE_ACTION_ICON_PREFIX = "x-nemo-remot
const char *LipstickNotification::HINT_USER_REMOVABLE = "x-nemo-user-removable";
const char *LipstickNotification::HINT_FEEDBACK = "x-nemo-feedback";
const char *LipstickNotification::HINT_DISPLAY_ON = "x-nemo-display-on";
const char *LipstickNotification::HINT_SUPPRESS_DISPLAY_ON = "x-nemo-suppress-display-on";
const char *LipstickNotification::HINT_ORIGIN_PACKAGE = "x-nemo-origin-package";
const char *LipstickNotification::HINT_OWNER = "x-nemo-owner";
const char *LipstickNotification::HINT_RESTORED = "x-nemo-restored";
Expand Down
3 changes: 0 additions & 3 deletions src/notifications/lipsticknotification.h
Expand Up @@ -118,9 +118,6 @@ class LIPSTICK_EXPORT LipstickNotification : public QObject
//! Nemo hint: Whether to turn the screen on when displaying preview
static const char *HINT_DISPLAY_ON;

//! Nemo hint: Even if priority suggests it, do not turn display on
static const char *HINT_SUPPRESS_DISPLAY_ON;

//! Nemo hint: Indicates the Android package name from which this notification originates
static const char *HINT_ORIGIN_PACKAGE;

Expand Down
4 changes: 1 addition & 3 deletions src/notifications/notificationpreviewpresenter.cpp
Expand Up @@ -247,10 +247,8 @@ void NotificationPreviewPresenter::setCurrentNotification(LipstickNotification *
const bool notificationIsCritical = notification->urgency() >= LipstickNotification::Critical;
const bool displayOnRequested = notification->hints().value(LipstickNotification::HINT_DISPLAY_ON).toBool()
&& !m_notificationFeedbackPlayer->doNotDisturbMode();
const bool notificationCanUnblank
= !notification->hints().value(LipstickNotification::HINT_SUPPRESS_DISPLAY_ON).toBool();

if ((notificationIsCritical || displayOnRequested) && notificationCanUnblank) {
if ((notificationIsCritical || displayOnRequested)) {
QString mceIdToAdd = QString("lipstick_notification_") + QString::number(notification->id());
QDBusMessage msg = QDBusMessage::createMethodCall(MCE_SERVICE, MCE_REQUEST_PATH, MCE_REQUEST_IF,
MCE_NOTIFICATION_BEGIN);
Expand Down

0 comments on commit 8a7fa61

Please sign in to comment.