Commit 2561b0b
committed
New notification priority and related APIs.
This change introduces a few new bits of data on
Notification that will help the Notification Manager and
System UI route and display them more intelligently:
-> priority: an integer in a predefined range that
indicates the app's best guess as to the relative
importance (to the user, right now) of that information
-> kind: a tag (really, set of tags) indicating the general
type of notification (realtime, asynchronous, etc)
-> extras: a Bundle of additional key/value pairs
associated with this notification (currently @hidden)
The notification manager takes these data into account when
assigning to each notification a score which is passed with
the notification on to the system UI, where it can be used to
affect presentation. For example:
- Spammy apps (identified explicitly by the user or by
some other means) will have their notifications scored
very negatively by the notification manager, allowing
the UI to suppress them
- Notifications of higher score might be shown larger
or in a different way
- Very important notifications (indicated by a very high
score) might interrupt the user during an otherwise
important task (videochat, game, etc)
Implementation note: This replaces/extends the old internal
notion of "priority", which was mostly used to organize
ongoings and system notifications at the top of the panel.
Change-Id: Ie063dc75f198a68e2b5734a3aa0cacb5aba1ac391 parent c725a37 commit 2561b0b
File tree
10 files changed
+572
-252
lines changed- api
- core/java
- android/app
- com/android/internal/statusbar
- packages/SystemUI/src/com/android/systemui/statusbar
- phone
- policy
- tablet
- services/java/com/android/server
- tests/StatusBar/src/com/android/statusbartest
10 files changed
+572
-252
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3626 | 3626 | | |
3627 | 3627 | | |
3628 | 3628 | | |
3629 | | - | |
| 3629 | + | |
3630 | 3630 | | |
3631 | 3631 | | |
3632 | 3632 | | |
3633 | 3633 | | |
3634 | 3634 | | |
| 3635 | + | |
| 3636 | + | |
| 3637 | + | |
| 3638 | + | |
| 3639 | + | |
| 3640 | + | |
| 3641 | + | |
| 3642 | + | |
| 3643 | + | |
| 3644 | + | |
3635 | 3645 | | |
3636 | 3646 | | |
3637 | 3647 | | |
| |||
3642 | 3652 | | |
3643 | 3653 | | |
3644 | 3654 | | |
| 3655 | + | |
3645 | 3656 | | |
3646 | 3657 | | |
3647 | 3658 | | |
3648 | 3659 | | |
3649 | 3660 | | |
| 3661 | + | |
3650 | 3662 | | |
3651 | 3663 | | |
3652 | 3664 | | |
| |||
3656 | 3668 | | |
3657 | 3669 | | |
3658 | 3670 | | |
| 3671 | + | |
3659 | 3672 | | |
3660 | 3673 | | |
3661 | 3674 | | |
| |||
3671 | 3684 | | |
3672 | 3685 | | |
3673 | 3686 | | |
| 3687 | + | |
3674 | 3688 | | |
3675 | 3689 | | |
3676 | 3690 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
0 commit comments