public class ValidateNotificationPeople extends Object implements NotificationSignalExtractor
NotificationSignalExtractor
attempts to validate
people references. Also elevates the priority of real people.
Modifier and Type | Field and Description |
---|---|
protected boolean |
mEnabled |
Constructor and Description |
---|
ValidateNotificationPeople() |
Modifier and Type | Method and Description |
---|---|
float |
getContactAffinity(UserHandle userHandle,
Bundle extras,
int timeoutMs,
float timeoutAffinity) |
static String[] |
getExtraPeople(Bundle extras) |
void |
initialize(Context context,
NotificationUsageStats usageStats)
One-time initialization.
|
RankingReconsideration |
process(NotificationRecord record)
Called once per notification that is posted or updated.
|
void |
setConfig(RankingConfig config)
Called whenever the
RankingConfig changes. |
public void initialize(Context context, NotificationUsageStats usageStats)
NotificationSignalExtractor
initialize
in interface NotificationSignalExtractor
public RankingReconsideration process(NotificationRecord record)
NotificationSignalExtractor
process
in interface NotificationSignalExtractor
RankingReconsideration
will be run on a worker thread, and if notifications
are re-ordered by that execution, the NotificationManagerService
may send order
update events to the NotificationListenerService
s.public void setConfig(RankingConfig config)
NotificationSignalExtractor
RankingConfig
changes.setConfig
in interface NotificationSignalExtractor
config
- information about which signals are important.public float getContactAffinity(UserHandle userHandle, Bundle extras, int timeoutMs, float timeoutAffinity)
extras
- extras of the notification with EXTRA_PEOPLE populatedtimeoutMs
- timeout in milliseconds to wait for contacts responsetimeoutAffinity
- affinity to return when the timeout specified via
timeoutMs
is hit