Skip to content

Commit

Permalink
[lipstick] Android notifications to wake display only if having feedb…
Browse files Browse the repository at this point in the history
…ack. Contributes to JB#38924
  • Loading branch information
pvuorela committed Feb 2, 2018
1 parent 9fde2b2 commit e433cae
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/notifications/notificationmanager.cpp
Expand Up @@ -333,10 +333,14 @@ uint NotificationManager::Notify(const QString &appName, uint replacesId, const
priority = m_androidPriorityStore->appDetails(appName);
}
hints_.insert(LipstickNotification::HINT_PRIORITY, priority.first);

if (!priority.second.isEmpty()) {
hints_.insert(LipstickNotification::HINT_FEEDBACK, priority.second);
// Also turn the display on if required
hints_.insert(LipstickNotification::HINT_DISPLAY_ON, true);
// Also turn the display on if required, but only if it's really playing vibra or sound feedback
if (hints_.value(LipstickNotification::HINT_VIBRA, false).toBool()
|| !hints_.value(LipstickNotification::HINT_SUPPRESS_SOUND, false).toBool()) {
hints_.insert(LipstickNotification::HINT_DISPLAY_ON, true);
}
}
} else {
if (notification->appName().isEmpty() && !pidProperties.first.isEmpty()) {
Expand Down

0 comments on commit e433cae

Please sign in to comment.