diff options
| author | 2018-03-29 15:22:59 -0400 | |
|---|---|---|
| committer | 2018-03-29 15:34:34 -0400 | |
| commit | 7276e63f4c62e37cae1540c928d5f07d7da52a7d (patch) | |
| tree | e5c313c08bf430eb2a352a6fd9f16745d7d148dd | |
| parent | b2c4a55405151a46c3fe4739206487e903d29afa (diff) | |
Wait before computing contact affinity
Instead of assuming we'll have an answer as soon as the handler
gets around to handling the rankingreconsideration.
Change-Id: Id8f2147f59abf6435d869b9ffcc5cf2c2b52f0f7
Fixes: 73010730
Test: cts-verifier
| -rw-r--r-- | services/core/java/com/android/server/notification/ValidateNotificationPeople.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/notification/ValidateNotificationPeople.java b/services/core/java/com/android/server/notification/ValidateNotificationPeople.java index c0c66b248ea5..6cf8f86aed83 100644 --- a/services/core/java/com/android/server/notification/ValidateNotificationPeople.java +++ b/services/core/java/com/android/server/notification/ValidateNotificationPeople.java @@ -468,12 +468,14 @@ public class ValidateNotificationPeople implements NotificationSignalExtractor { private final LinkedList<String> mPendingLookups; private final Context mContext; + // Amount of time to wait for a result from the contacts db before rechecking affinity. + private static final long LOOKUP_TIME = 1000; private float mContactAffinity = NONE; private NotificationRecord mRecord; private PeopleRankingReconsideration(Context context, String key, LinkedList<String> pendingLookups) { - super(key); + super(key, LOOKUP_TIME); mContext = context; mPendingLookups = pendingLookups; } |