History log of /frameworks/base/core/java/android/service/notification/NotificationListenerService.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
955d8d69ea6caabce1461dc25b339b9bf9dc61a6 08-Oct-2014 Dianne Hackborn <hackbod@google.com> Put in real "code" (aka marketing) name.

Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
0fef44de68c022a35aa34b6f36f8a183c827c684 30-Sep-2014 Chris Wren <cwren@android.com> Add a returns clause to the matchesInterruptionFilter javadoc.

Bug: 17641219
Change-Id: I4f1949902bf872823389f3db8e694e370e113295
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
957ed70273b2cf2bc65cd96ac0e91a35e58a0b6d 25-Sep-2014 Chris Wren <cwren@android.com> getCurrentInterruptionFilter should return the filter value, not the hints.

Bug: 17641218
Change-Id: I4a6ff073c04a3d3624916293824faba40f6226aa
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
704dd61f5be9266b3cfdfeb407b6fc4822bac7af 09-Sep-2014 Christoph Studer <chstuder@google.com> NoLiService: Delete @removed meetsInterruptionFilter

This should not break any apps as this API has been marked
@removed more than a week ago.

Bug: 17425123
Change-Id: I19d7e933a3f2a59e1b406a9f87d272f058a13e0d
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
69dd40d08a164d5c357442733cf291719dfe94e8 05-Sep-2014 Griff Hazen <griff@google.com> Merge "Reduce chance of notification listener dropped messages." into lmp-dev
3ad4e3a45bbe44129b14c4d391431e44f1e04f0c 02-Sep-2014 Chris Wren <cwren@android.com> Honor per-app sensitivity setting.

Settings are stored by NotificationManagerService in the policy file,
and are communicated to NotificationListeners via a hidden API on the
RankingMap object.

Bug: 16324353
Change-Id: I2d5cf6782273744cbf9b309dec76780cc0a4c39e
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
84a00ea9e3df3ff051d3e86945d2befea32072ee 03-Sep-2014 Griff Hazen <griff@google.com> Reduce chance of notification listener dropped messages.

The existing code for notification manager/listeners uses a oneway
binder api to deliver messages. One problem with this is that
notification objects can sometimes get fairly large, and can bump
into the oneway binder transaction buffer if many happen at once.

To reduce this issue, flip the service into a oneway delivery of
a status bar notification holder, whose wrapped content is then
immediately fetched upon receipt of the one-way message. This moves
the meat of the fetch to be over a two-way interface without changing
the properties of which object is actually sent (a tickle solution
with lookup key would have changed this)

Further research: attempt to chunk notification objects themselves.
They can sometimes transfer hundreds of KB over a binder transaction.

Bug: 15426276
Change-Id: Ib1a1f4ff848c16f80bcf2ae4dfd2b87a9091f0b2
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
223f44e1d2cc56fa965cdb9f112afae1c498cbbd 02-Sep-2014 Christoph Studer <chstuder@google.com> NoMan: Drop archive size to 100, strip EXTRA_BIG_TEXT

Bug: 15557701
Change-Id: I348b9648dbb941b2fa40b169d5ca82b9f9ba21f4
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
b82bc785c966b59621a3a2523ba7cdf84a73697b 20-Aug-2014 Christoph Studer <chstuder@google.com> NoMan: Allow listeners to specify notification trim

Bug: 16574195
Change-Id: I116080df8b73d73040cf9dbc751e25ee118641d7
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
85a384b4256121eb85b7e72bcd50f3348f365d41 27-Aug-2014 Christoph Studer <chstuder@google.com> NoListener: Factor out ZEN mode API

Bug: 17255109
Bug: 17295014
Change-Id: I7e1f6e29b8a23b8e59a8615a8012a86bd5dd22d7
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
ce7d6d292b2309eff95d4206b09858f13fff5213 26-Aug-2014 Christoph Studer <chstuder@google.com> NoListener: meetsInterruptionFilter -> matchesInterruptionFilter

Rename Ranking.meetsInterruptionFilter() to matchesInterruptionFilter()
as suggested by API council.

Marking the old version @removed for now, will remove once prebuilds had
the chance to update.

Bug: 17255109
Change-Id: Iaee094df2dddf82029e127c194ea88581d1a48bb
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
ea75fddbb452638f286c2fcdbddff145ee1a85cb 12-Aug-2014 Dan Sandler <dsandler@android.com> Allow listeners to fetch current notifications by key.

Bug: 16574195
Change-Id: I269dbcc7fc8912d84229f6a3d950b0015625ae7a
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
5c8ea2c369deab75719fe7c7301846a8ef955702 08-Aug-2014 John Spurlock <jspurlock@google.com> Merge "New api to sync zen mode state from listeners." into lmp-dev
d8afe3c41e65a8f6ff4283c124ba250c92cf50c6 01-Aug-2014 John Spurlock <jspurlock@google.com> New api to sync zen mode state from listeners.

- Allow connected listeners to request changes
to the primary device's interruption level.
- Rename alerts -> effects in the other constant,
which does not affect interruption level.
- Rename "flags" -> "hints"
- Basic NoMan wiring for level hint.

Bug:15888672
Change-Id: I2b07fb2c9d32a143fff7c260b7d2cd4d0cd3a592
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
ce2e23ff69427a069cbdcd6bf4fa6097cbf04b4d 03-Aug-2014 Christoph Studer <chstuder@google.com> NoMan: Fix speedbump when no low-prio notifs

Bug: 16705179
Change-Id: I32329710c27052c35b64ba91759200341ed0b127
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
4600f9b60753adab4e65258a05744a46938fce86 22-Jul-2014 Christoph Studer <chstuder@google.com> Strip RemoteViews from Notifications, re-create them in SysUI

Bug: 16329721
Change-Id: Ic0bea763ffaec4c5644ca78705007211ac6b4b88
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
dda48f12212a24371de0e6ba2e5e637925cd9b5e 29-Jul-2014 Christoph Studer <chstuder@google.com> NoListener: Optimize RankingMap

Cache ranks and interception bits instead of re-calculating
them every time they're accessed.

Change-Id: I2c6bbeaa01648d03ff8b3690b7f21cef4e2b9d97
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
1fa865f396e94913cfbbd32ce7799c2e8aeb7a08 21-Jul-2014 John Spurlock <jspurlock@google.com> New NotificationListenerService listener flags api.

Give activated listeners the ability to request changes to
listener-level or host-level state.

Currently this consists of the ability to suppress notification alerts
(alerts = the haptic / audio feedback of a notification).

Bug:15888672
Change-Id: I045e3b99d1f15e3f96ebaf17d3083a97e02ecb42
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
1d599da8424cef8d07cb4c533bd212d992d8f676 12-Jun-2014 Christoph Studer <chstuder@google.com> NotificationListenerService API: Avoid unnecessary allocations

Instead of producing Ranking objects, RankingMap just populates
them now, allowing developers to re-use objects and avoid
unnecessary allocations.

Also rename isInterceptedByDnd() to meetsInterruptionFilter(),
since DND is not a concept anymore.

Bug: 15415840
Bug: 16099064
Change-Id: If9861cbdf14593e641a4d4ffd1b967647eb8e2b8
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
d0694b6735a9d91794e6096961231e07364ba3fa 04-Jun-2014 Christoph Studer <chstuder@google.com> NotificationListenerService: API updates

Introduce RankingMap holding single notification Rankings
indexed by SBN keys.

Also, pass RankingMap with notification event callbacks so
subclasses don't have to call getCurrentRanking() unnecessarily.

Bug: 15415840
Change-Id: Id41e174f00c06c86359c03646abc3db78028b324
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
5c507c1371d273cdff61d2395d47bd54fa26d614 06-Jun-2014 Jeff Brown <jeffbrown@google.com> Rename PrivateApi annotation to SystemApi. (DO NOT MERGE)

Change-Id: I97b473884f81ad375d0733e4766afe091dfdd854
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
cee44ba418bef83571349acb2d24ef29833502e0 20-May-2014 Christoph Studer <chstuder@google.com> Simplify NotificationListenerService API

Use ParceledListSlice to send the list of active notifications
from NoMan to NotificationListeners.

This allows us to simplify the API to what it was before
introducing the "String[] key" workaround for dealing with large
numbers of StatusBarNotifications.

While we're at it, rename Ranking.getIndexOfKey to something that
makes more sense.

Bug: 15126927
Change-Id: I02c2087978c6c4ec1198be496c6250a66143ecb3
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
05ad48206a082057e17723d32493c153faa6881e 16-May-2014 Christoph Studer <chstuder@google.com> Add ZEN and speedbump to NotificationListenerService

Change-Id: I39fae5d77863e0d10cf236a096cc589167d146d3
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
1941fc718690d6b87db68b6a133c71fb470599d0 14-May-2014 Chris Wren <cwren@android.com> Extend NotificationListenerService to support system use cases.

Bug: 14846846
Change-Id: Ic308b2f78c86393304d446c57fd677294e01717c
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
f953664dc17dca23bd724bd64f89189c16c83263 17-Apr-2014 Chris Wren <cwren@android.com> notification ranking infrastructure

Added an ordered list of notifications (n.b. a complete ordering).
Added a mechanism for ranking to be updated asynchronously
Added onNotificationRankingUpdate to NotificationListeners
Added an opaque order update object and a convenience comparator that
uses it to sort notifications for listeners

Repurpose scorers to be ranking preprocessors. The preprocessors will
perform heavy-weight validation of the notification object and memoize
the results to improve efficiency of the ranking comparator.

Current internal comparator implements status quo ordering, except
that notes with a valid contact sort to the top of their priority
bucket.

Change-Id: I7244c65944a9657df41fb313b3cb5a52e149709d
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
a263e4e438746f91fb78857bd569ba4f796a346d 03-Mar-2014 Kenny Guy <kennyguy@google.com> Pipe notifications from related users to listeners.

For Listeners built against L or greater
Send notifications from related users to listeners.
Return notifications from related users getAllActiveNotifications
Cancel notifications from related users in cancelAllNotifications
Deprecate StatusBarNotification.getUserId() and expose getUser()
as APIs should use UserHandles.
Deprecate cancelNotification that takes package, id and tag
in favour of one that takes key.

Fix bug that notifications from related users didn't
trigger sounds.

Change-Id: I1b1c20c9f305b8f3c4047bc5720d8e99cdedfe70
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
a4294297d46cc0b9f45897bc688c267502cce3ef 24-Mar-2014 John Spurlock <jspurlock@google.com> Enhance the NotificationListenerService api.

Add to NotificationListenerService:
- getActiveNotificationKeys() : String[]
- getActiveNotifications(String[] keys) : StatusBarNotification[]
- cancelNotifications(String[] keys) : void
- onListenerConnected(String[] keys) : void

Add to StatusBarNotification:
- getKey() : String

Bug:13562828
Change-Id: Idd9605dad8f942d68b4b32ab9625faf6c8642db9
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
da9a3bed8e1aa7d7867291a123466bb0a3be5bb0 12-Feb-2014 John Spurlock <jspurlock@google.com> Improve error handling in listener services.

Check explicitly for null listeners in NMS, throwing
IllegalArgumentException (on the small list of exceptions
that survive RPC boundaries) with a message.

Normally this situation is caused by listeners that attempt to
perform NM-related actions before they are bound. Check for
this case in the base NLS class and avoid the call to NM if we
know it will fail.

Although it's tempting to throw an IllegalStateException on the
client side, preserve the existing semantics for backwards-compatibility
purposes. That is, silently fail (or return null) - and provide a
log warning.

Bug:12805707
Change-Id: I0d92fd0d460a8592e8a23fd8fd718ae2ba3bd4c7
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
c133ab8258f8e976f402d57456b1f06d11a78b03 10-Jun-2013 John Spurlock <jspurlock@google.com> Log errors found in notification listener callbacks.

Otherwise, exceptions thrown inside listener callbacks are
not logged at all.

Change-Id: Iaef28e06abc4d6caf66051725e14a17ac954173e
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
04667dae3a5e45257c12d11dbcb4fc353a18d842 26-Apr-2013 Scott Main <smain@google.com> fix javadoc build
also add some docs to the service

Change-Id: I712710de403bc000c0a69a2de726bace6e7873bd
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
e6f7f2e3a01b8deb00e03ccfa93751c315f14ef0 25-Apr-2013 Daniel Sandler <dsandler@android.com> API cleanup: NotificationListener

- Wrap all public member variables in getters and make
slots private
- Rename clear* methods to cancel* to be more consistent
with existing public Notification API

Bug: 8656860
Change-Id: I84f7e71fbb627f859352a93089c6a531b44dac95
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
25cf8cee6f304a286d321204e448b18ce733a60c 24-Apr-2013 Daniel Sandler <dsandler@android.com> New NotificationListener API: getActiveNotifications()

This allows a listener service to catch up on the current
state of the notification panel at any time, including at
startup.

Bug: 8656860
Change-Id: I1a3d665d84576e17870929a63dda334afc696010
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
1a497d3a2b1496c12949e47e55f8e46d8f585be5 18-Apr-2013 Daniel Sandler <dsandler@android.com> Fix concurrency issues when parceling StatusBarNotifications.

Protip: Don't mess with Bundles after you've sent them off
for parceling in an RPC.

Note that this change reduces the payload size of
StatusBarNotification objects received in
onNotificationRemoved() callbacks; it scrubs out the
RemoteViews and Bitmaps just as the NoMan's internal archive
does. [You don't really need that information anyway when
hearing about a removed notification; most likely all you
need are the other slots on StatusBarNotification, but
nulling the whole Notification object breaks a lot of
clients.]

Bug: 8616295
Change-Id: Ic899045f2352b96dcf064d3e9e51dad52629aea3
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java
5feceebb892d4cb5777cea3c6174b206705d456b 23-Mar-2013 Daniel Sandler <dsandler@android.com> New NotificationListenerService.

This is the best and only way for apps to listen for
notifications: create a NotificationListenerService, wait
for the NoMan to bind to you (as a result of the user
checking a box somewhere in Settings and agreeing to a
scary dialog box), and you'll start receiving notification
posted and dismissed callbacks. Your service, while enabled,
will also be able to clear one or all notifications.

Use this power wisely.

This change moves StatusBarNotification out of
com.android.internal into android.service.notification.
[Internal customers, including System UI and early users of
the system-only listener binder API, will need to be
updated.]

Bug: 8199624
Change-Id: I1be46f823d4b3ddc901109ec1e085cd6deb740c2
/frameworks/base/core/java/android/service/notification/NotificationListenerService.java