Send less ranking reconsiderations and updates

- NotificationIntrusivenessExtractor does not need to reconsider
ranking for non intrusive notifications
- All adjustments (by group helper and the assistant) have been moved to
extractors so we can selectively send ranking updates instead of always
sending them.

Fixes: 62827235
Test: runtest systemui-notification
Change-Id: I2ea746c3883049abac0752788a3f4c2fa50c8064
This commit is contained in:
Julia Reynolds
2017-07-11 10:39:58 -04:00
parent ea9009b494
commit eb3dca71b5
16 changed files with 669 additions and 109 deletions

View File

@@ -17,7 +17,7 @@ package android.service.notification;
import android.annotation.SystemApi;
import android.annotation.TestApi;
import android.app.NotificationChannel;
import android.app.Notification;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
@@ -48,6 +48,12 @@ public final class Adjustment implements Parcelable {
* {@link NotificationAssistantService#onNotificationSnoozedUntilContext}.
*/
public static final String KEY_SNOOZE_CRITERIA = "key_snooze_criteria";
/**
* Data type: String. Used to change what {@link Notification#getGroup() group} a notification
* belongs to.
* @hide
*/
public static final String KEY_GROUP_KEY = "key_group_key";
/**
* Create a notification adjustment.
@@ -146,4 +152,11 @@ public final class Adjustment implements Parcelable {
dest.writeBundle(mSignals);
dest.writeInt(mUser);
}
@Override
public String toString() {
return "Adjustment{"
+ "mSignals=" + mSignals
+ '}';
}
}