From 7e431621c41af719354cb7100c2c9195179cdbe6 Mon Sep 17 00:00:00 2001 From: Chris Wren Date: Wed, 25 May 2016 16:37:17 -0400 Subject: [PATCH] boost starred people to at least high importance Bug: 28949659 Change-Id: If604062a282db5db463642315a8fa5f7cd6e597c --- .../com/android/server/notification/NotificationRecord.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java index 7c89e9f0ba934..367f8cbb34589 100644 --- a/services/core/java/com/android/server/notification/NotificationRecord.java +++ b/services/core/java/com/android/server/notification/NotificationRecord.java @@ -318,8 +318,12 @@ public final class NotificationRecord { public void setContactAffinity(float contactAffinity) { mContactAffinity = contactAffinity; + if (mImportance < IMPORTANCE_HIGH && + mContactAffinity >= ValidateNotificationPeople.STARRED_CONTACT) { + setImportance(IMPORTANCE_HIGH, getPeopleExplanation()); + } if (mImportance < IMPORTANCE_DEFAULT && - mContactAffinity > ValidateNotificationPeople.VALID_CONTACT) { + mContactAffinity >= ValidateNotificationPeople.VALID_CONTACT) { setImportance(IMPORTANCE_DEFAULT, getPeopleExplanation()); } }