OSDN Git Service

Honor the sort and group keys for notification ranking.
authorChris Wren <cwren@android.com>
Wed, 23 Jul 2014 13:11:45 +0000 (13:11 +0000)
committerChris Wren <cwren@android.com>
Wed, 23 Jul 2014 13:45:25 +0000 (09:45 -0400)
commit1031c974855ff4117a6d7866e664295786840319
tree2761392630e3c4f84be153b68cbb671fe07cb9a7
parentdedc4a379ff2697d5abce37aa422918a01ad0676
Honor the sort and group keys for notification ranking.

Sort notifications naturally, then move group childen to be next their proxy.
The group proxy is the summary, or if no summary exists, the lowest-ranked
member of the group is chosen as the proxy.

Notifications with a sortKey but no group and placed into a synthetic
group that consists of all notifications from that package and user in
the same priority bucket that also have sortKeys.

Expose a new API for listeners to get the group key for the notificaiton.

Bug: 15190903
Change-Id: I324ba0c394affdabb3588ca2ebafa7cf0acad2af
api/current.txt
core/java/android/service/notification/StatusBarNotification.java
services/core/java/com/android/server/notification/GroupedNotificationComparator.java [new file with mode: 0644]
services/core/java/com/android/server/notification/NotificationComparator.java
services/core/java/com/android/server/notification/NotificationRecord.java
services/core/java/com/android/server/notification/RankingHelper.java
services/tests/servicestests/src/com/android/server/notification/RankingHelperTest.java [new file with mode: 0644]