diff options
| author | 2013-04-25 21:27:02 -0700 | |
|---|---|---|
| committer | 2013-04-25 21:27:02 -0700 | |
| commit | 93b7e769eb3d10041ef05a4723fed6e13fe7705d (patch) | |
| tree | df217b07ada0aa267b7418853563cdb1b2e90ab1 | |
| parent | fe9270712ec9e84ba37dc13c42495b0b6ec3753e (diff) | |
| parent | 22e9225ab13347e3653449af0306bc87fa7965f2 (diff) | |
am 22e9225a: am 5e5aeb46: Merge "fix javadoc build also add some docs to the service" into jb-mr2-dev
* commit '22e9225ab13347e3653449af0306bc87fa7965f2':
fix javadoc build also add some docs to the service
| -rw-r--r-- | core/java/android/service/notification/NotificationListenerService.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java index 5031d3cc9b5e..bfea9cadef89 100644 --- a/core/java/android/service/notification/NotificationListenerService.java +++ b/core/java/android/service/notification/NotificationListenerService.java @@ -25,6 +25,20 @@ import android.os.IBinder; import android.os.ServiceManager; import android.util.Log; +/** + * A service that receives calls from the system when new notifications are posted or removed. + * <p>To extend this class, you must declare the service in your manifest file with + * the {@link android.Manifest.permission#BIND_NOTIFICATION_LISTENER_SERVICE} permission + * and include an intent filter with the {@link #SERVICE_INTERFACE} action. For example:</p> + * <pre> + * <service android:name=".NotificationListener" + * android:label="@string/service_name" + * android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"> + * <intent-filter> + * <action android:name="android.service.notification.NotificationListenerService" /> + * </intent-filter> + * </service></pre> + */ public abstract class NotificationListenerService extends Service { // TAG = "NotificationListenerService[MySubclass]" private final String TAG = NotificationListenerService.class.getSimpleName() @@ -57,7 +71,7 @@ public abstract class NotificationListenerService extends Service { * notification listener) or because the app has withdrawn the notification. * <P> * NOTE: The {@link StatusBarNotification} object you receive will be "light"; that is, the - * {@link StatusBarNotification#notification} member may be missing some heavyweight + * result from {@link StatusBarNotification#getNotification} may be missing some heavyweight * fields such as {@link android.app.Notification#contentView} and * {@link android.app.Notification#largeIcon}. However, all other fields on * {@link StatusBarNotification}, sufficient to match this call with a prior call to |