diff options
| -rw-r--r-- | services/core/java/com/android/server/notification/NotificationRecord.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java index 7c89e9f0ba93..367f8cbb3458 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()); } } |